{"uid":"cap_iRnwxWXDHOVLQuoYvc7Ht","slug":"logicnodes-random-from-block-d49ed308","name":"LogicNodes Random From Block","description":"Exact answers for AI agents: 40+ tools for EVM chains and Aptos, gas on 14 chains, never a guess. Free tier; pay per call in USDC (x402) on 13 networks.","url":"https://logicnodes.io/paid/v1/tools/random_from_block?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"max":{"type":"integer","maximum":1000000,"minimum":2},"salt":{"type":"string","maxLength":200,"minLength":1},"block":{"type":"string"},"chain":{"type":"string","description":"EVM CAIP-2 chain id such as eip155:8453, or a bare chain id number as a string. Chain names are refused."},"count":{"type":"integer","maximum":100,"minimum":1}}},"responseSchema":{"type":"json","example":{"ok":true,"tool":"random_from_block"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zY_NHtLfPDtv3n0bE2BXr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates one or more verifiable random numbers derived from a specified EVM blockchain block hash, using an optional salt for uniqueness.","exampleAgentPrompt":"Using LogicNodes, generate 5 random numbers between 1 and 1000 from the latest block on Base (eip155:8453), with the salt 'raffle-round-7'.","exampleUseCases":[{"title":"NFT raffle winner selection","prompt":"I need to pick 3 random winners from 500 NFT holders — can you generate 3 random numbers between 1 and 500 using the latest Ethereum block (eip155:1) with salt 'nft-raffle-2024' to make it verifiable?"},{"title":"Blockchain game random loot drop","prompt":"For my on-chain game, generate 10 random numbers between 1 and 100 using block 19800000 on Base (eip155:8453) with salt 'loot-drop-session-42' so the randomness is tied to the chain."},{"title":"Auditable random team assignment","prompt":"I'm running a DAO hackathon and need to randomly assign 8 participants to 2 teams — give me 8 random numbers between 1 and 2 from the current Polygon block (eip155:137) with salt 'hackathon-teams-Q3'."}],"resultDescription":"Returns a JSON object with ok: true, the tool name 'random_from_block', and an array of random integers derived from the specified block's hash, bounded by the max value provided and influenced by the optional salt. Results are deterministic for a given block+salt+max combination, making them auditable and verifiable.","failureModes":["Invalid or unrecognized chain format (chain names are rejected; must use CAIP-2 like eip155:8453 or bare numeric chain ID)","Block not found or too recent (block hasn't been confirmed yet)","max value out of range (must be between 2 and 1,000,000)","count out of range (must be between 1 and 100)","salt exceeds 200 characters","Payment failure via x402 protocol","Network or RPC unavailability for the requested chain"],"whenToPreferThis":"Choose this endpoint when you need blockchain-anchored, verifiable, tamper-resistant randomness tied to a specific block — ideal for smart contract lotteries, NFT raffles, game mechanics, or any scenario where the source of randomness must be auditable on-chain. Prefer it over off-chain random generators when provability and trustlessness matter, and over on-chain VRF solutions when you need a fast, cheap, off-chain computation that references real block data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T06:41:43.178Z","isFirstParty":false,"canonicalSlug":"logicnodes-random-from-block-d49ed308"}