Build trust with your players. RaaS provides transparent, verifiable, and cryptographically secure randomness for games and gambling platforms.
Start Free →Cryptographically shuffle decks
True random dice for RPGs, board games, and more
Random team assignments and player matching
Transparent winner selection for promotions
Provably fair gaming lets players verify that outcomes weren't manipulated. Here's how to implement it with RaaS:
Before the game, fetch a random seed from RaaS. Hash it and show the hash to the player.
Let the player input their own random value (or generate one client-side).
Combine both seeds cryptographically to determine the game outcome.
After the game, reveal the server seed. Player can verify the hash matches and outcome was fair.
import hashlib
import requests
API_KEY = "raas_your_api_key"
def provably_fair_dice():
# Step 1: Get server seed from RaaS
resp = requests.get(
"https://www.getrandm.com/api/hex?length=64",
headers={"X-API-Key": API_KEY}
)
server_seed = resp.json()["hex"]
# Show hash to player BEFORE they commit
server_hash = hashlib.sha256(server_seed.encode()).hexdigest()
print(f"Server seed hash: {server_hash}")
# Step 2: Get client seed from player
client_seed = input("Enter your seed: ")
# Step 3: Combine seeds and generate outcome
combined = f"{server_seed}:{client_seed}"
result_hash = hashlib.sha256(combined.encode()).hexdigest()
dice_roll = (int(result_hash[:8], 16) % 6) + 1
# Step 4: Reveal server seed for verification
print(f"Server seed: {server_seed}")
print(f"Dice roll: {dice_roll}")
return dice_roll
Our randomness comes from hardware RNG and FIPS-grade algorithms. No patterns, no predictions, no manipulation.
Fast response times ensure smooth gameplay. Random values delivered in milliseconds.
Start with 20 free API calls per day. Scale to millions of game rounds.
Get Your API Key →