Vai al contenuto
GET /v1/roll

Roll a dice notation

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/dice-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/dice-api/v1/roll" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/dice-api/v1/roll", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/dice-api/v1/roll");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/dice-api/v1/roll",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "count": 1,
        "total": 19,
        "results": [
            {
                "total": 19,
                "breakdown": [
                    {
                        "dice": "3d6",
                        "kept": [
                            6,
                            6,
                            5
                        ],
                        "rolls": [
                            6,
                            6,
                            5
                        ],
                        "subtotal": 17
                    },
                    {
                        "modifier": 2
                    }
                ]
            }
        ],
        "notation": "3d6+2"
    },
    "meta": {
        "timestamp": "2026-05-30T14:35:20.351Z",
        "request_id": "c80dddba-aa49-46dc-89c6-fc1abf6992ba"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}