Dice Roller API
Roll dice in standard tabletop notation (2d6+3, 4d6kh3, d20-1, 3d8+2d4) with a cryptographic random source; returns each die, the total, and the possible min, max and average.
POST /api/v1/tools/dice-rollerMCP dice_rollerGeneratorsRandom outputRoll virtual dice with standard notation like 2d6+3, d20, d% or 4d6kh3. See each die, the total, possible range and average, plus a history of rolls.
Input
Send these as a JSON object. Unknown fields are rejected.
- notation
- Dice notation: NdS terms (up to 100 dice of up to 1000 sides) joined with + or -, optional constants, and kh/kl to keep the highest/lowest, e.g. 4d6kh3. (string, up to 200 characters, required)
- rolls
- How many times to roll the whole expression (1 to 100). (integer, 1 to 100, default 1)
curl https://pithlab.com/api/v1/tools/dice-roller \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"notation":"4d6kh3+2"}'