{"uid":"cap_yt6bjb8CzaBBGTaYdhmTq","slug":"plainchain-verifiable-random-number-generator-e6cd4c74","name":"Plainchain Verifiable Random Number Generator","description":"Gas, balances, token data, address type, approvals, transaction decoding, x402 receipt verification and verifiable randomness on Base, Arbitrum, Ethereum and Optimism. No API key: pay $0.001-$0.01 per call in USDC on Base via x402.","url":"https://plainchain.appin60.com/v1/random?utm_source=zero.xyz","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","required":[],"properties":{"max":{"type":"string","description":"integer range 1..max (default 100)"},"salt":{"type":"string","description":"optional salt, e.g. a raffle id"},"chain":{"type":"string","description":"base (default), arbitrum, ethereum or optimism; chain ids 8453, 42161, 1, 10 also work"},"sides":{"type":"string","description":"dice sides, 2-1000 (default 6)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"int":57,"max":100,"coin":"heads","dice":4,"block":36581662,"chain":"Base","sides":6,"blockHash":"0x9c1e..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001042","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.001042/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001042","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001042","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_d5GGewq6PlR1Wzr_XANH0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001042","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a cryptographically verifiable random number derived from on-chain block hash, with optional dice and coin-flip results, on Base, Arbitrum, Ethereum, or Optimism.","exampleAgentPrompt":"Roll a 20-sided die using on-chain randomness from Base — I need a verifiable result for a raffle I'm running with ID 'summer2025'.","exampleUseCases":[{"title":"On-chain raffle winner selection","prompt":"Pick a random number between 1 and 500 using blockchain randomness on Base, salted with my raffle ID 'nft-drop-july', so I can prove the result is fair."},{"title":"Tabletop game dice roll","prompt":"Roll a 6-sided die using on-chain randomness on Arbitrum for our game session — I need a verifiable result no one can dispute."},{"title":"Provably fair coin flip","prompt":"Flip a coin on Ethereum using a block hash so the result is verifiable and tamper-proof — I need to decide who goes first in a tournament."}],"resultDescription":"A JSON object containing: a random integer (int) in the requested range, the max value used, a coin flip string ('heads' or 'tails'), a dice roll integer, the block number and block hash from which the randomness is derived, the chain name, and the number of dice sides — all sourced from on-chain data for verifiability.","failureModes":["Invalid chain identifier returns an error","max or sides value out of allowed range (sides must be 2-1000, max must be >= 1) returns a validation error","Payment failure via x402 (insufficient USDC balance or wrong network) results in 402 response","Network/RPC issues on the target chain may cause delayed or failed block hash retrieval"],"whenToPreferThis":"Choose this endpoint when you need cryptographically verifiable, on-chain randomness that can be independently audited via block hash — ideal for lotteries, raffles, games, or any scenario where tamper-proof fairness is required. Prefer it over pseudo-random generation when the result must be publicly verifiable. It supports multiple EVM chains (Base, Arbitrum, Ethereum, Optimism) and requires no API key, paying per call in USDC via x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T06:38:53.799Z","isFirstParty":false,"canonicalSlug":"plainchain-verifiable-random-number-generator-e6cd4c74"}