Seeded dice roller
A seeded dice roller produces the same sequence whenever the dice count, side count, and seed are unchanged.
Run — free
That makes random-looking rolls practical for tests, game replays, classroom exercises, and shared scenarios where every participant needs identical results. Enter how many dice to roll, choose the number of sides on each die, and provide any non-empty text seed. The result lists each individual roll in order and adds them into one total.
Make a dice roll reproducible
Ordinary dice tools are designed to surprise you, but reproducibility matters whenever another person or another run must see exactly the same outcome. This seeded dice roller converts your seed text into a fixed internal starting value, then advances a deterministic generator once for every accepted die result. If you submit the same number of dice, the same number of sides, and the same seed, the ordered rolls and total remain identical. Changing even one of those inputs creates a different scenario. A seed can be a test case name, a match identifier, a lesson label, or any other non-empty text that your team can store and share. Treat the seed as part of the scenario definition rather than as a secret. The response includes a rolls array so you can inspect each die, not merely the sum, which is useful for rules involving doubles, highest or lowest dice, individual successes, or later replay. It also includes the total so common checks need no extra arithmetic.
Choose dice and sides carefully
The dice field controls how many independent results are returned, while sides defines the inclusive range of every result. For example, six-sided dice always produce integers from 1 through 6, and twenty-sided dice always produce integers from 1 through 20. The capability accepts between 1 and 1,000 dice and between 2 and 1,000,000 sides per die. A die with fewer than two sides is rejected because it does not represent a meaningful random choice, and fractional or non-numeric values are rejected rather than silently rounded. The implementation maps generated 32-bit values to die faces with rejection sampling. That avoids the small modulo bias created when the generator range is not evenly divisible by the number of sides. Results are deterministic across server and browser execution because the algorithm uses only explicitly defined integer operations. It does not call a system random source, inspect the clock, depend on locale, or contact another service. These properties make the response suitable for fixtures and repeatable demonstrations, although it is not intended for cryptography, wagering, or security-sensitive lotteries.
Store and replay complete scenarios
For reliable replay, save all three inputs together: dice, sides, and seed. Saving only the total is not enough when game logic later needs the individual rolls, and saving only the seed is not enough when the dice configuration can change. A test suite can derive a seed from a case name, call the capability, and keep the returned rolls as readable evidence. A game master can publish a scenario seed before a session so participants can reproduce an encounter without exposing results in advance. Teachers can give every student the same generated data while still presenting an exercise that looks like a natural dice experiment. The sequence is tied to this capability's documented algorithm; because the capability begins in beta, applications that require permanent archival replay should also store the returned rolls. API automation costs $0.002 per request, while the browser runner can perform the same pure computation locally. When comparing two runs, compare the ordered rolls array as well as the total: different sequences can share a sum, so the array is the stronger proof that the entire scenario was reproduced.
What you can do with it
Create stable game tests
Use named seeds in automated tests so combat, movement, or scoring logic receives repeatable dice sequences.
Replay a tabletop scenario
Share the dice configuration and seed so every participant can regenerate the same ordered rolls and total.
Prepare classroom experiments
Give students consistent simulated dice data for probability exercises while preserving realistic-looking outcomes.
FAQ
Will the same seed always produce the same rolls?
Yes, provided the dice count, number of sides, seed text, and capability algorithm are the same.
What happens when sides is below 2?
The request fails with an invalid input error because a die must have at least two possible faces.
Can I see each die instead of only the total?
Yes. The rolls array contains every result in order, and total contains their sum.
Is this suitable for cryptography or real-money wagering?
No. The generator is intentionally reproducible and is not a cryptographically secure source of randomness.
What does an API request cost?
Each API request costs $0.002. The same pure calculation can also run free in your browser.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/game/dice-roll-seeded \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"dice":3,"sides":6,"seed":"campaign-round-7"}'const res = await fetch("https://api.kit.forhosting.com/game/dice-roll-seeded", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"dice": 3,
"sides": 6,
"seed": "campaign-round-7"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/game/dice-roll-seeded",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"dice": 3,
"sides": 6,
"seed": "campaign-round-7"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/game/dice-roll-seeded", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"dice":3,"sides":6,"seed":"campaign-round-7"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"dice":3,"sides":6,"seed":"campaign-round-7"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/game/dice-roll-seeded", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"dice": 3,
"sides": 6,
"seed": "campaign-round-7"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "game.dice_roll_seeded",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |