{"uid":"cap_wPFkjC1yEuu7-RQpF5Qbm","slug":"provably-fair-random-integer-draw-e898a07a","name":"Provably-Fair Random Integer Draw","description":"Provably-fair random integer from a committed seed. ?client_seed=s&nonce=1&min=1&max=100&round=1","url":"https://pyfile-agent.taile3ff35.ts.net/data/fair/draw","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{}}}},"output":{"type":"object"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tpr88LvPbvdeJHF9ZMefw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a provably-fair random integer within a specified range using a committed seed scheme with client seed, nonce, and round parameters","exampleAgentPrompt":"Draw a provably-fair random integer between 1 and 100 using client seed 'myseed', nonce 1, for round 42.","exampleUseCases":[{"title":"Lottery ticket number draw","prompt":"Pick a provably-fair random number between 1 and 1000 using client seed 'lottery2024', nonce 5, for round 7 — I need something I can verify later."},{"title":"On-chain game dice roll","prompt":"Roll a fair random number between 1 and 6 for round 12 of my game, using client seed 'player_abc' and nonce 3 so the outcome is auditable."},{"title":"Raffle winner selection","prompt":"Generate a provably-fair integer between 1 and 500 for round 1 of my raffle, with client seed 'raffle_event' and nonce 1, so participants can verify the result."}],"resultDescription":"Returns a single random integer within the specified min/max range, generated deterministically from the combination of server seed (pre-committed via SHA256 hash), client seed, nonce, and round identifier — allowing anyone to later verify fairness by checking the revealed server seed against the published commit.","failureModes":["Missing required query parameters (client_seed, nonce, min, max, round) result in an error response","min greater than or equal to max returns an invalid range error","Invalid nonce or round ID format may cause a 400 error","Payment failure (x402) if USDC is not provided or insufficient","Round not yet committed may return an error if commit step was skipped"],"whenToPreferThis":"Choose this endpoint when you need a single random integer with cryptographic provable fairness — i.e., the result can be verified post-draw by anyone who knows the server seed, client seed, and nonce. Ideal for games, lotteries, raffles, or any scenario requiring an auditable random draw. Prefer this over /fair/pick when selecting a number rather than a winner from a list, and over /fair/verify when you want to generate (not re-verify) a draw.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:08:37.528Z","isFirstParty":false}