Guides & Docs
Integration guides and explainers for building with Provable.io. New here? Start with how the cryptography works or jump straight into a quickstart below.
Updated
Quickstarts
Quickstart with cURL
Make your first API call from the command line in under a minute.
QuickstartQuickstart with Node.js
Generate and verify random outcomes from a Node.js server using fetch.
QuickstartQuickstart with Python
Call the API from Python using the requests library, with verification examples.
QuickstartQuickstart with Go
Call the API from Go using net/http — no third-party dependencies required.
QuickstartConcepts & Guides
How Provably Fair Works
The cryptographic technique behind verifiable randomness, explained without the jargon.
ConceptMigrating from Math.random()
Before/after snippets for range ints, weighted pick, and shuffle — plus a feature-flag rollout plan.
GuideVerifying an Outcome
Step-by-step guide to verifying that a Provable.io outcome is genuine.
GuideAuditing the Transparency Log
Daily Merkle roots, inclusion proofs, and how to audit them yourself.
GuideThe Commit-Reveal Flow
How POST /api/commit + POST /api/reveal lets the server prove it didn't pick the outcome after seeing your bet.
GuideIdempotency
How Idempotency-Key headers prevent duplicate outcomes on retried requests.
GuideWebhooks
Subscribe to outcome events with signed webhook delivery and retries.
GuideStreaming Outcomes
Use the SSE endpoint to receive outcomes in real time, with Last-Event-ID resume.
GuideTest-Mode Keys
Use pk_test_* keys for playgrounds and CI — outcomes don't touch live seed state.
GuideAPI Key Restrictions
Per-key IP and Referer allowlists for safer key sharing.
GuideBatch Draws
Up to 50 independent draws in one round trip — request shape, ordering, and partial-failure handling.
GuideOfficial TypeScript SDK
Install and configure @provableio/sdk: typed results, streaming, idempotency, and commit/reveal.
SDKRecipes
Building Fair Raffles
How to run a transparent prize draw your community can audit.
RecipeDice Rolls & Coin Flips
The hello-world of game mechanics — verifiable dice and coins in a few lines.
RecipeShuffle a Deck of Cards
A Fisher-Yates shuffle driven by verifiable random integers.
RecipeWeighted Loot Tables
Loot boxes, gacha pulls, prize wheels — drop rates your players can audit.
RecipeDeterministic A/B Buckets
Reproducible variant assignment an auditor can re-derive months later.
RecipeGenerating NFT Traits
Mint-time trait assignment holders can independently verify — no "team got the rares."
RecipeBuilding a Raffle Backend
An end-to-end Node.js + Express app: commit-reveal, webhooks, permalinks, and inclusion proofs.
Tutorial