{"openapi":"3.1.0","info":{"title":"Dice Probability API","version":"1.0.0","description":"Tabletop dice-probability maths as an API, computed locally and deterministically and exactly — the odds behind the rolls, not the rolls themselves. The advantage endpoint gives the D&D-style chances of beating a target on a d20 (or any die) rolling normally, with advantage (roll twice, keep the higher) or with disadvantage (keep the lower): needing an 11+ is 50 % normally, 75 % with advantage and 25 % with disadvantage, and it reports the average roll — advantage lifts a d20 from 10.5 to about 13.8. The pool endpoint handles success-counting systems (World of Darkness, Shadowrun): for a pool of dice that succeed on a face at or above a threshold it gives the chance per die, the expected number of successes and the exact binomial probability of getting exactly, or at least, a target number — six d10s succeeding on 7+ average 2.4 successes with a 45.6 % chance of three or more. The exploding endpoint gives the mean of an exploding (\"acing\", open-ended) die that re-rolls and adds on its maximum face — a d6 averages 4.2 instead of 3.5. Everything is computed locally and deterministically, so it is instant and private. Ideal for tabletop, virtual-tabletop, game-design and TTRPG app developers, odds-and-probability helpers, and game-master tools. Pure local computation — no key, no third-party service, instant. Exact maths, no simulation. Live, nothing stored. 3 compute endpoints. For random rolls use a dice-roller API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/dicepool-api","description":"oanor gateway"}],"tags":[{"name":"Dice"},{"name":"Meta"}],"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/advantage":{"get":{"operationId":"get_v1_advantage","tags":["Dice"],"summary":"Advantage / disadvantage odds","description":"","parameters":[{"name":"target","in":"query","required":true,"description":"Target to meet or beat","schema":{"type":"string"},"example":"11"},{"name":"sides","in":"query","required":false,"description":"Die sides (default 20)","schema":{"type":"string"},"example":"20"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"P(success) = faces ≥ target ÷ sides. Advantage = 1 − (1−p)² (roll twice, keep higher); disadvantage = p². On a d20 advantage adds roughly +3.3 to the average roll.","inputs":{"sides":20,"target":11},"average_roll":10.5,"average_with_advantage":13.825,"normal_success_percent":50,"advantage_success_percent":75,"average_with_disadvantage":7.175,"disadvantage_success_percent":25},"meta":{"timestamp":"2026-06-06T07:14:06.897Z","request_id":"306cc059-30c6-4788-b0d7-1ee0fac3dea8"},"status":"ok","message":"Advantage odds","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/exploding":{"get":{"operationId":"get_v1_exploding","tags":["Dice"],"summary":"Exploding die expectation","description":"","parameters":[{"name":"sides","in":"query","required":true,"description":"Die sides","schema":{"type":"string"},"example":"6"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"An exploding die re-rolls and adds on its maximum face. Mean = ((sides+1)/2) × sides/(sides−1): a d6 averages 4.2 (vs 3.5), a d10 about 6.11.","inputs":{"sides":6},"average_normal":3.5,"average_exploding":4.2,"explode_chance_percent":16.6667},"meta":{"timestamp":"2026-06-06T07:14:06.995Z","request_id":"80f841dd-bce7-44a6-9b0f-3d9bd13e61c6"},"status":"ok","message":"Exploding dice","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/pool":{"get":{"operationId":"get_v1_pool","tags":["Dice"],"summary":"Dice-pool success odds","description":"","parameters":[{"name":"dice","in":"query","required":true,"description":"Number of dice","schema":{"type":"string"},"example":"6"},{"name":"success_threshold","in":"query","required":true,"description":"Face ≥ this is a success","schema":{"type":"string"},"example":"7"},{"name":"sides","in":"query","required":false,"description":"Die sides (default 10)","schema":{"type":"string"},"example":"10"},{"name":"target_successes","in":"query","required":false,"description":"Target successes (default 1)","schema":{"type":"string"},"example":"3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Each die succeeds with probability (faces ≥ threshold)/sides; the number of successes is binomial. Expected successes = dice × that chance. Useful for World of Darkness, Shadowrun and other pool systems.","inputs":{"dice":6,"sides":10,"target_successes":3,"success_threshold":7},"expected_successes":2.4,"probability_exactly_percent":27.648,"probability_at_least_percent":45.568,"success_chance_per_die_percent":40},"meta":{"timestamp":"2026-06-06T07:14:07.099Z","request_id":"6a7c350b-8656-41f0-baee-07f2d0e311da"},"status":"ok","message":"Dice pool","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/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Exact probabilities (no simulation). Advantage rolls two and keeps the higher; pools count successes (face ≥ threshold); exploding dice re-roll on the max face. For random rolls use a dice-roller API.","service":"dicepool-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/pool":"Success-count probabilities for a pool of dice with a success threshold.","GET /v1/advantage":"Normal/advantage/disadvantage success odds and average rolls vs a target.","GET /v1/exploding":"Average of an exploding (acing) die vs a normal one."},"description":"Tabletop dice probability: D&D advantage/disadvantage odds, dice-pool success probabilities, and exploding-dice expectation."},"meta":{"timestamp":"2026-06-06T07:14:07.193Z","request_id":"e65e0674-e8d1-4965-9b9b-cb6bc67302d4"},"status":"ok","message":"Meta","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":6350,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":405,"monthly_call_quota":58000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1130,"monthly_call_quota":238500,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3600,"monthly_call_quota":1370000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/dicepool-api"}