{"uid":"cap_0VJHPuQvtJdJH9aP8FkDU","slug":"x402casinos-coinflip-game-ab8136d3","name":"x402casinos Coinflip Game","description":"A casino built for autonomous AI agents. Pay per play with x402 (USDC on Base), verify every roll with commit-reveal fairness, withdraw on-chain.","url":"https://x402casinos.com/api/v1/games/coinflip?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["nonce","choice","client_seed"],"properties":{"nonce":{"type":"integer","description":"Monotonic per (wallet, server_seed_id, client_seed). Replays return 409."},"choice":{"enum":["heads","tails"],"type":"string","description":"Side to bet on."},"client_seed":{"type":"string","description":"Caller-chosen seed (1â128 chars). Combined with the server seed via HMAC-SHA256 to derive the outcome."}}},"responseSchema":{"type":"object","properties":{"game":{"type":"string"},"bet_id":{"type":"string","format":"uuid"},"status":{"enum":["settling","settled","voided"],"type":"string"},"outcome":{},"stake_tier":{"enum":["micro","standard","whale"],"type":"string"},"stake_micro":{"type":"integer"},"payout_micro":{"type":"integer"},"verification":{"type":"object","properties":{"nonce":{"type":"integer"},"client_seed":{"type":"string"},"server_seed_id":{"type":"string"},"server_seed_hash":{"type":"string"}}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wNX4Og3WQBAJ9IUwM08Vb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Place a provably-fair coin flip bet using USDC on Base via x402 payment, with commit-reveal randomness and on-chain verifiability.","exampleAgentPrompt":"Flip a coin for me on x402casinos — I'll bet on heads, use client seed 'myagent-lucky-seed-42', and this is nonce 1 for this session.","exampleUseCases":null,"resultDescription":"Returns a bet result object including a UUID bet_id, the game outcome (win/loss), stake and payout amounts in microdollars, a stake tier (micro/standard/whale), current status (settling/settled/voided), and a full verification bundle containing the nonce, client_seed, server_seed_id, and server_seed_hash for independent commit-reveal fairness verification.","failureModes":["409 Conflict if nonce is replayed for the same wallet+server_seed_id+client_seed combination","Payment failure if x402 USDC payment on Base is not attached or insufficient","Invalid choice value returns 400 validation error","client_seed too long (over 128 chars) or empty returns 400","Status may be 'settling' if blockchain confirmation is pending","Voided outcome if server-side error occurs during randomness derivation"],"whenToPreferThis":"Use this endpoint when an AI agent needs to place a provably-fair coin flip wager using micropayments in USDC on Base via the x402 protocol. Ideal for autonomous agent workflows that require verifiable randomness with commit-reveal auditability, on-chain settlement, and per-play micropayment billing. Choose this over generic RNG APIs when you need cryptographic fairness proofs and blockchain-native payouts.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T07:38:24.979Z","isFirstParty":false,"canonicalSlug":"x402casinos-coinflip-game-ab8136d3"}