{"uid":"cap_apwy5u7RnUzOzLtM5tyUp","slug":"2s-io-verifiable-random-function-vrf-a22c2c10","name":"2s.io Verifiable Random Function (VRF)","description":"Verifiable random function — deterministic, publicly verifiable randomness bound to your seed and signed by the 2s key. proof = deterministic EIP-191 signature over the seed (same seed always yields the same proof, so the outcome cannot be re-rolled or cherry-picked); random = keccak256(proof), a uniform 32-byte value. Returns the seed, signed message, proof, signer address, random (hex + uint + float in [0,1)). Verify offline: recover the signer from (message, proof) and confirm keccak256(proof) == random. For provably-fair draws, lotteries, sortition, and tie-breaks between agents.","url":"https://2s.io/api/crypto/vrf","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"type":"object","required":["seed"],"properties":{"seed":{"type":"string","maxLength":256,"minLength":1,"description":"Any seed string — a request id, block hash, commitment, etc."}},"additionalProperties":false}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0025","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.0025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-L8Zu2PNGWIzVS2QOA2xy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates deterministic, publicly verifiable randomness from a seed string, signed with an EIP-191 signature so the result can be cryptographically verified offline","exampleAgentPrompt":"I need a provably fair random number for our lottery draw — use the seed 'round-42-block-0xabc123' and give me the signed proof so participants can verify the result wasn't rigged.","exampleUseCases":[{"title":"Verifiable sortition for committee selection","prompt":"We need to randomly select 5 members from our DAO contributor list for a governance committee — use the seed 'dao-sortition-round-7-2024-Q2' and give me the signed proof so anyone can verify the picks weren't cherry-picked."},{"title":"Provably fair tie-break between agents","prompt":"Two of our AI agents scored identically in the benchmark — can you generate a verifiable random tie-break using the seed 'agent-tiebreak-run-2024-11-01' and return the proof so both teams can independently confirm the winner was chosen fairly?"},{"title":"Auditable prize draw for competition","prompt":"We're running a hackathon and need to pick a winner from 200 finalists in a way that contestants can audit — generate a deterministic random draw from the seed 'hackathon-finals-2024' and give me everything needed to verify the result offline."}],"resultDescription":"Returns a JSON object containing: the original seed, the EIP-191 signed message, the proof (deterministic signature), the signer address, and the random value expressed as a hex string, a uint256, and a float in [0,1). All fields are needed to independently verify the result offline by recovering the signer from (message, proof) and confirming keccak256(proof) equals the random field.","failureModes":["Missing seed parameter returns 400/validation error","Seed exceeding 256 characters rejected","Payment not included or insufficient (x402 payment required, $0.001 USDC) returns 402","Network or server unavailability returns 5xx","Malformed request returns error before proof generation"],"whenToPreferThis":"Use this endpoint when you need randomness that is both deterministic (same seed always yields the same output) and publicly verifiable (anyone can check the result wasn't manipulated). Ideal for provably-fair draws, lotteries, sortition, and tie-breaks where auditability matters. Not suitable when you need truly unpredictable (non-deterministic) randomness or when the seed is known in advance to adversaries who could game the output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T07:12:38.601Z","isFirstParty":false}