{"uid":"cap_g7K3BqrGbv696EyB5OkNC","slug":"api-anchor-x402-com-6e181fb3","name":"Anchor X402 Verifiable RNG — Signed Random Integer Roll","description":"Verifiable RNG — cryptographically-random integer(s) signed by the treasury key. Drop-in VRF for game studios. $0.001 USDC.","url":"https://api.anchor-x402.com/v1/roll","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":{"required":["low","high"],"properties":{"low":{"type":"integer","description":"Inclusive low bound of the integer range."},"high":{"type":"integer","description":"Inclusive high bound. Must be >= low."},"count":{"type":"integer","default":1,"maximum":100,"minimum":1,"description":"How many integers to sample. 1-100."},"label":{"type":"string","maxLength":200,"description":"Optional caller tag, included in the signed payload."},"commitment":{"type":"string","description":"Optional 32-byte hex pre-commitment from the caller."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"count":1,"label":"treasure_drop_42","range":[1,100],"domain":"anchor-x402/roll/v1","result":[47],"scheme":"eip191","signer":"0x127462e296fAc1A7F5cF33bA57bB2f0FFf5cD0B6","signature":"0x6b3e2a7c…","commitment":null,"input_hash":"f4a1c5e3b9d8a2e0c7b4f6d9e1a3c8b5f7d2e4a9c1b6e8f3d5a7c2b4e9f1d6a8","result_hash":"8a6d1f9e4b2c7a3e5f0c9b8a4d2f6e1c3b7a5f9d2e8c4b6a1f3e7d5c9b2a4f6e"}},"example":{"request":{"input":{"body":{"low":1,"high":100,"count":3,"label":"qa-test-game-round"},"type":"http","method":"POST","bodyType":"json"}},"response":{"count":3,"label":"qa-test-game-round","range":[1,100],"domain":"anchor-x402/roll/v1","result":[36,68,62],"scheme":"eip191","signer":"0x127462e296fAc1A7F5cF33bA57bB2f0FFf5cD0B6","signature":"0xbddba170cffc3c9691a878aeaf9a56fe24b163b305253cf867a2085e3f17d9467eac17f57c56d4617cfbebf80e0ef82181412bd41c0fabd2bc9b6e6300ea63a61b","commitment":null,"input_hash":"79ef6e517f1ef9cf8dbebf88fb0e8dad36aa2c11243dcc09c52a9d3ec2f5dd35","result_hash":"81123c53f2e0d1e3c6c8efcbf2b2f0530319abd5988711f5231d7dd8a2d13f77"}},"exampleRequest":{"low":1,"high":100,"count":3,"label":"qa-test-game-round"},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zsq2IWENPDGbn8Ok5Lwup","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns one or more cryptographically-random integers signed by a treasury key, providing a drop-in verifiable random function (VRF) for games and applications.","exampleAgentPrompt":"Roll 3 random integers between 1 and 100 for my on-chain game round — I need each result cryptographically signed by the treasury key so players can verify the roll wasn't tampered with.","exampleUseCases":null,"resultDescription":"Returns one or more random integers accompanied by a cryptographic signature from the treasury key, allowing callers to independently verify the randomness was not manipulated. The signed payload binds the output to the specific request.","failureModes":["Payment not included or insufficient — 402 response requiring $0.001 USDC via x402 protocol","Invalid range parameters (e.g. min >= max) — 400 bad request","Request for zero or negative count of integers — 400 validation error","Treasury key signing service unavailable — 503 service unavailable","Rate limiting exceeded — 429 too many requests"],"whenToPreferThis":"Choose this endpoint when you need provably fair, verifiable randomness where players, users, or auditors must be able to independently confirm the result was not predetermined or manipulated. Ideal for game studios needing a drop-in VRF without running their own beacon, NFT trait generation requiring on-chain verifiability, or any application where cryptographic proof of randomness integrity is required. At $0.001 USDC per call it is cost-effective for high-frequency gaming scenarios.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:48:33.246Z","isFirstParty":false}