{"uid":"cap_vKZrt9x0PGeG-2NhEW7EZ","slug":"blackwood-state-random-number-generator-x402-f10d175d","name":"Blackwood State Random Number Generator (x402)","description":"Use when you need a random number generator, dice rolls, a coin flip, a uuid or random bytes that no one can predict. Do not use for verifiable on-chain randomness (VRF) or reproducible seeded sequences. Returns JSON with cryptographically secure random values: integers in a range, dice rolls, coin flips, UUIDs or hex bytes, from the Workers Web Crypto CSPRNG for 0.005 USDC per call. Typical response time 500 ms (p95). Category: Infrastructure.","url":"https://x402-gateway.blackwoodstate8.workers.dev/v1/random?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["kind"],"properties":{"max":{"type":"integer","maximum":1000000000,"minimum":-1000000000,"description":"integer: highest value, inclusive (default 100)"},"min":{"type":"integer","maximum":1000000000,"minimum":-1000000000,"description":"integer: lowest value, inclusive (default 1)"},"kind":{"enum":["integer","dice","coin","uuid","bytes"],"type":"string","description":"integer (count values between min and max), dice (count rolls of a die with sides faces), coin (count flips), uuid (count UUID v4) or bytes (length random bytes as hex)"},"count":{"type":"integer","maximum":100,"minimum":1,"description":"How many values (1-100, default 1); ignored for bytes"},"sides":{"type":"integer","maximum":1000,"minimum":2,"description":"dice: faces of the die (default 6)"},"length":{"type":"integer","maximum":256,"minimum":1,"description":"bytes: how many random bytes (1-256, default 32)"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["kind","values","sum","generatedAt","source"],"properties":{"sum":{"type":["number","null"]},"kind":{"type":"string"},"next":{"type":"object","required":["service","tool","method","url","useWhen","sample"],"properties":{"url":{"type":"string","description":"Paid route of the next call"},"tool":{"type":"string","description":"MCP tool name of the same call"},"method":{"enum":["GET","POST"],"type":"string"},"sample":{"type":"string","description":"Free fixed sample of the whole family"},"service":{"type":"string","description":"Service id of the suggested next paid call"},"useWhen":{"type":"string","description":"When the next call is the right one"}},"description":"Suggested next paid call in the same family (call it in a loop when the task continues)","additionalProperties":false},"source":{"type":"string"},"values":{"type":"array","items":{"type":["number","string"]}},"generatedAt":{"type":"string"}},"additionalProperties":false}}}}},"responseSchema":{"type":"json","example":{"sum":5,"kind":"dice","source":"crypto.getRandomValues (Cloudflare Workers CSPRNG)","values":[4,1],"generatedAt":"2026-10-17T16:48:06.750Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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_V0dPHK8DW4NS5Dm8G0gBk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates cryptographically secure random values — integers, dice rolls, coin flips, UUIDs, or random bytes — via Workers Web Crypto CSPRNG, paid per call via x402.","exampleAgentPrompt":"Roll 3 six-sided dice and give me the results — I need cryptographically secure rolls, not a predictable sequence.","exampleUseCases":[{"title":"Secure random token generation","prompt":"Generate 32 random bytes as a hex string — I need something cryptographically unpredictable for a session nonce."},{"title":"Tabletop game dice roll","prompt":"Roll 4 twenty-sided dice for me and tell me the individual results and the total."},{"title":"Random winner selection","prompt":"Pick 5 random integers between 1 and 500 — I need them to be truly unpredictable for a raffle draw."}],"resultDescription":"Returns a JSON object containing the requested kind of random values (array of results), an optional sum (for numeric types), the generation timestamp, and the source/method used (Workers Web Crypto CSPRNG). May also include a 'next' suggestion for chaining calls.","failureModes":["Invalid 'kind' enum value — returns validation error","'count' outside 1–100 range — returns schema error","'length' outside 1–256 for bytes — returns schema error","'sides' outside 2–1000 for dice — returns schema error","Payment not included or insufficient — returns 402 Payment Required","Service timeout beyond 500ms p95 — rare but possible under load"],"whenToPreferThis":"Choose this endpoint when you need unpredictable, cryptographically secure random values for security tokens, nonces, game mechanics, or random selection — especially in agent workflows where reproducibility is undesirable. Prefer this over seeded PRNGs when you cannot afford predictability. Do not use if you need verifiable on-chain randomness (VRF) or reproducible sequences from a seed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T00:47:13.887Z","isFirstParty":false,"canonicalSlug":"blackwood-state-random-number-generator-x402-f10d175d"}