{"uid":"cap_N01CPr_WnWOYOF0dEpis0","slug":"animica-random-commit-drng-commit-reveal-921199a2","name":"Animica Random Commit (DRNG Commit-Reveal)","description":"Commit now, reveal to everyone later: the paid call returns a commitment sha3_256(secret||salt) and a commit id; GET /x402/random/reveal/{commit_id} is FREE, public and idempotent, and discloses the secret, the salt, the raw draw and the node's attestation so anyone — not just the buyer — can check the commitment. Reveal delay 0..604800s. For games, sealed-bid rounds and auditable draws. Trust model, stated plainly: the commitment binds the outcome from the moment you publish it, and the reveal proves the secret came from a node-signed draw — it does NOT prove the operator discarded no draws before committing, so publish the commitment to your players before the round.","url":"https://animica.dev/x402/random/commit","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"memo":{"type":"string","description":"up to 256 printable ASCII chars, published verbatim at reveal (bind the commitment to your round/bet id)"},"request_id":{"type":"string","description":"your own tag; mixed into the DRNG seed that produced the secret"},"reveal_after_seconds":{"type":"integer","description":"seconds until the free reveal opens, 0..604800 (default 0 = revealable immediately)"}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001794","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.001794/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001794","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001794","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IVdzcBhoV9EkohBeEZLiH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001794","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Creates a cryptographic commit-reveal commitment using a decentralized random number generator, returning a commit ID and proof that a secret random draw has occurred without disclosing the result yet.","exampleAgentPrompt":"Create a random commit on Animica for my lottery round ID 'round-2024-001', bind it with the memo 'jackpot draw round 42', and set it to be revealable after 300 seconds.","exampleUseCases":[{"title":"Provably fair raffle draw","prompt":"I'm running a raffle and need to commit to a random draw before I announce winners — create a commit on Animica with memo 'raffle-event-sept-2024' and my request ID 'raffle-42', locked for 600 seconds so nobody can claim I changed the result."},{"title":"Betting round seed commitment","prompt":"Before I open betting on my next round, commit a secret random seed on Animica and tie it to my request ID 'bet-round-99' with memo 'sports-bet-round-99', revealable immediately after the round closes."},{"title":"On-chain randomness anchor","prompt":"I need a cryptographic randomness commitment I can reference in a smart contract — use Animica to commit a random draw with memo 'nft-mint-drop-001' and request ID 'drop-session-7', no reveal delay needed."}],"resultDescription":"Returns a JSON object containing: a unique commit_id, the cryptographic commitment hash, the algorithm used, a reveal_after Unix timestamp, a reveal_url where the secret will be disclosed after the delay, the source and health status, an attestation proving the draw occurred without disclosing it, and verification/payment metadata. The actual random result is NOT disclosed at this stage.","failureModes":["Invalid memo length (over 256 chars) — returns 400 Bad Request","reveal_after_seconds out of range (>604800) — returns 400 or validation error","Payment not included or insufficient — returns 402 Payment Required","Service unavailable on animica.dev — returns 503","Malformed request body — returns 400 with schema error"],"whenToPreferThis":"Choose this endpoint when you need a provably fair, cryptographically attested commit-reveal randomness scheme — particularly for lotteries, games, raffles, or betting rounds where you must prove the random outcome was sealed before participants acted. Prefer this over a simple random number generator when auditability, tamper-resistance, or time-delayed reveal are required. It is especially suitable when you want to bind the commitment to a specific round or bet ID via the request_id field.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:31:41.638Z","isFirstParty":false}