{"uid":"cap_YhWi5kzhtSNOm0OGPNvXR","slug":"pyfile-toolkit-provably-fair-random-integer-draw-e4c1626b","name":"Pyfile Toolkit – 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:10000/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__IX23wfXv-6h9wQHPUH4U","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":"Returns a provably-fair random integer within a caller-defined range, derived from a committed server seed and a client-supplied seed and nonce.","exampleAgentPrompt":"For round 42, generate a provably-fair random integer between 1 and 500 using my client seed 'myseed2024' and nonce 7 — I need one I can verify against the committed hash later.","exampleUseCases":[{"title":"Fair lottery winner selection","prompt":"Pick a provably-fair random number between 1 and 200 for round 5 of my lottery, using client seed 'lotto2024' and nonce 1, so participants can verify it was fair."},{"title":"Verifiable game dice roll","prompt":"Roll a fair die for game round 99 — give me a random integer between 1 and 6 using my client seed 'player_alice' and nonce 3 so I can prove it to my opponent."},{"title":"Auditable random card draw","prompt":"Draw a provably-fair random integer between 1 and 52 for round 10, with client seed 'deck_shuffle' and nonce 2, so I can map it to a playing card and let anyone verify the draw."}],"resultDescription":"Returns a random integer within the requested min–max range, derived from a combination of the committed server seed (pre-published as a SHA-256 hash via the /fair/commit endpoint) and the caller's client seed and nonce. The result is deterministic given those inputs, allowing anyone to reproduce and verify it after the server seed is revealed.","failureModes":["Missing required query parameters (client_seed, nonce, min, max, round) return an error or unexpected result","Invalid round ID that has no prior commit may return an error or unverifiable result","min greater than max causes an invalid range error","Non-integer values for min, max, or nonce may be rejected","Network or server errors return HTTP 5xx"],"whenToPreferThis":"Choose this endpoint when you need a random integer that is cryptographically verifiable and provably fair — i.e., the server cannot retroactively manipulate the result. Ideal for lotteries, games, raffles, or any scenario where participants must be able to audit the randomness after the fact. Pair with the /fair/commit endpoint to obtain the server seed commitment before the draw.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:42:12.734Z","isFirstParty":false}