Self-hosted seeds still ask for trust.
When the house generates its own server seed and publishes its own hash, sharp players still wonder if bad seeds get discarded before a big bet.
Provably fair RNG API · built for casinos, sweepstakes & originals
Third-party seed commitments and unbiased randomness for dice, crash, mines, card shoes, and sweepstakes. Commit each server seed once, derive every bet in microseconds in your own stack, and hand players a proof they don't have to take your word for.
provable-core{
"outcome": [],
"message": "Click 'Generate' to try the API"
}Try a draw, then check it with the outcome verifier, recompute any seed with the provably fair checker, or read the casino & sweepstakes integration guide.
For gambling operators
Self-hosted provably fair still asks players to trust that the house didn't cherry-pick a friendlier server seed. Sealed commits split the trust without adding latency to your bet path:
POST /api/commit, then run unlimited rounds locally with @provableio/provable-core.GET /api/commits?label=…) and automatic public reveal after 7 days.// 1. Once per seed rotation — third-party sealed commit
const commit = await fetch("https://api.provable.io/api/commit", {
method: "POST", headers,
body: JSON.stringify({ sealed: true, label: `player:${id}:seed:${n}` }),
}).then((r) => r.json());
// Show commit.serverHash to player; keep commit.serverSeed private
// 2. Every bet — derive locally in microseconds (zero API call)
const [float] = Provable(() => {})({
serverSeed: commit.serverSeed, clientSeed, nonce, cursor: 0,
}).floats(1);
const diceRoll = Math.floor(float * 10001) / 100; // 0.00–100.00
// 3. Player rotates — reveal old seed publicly
await fetch("https://api.provable.io/api/reveal", {
method: "POST", headers,
body: JSON.stringify({ commitId: commit.commitId, clientSeed }),
});Open by default
The generator, the spec and the audit trail are all open, so nothing about a draw depends on taking our word for it. Check any of it.
provable-coreLocal bet engine + verifier. MIT licensed.@provableio/sdkTyped TypeScript client on npm.openapi.jsonOpenAPI 3.0 spec for every endpoint.HMAC-SHA256Seeded bytes, mapped without modulo bias./api/commitSealed seeds locked publicly, 7-day auto-reveal./api/merkleDaily Merkle root for external audits.Idempotency-KeySafe bet retries — never double-draw.pk_test_Deterministic test keys for CI & RTP sims.The problem
A fair draw needs a commitment before the result and a way to check it after. Most random sources give you neither.
How to generate provably fair random numbersWhen the house generates its own server seed and publishes its own hash, sharp players still wonder if bad seeds get discarded before a big bet.
A cold streak without an independent third-party receipt turns into Telegram FUD, chargebacks, and churn — even when your game math is clean.
Gas fees per bet and multi-second block confirmations kill dice, crash, mines, and live tables. Off-chain HMAC gives instant bets with the same verifiable math.
Audit trail
Each outcome is stored with its client seed, nonce and server hash. Once the seed rotates, the server seed is revealed and anyone can re-run the draw. Pick a record and replay it.
How verification works| shortId | clientSeed | range | outcome | serverHash | time (UTC) |
|---|---|---|---|---|---|
| raffle-2026-09 | 1–2400 | 284 | eb39f6e8… | 14:02:11 | |
| loot-box-7781 | 1–100 | 87 | e16699a3… | 14:02:48 | |
| tournament-seat-12 | 1–64 | 36 | 9299991b… | 14:03:05 | |
| dice-room-3 | 1–6 | 2, 6 | cbc4bc81… | 14:03:19 | |
| giveaway-oct | 1–5000 | 2033, 741, 137 | 931edfa0… | 14:04:02 | |
| mint-reveal-0419 | 1–10000 | 8310 | 190dffe9… | 14:04:37 |
Unbiased mapping
The usual shortcut maps random bytes onto a range with %, which quietly skews dice rolls, deck deals, and live RTP across millions of bets. provable-core rejects out-of-range values so every outcome has the exact same probability.
MethodSkew, log scaleMost likely outcome vs fair
provable-core ints()exactMath.random() * n+1.6e-11%uint32 % n+0.000016%byte % nmisses 2,144 outcomesMath.random() assumes a 52-bit float, as in V8. Skew is the worst-case extra chance of the most favoured outcome.
SDK
@provableio/sdk covers every endpoint with types generated from the OpenAPI spec. It runs on Node 18+, Deno, Bun, browsers and Workers, and returns errors as values instead of throwing.
import { ProvableClient } from "@provableio/sdk";
const client = new ProvableClient({ apiKey: process.env.PROVABLE_KEY });
const { data, error } = await client.getInts({
clientSeed: "player-4821:round-904",
count: 1, min: 0, max: 10000, // 0.00–100.00 dice roll
});
if (error) throw new Error(error.error);
// attach data.serverHash + /o/<shortId> to the bet receipt
const { data: ok } = await client.verifyServerHash({
clientSeed: data.clientSeed,
serverHash: data.serverHash,
});Commit-reveal
For draws that must be sealed in advance, POST /api/commit returns a server hash before you choose your client seed. POST /api/reveal then returns the outcome and the seed, so the server could not have steered the result.
POST /api/commitserverHash eb39f6e84e957e12… locked publiclyplayer setsclientSeed "raffle-2026-09" + places betPOST /api/revealseed rotated, serverSeed aed996bd82c48a54… revealedsha256(serverSeed)matches hash committed at 14:02:07 (or auto-reveals in 7d)Public proof
Every outcome gets a short ID and a public permalink on provable.io. Link it straight from your bet-history modal so any player can verify a result on a third-party domain instead of taking your UI's word for it.
ints 0–11, 1, 1, … (+4 more)seed demo-user · nonce 62669ints 100–480345, 287, 465, … (+7 more)seed demo-user · nonce 62668floats0.223784seed fundingrate.io:round:31542 · nonce 0floats0.718428seed fundingrate.io:round:31541 · nonce 0floats0.734845seed fundingrate.io:round:31540 · nonce 0floats0.987728seed fundingrate.io:round:31539 · nonce 0ints 0–10, 1, 1, … (+4 more)seed demo-user · nonce 62667ints 100–480273, 270, 247, … (+7 more)seed demo-user · nonce 62666Use cases
Third-party sealed seed commits with local microsecond bet derivation.
Verifiable Fisher-Yates deck and multi-deck shoe shuffles in one call.
Unbiased floats, integers, and NdM rolls for dice, crash, mines, and limbo.
Provably fair weighted wheel segments and bonus rounds with public receipts.
Drop-rate verifiable case openings players can audit offline.
Pre-committed scheduled draws and raffles anyone can replay.
FAQ
A provably fair random number is an outcome that anyone can independently verify was not chosen on purpose. The server publishes a cryptographic hash of its secret seed before you ask for a number; once your client seed is mixed in and the server seed is revealed, anyone can recompute the result and prove it matches the original hash.
Yes. Without an account you can make 10 draws a minute and 100 a day per IP, enough to try it. A free account gets an API key, 10,000 draws a day, and the batch and streaming endpoints.
Go to the /verify page or call GET /api/verifyServerHash with the original clientSeed and serverHash. The endpoint returns true if the values match our records, confirming the outcome was generated as claimed.
Yes for crypto casinos, sweepstakes casinos, and provably fair originals. Provable.io is not a gaming license or an ISO/IEC 17025 test lab — operators in regulated jurisdictions still handle licensing and lab certification — but it provides the third-party seed commitments, public proof receipts, and daily Merkle roots players and auditors ask for.
No. Call POST /api/commit with sealed: true once per seed rotation, derive every bet locally in your own game engine with the MIT-licensed @provableio/provable-core library, and call POST /api/reveal when the player rotates seeds. Bet volume never touches your quota, player stakes stay on your servers, and live games keep running even if the API is temporarily unreachable.
Call POST /api/commit to receive a commitment id and a hash of an outcome that has been generated but not yet shown to you. Later, call POST /api/reveal with the commitment id to receive the outcome itself. Because the hash was issued before reveal, neither party could have changed the result after the fact.
Free live & test API keys, no credit card. 10,000 draws/day — unlimited local bets per sealed seed.