{"openapi":"3.1.0","info":{"title":"Dice API","version":"1.0.0","description":"A fast, fully-local dice toolkit for games and simulations: roll dice notation (NdM with plus and minus modifiers, multiple dice terms like 1d8+1d6+2, and keep-highest or keep-lowest for advantage and disadvantage such as 2d20kh1), parse and validate a notation, and compute the deterministic minimum, maximum and mean of a roll. Rolls use a cryptographically secure random source. Every endpoint accepts input via the query string or the request body. Pure server-side compute, no third-party upstream, so responses are instant and always available. Ideal for tabletop and RPG tools, Discord and chat bots, virtual tabletops and game backends.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/dice-api","description":"oanor gateway"}],"tags":[{"name":"Dice"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/parse":{"get":{"operationId":"get_v1_parse","tags":["Dice"],"summary":"Parse a notation","description":"","parameters":[{"name":"notation","in":"query","required":true,"description":"Dice notation","schema":{"type":"string"},"example":"4d6kh3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"terms":[{"keep":{"n":3,"mode":"highest"},"sign":1,"type":"dice","count":4,"sides":6}],"valid":true,"notation":"4d6kh3"},"meta":{"timestamp":"2026-05-30T14:35:20.270Z","request_id":"44bb2eb8-6a38-4f2e-bba6-2c02a165b1d5"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/roll":{"get":{"operationId":"get_v1_roll","tags":["Dice"],"summary":"Roll a dice notation","description":"","parameters":[{"name":"notation","in":"query","required":true,"description":"Dice notation","schema":{"type":"string"},"example":"3d6+2"},{"name":"rolls","in":"query","required":false,"description":"Repeat the roll 1-100","schema":{"type":"string"},"example":"1"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"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}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/stats":{"get":{"operationId":"get_v1_stats","tags":["Dice"],"summary":"Min/max/mean of a notation","description":"","parameters":[{"name":"notation","in":"query","required":true,"description":"Dice notation","schema":{"type":"string"},"example":"3d6+2"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"max":20,"min":5,"mean":12.5,"notation":"3d6+2","approximate":false},"meta":{"timestamp":"2026-05-30T14:35:20.424Z","request_id":"b65ae95c-ed0c-49f1-bb33-b41eddf0d59d"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":19000,"rps_limit":4,"hard_limit":true},{"slug":"basic","name":"Basic","price_cents_month":300,"monthly_call_quota":310000,"rps_limit":12,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1000,"monthly_call_quota":1750000,"rps_limit":40,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":2800,"monthly_call_quota":9200000,"rps_limit":130,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/dice-api"}