{"uid":"cap_b6I1Egy9lz-uU_lk5A86i","slug":"x-pay-random-data-generator-f3a0d3bc","name":"X Pay Random Data Generator","description":"Generate a random integer and hex bytes","url":"https://www.api-xpay.com/x402/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","HEAD","DELETE"],"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"queryParams":{"type":"object","additionalProperties":{"type":"string"}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"hex":"a1b2c3d4e5f6789012345678abcdef01","asset":"USDC","bytes":16,"integer":123456789,"network":"base","success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.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_jiq_yDqocwrscrRlvbcUU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a random hex string and integer with metadata including network and asset context, billed per-request via x402/USDC on Base.","exampleAgentPrompt":"Can you fetch me a random hex value and integer right now using the X Pay random data API — I just need one fresh random result billed to my USDC wallet on Base.","exampleUseCases":[{"title":"Random nonce for session security","prompt":"I need a random hex nonce to use as a one-time token for a user session — can you call the X Pay random endpoint and give me what it returns?"},{"title":"Random seed for a simulation run","prompt":"Generate a random integer seed for my Monte Carlo simulation run right now using X Pay's random data API."},{"title":"Random test data for a demo","prompt":"I'm building a demo and need a quick random hex string and integer pair — grab one from X Pay's random generator and paste the result for me."}],"resultDescription":"A JSON object containing: a 16-byte random hex string ('hex'), a random integer ('integer'), the number of bytes ('bytes'), the blockchain network ('network': 'base'), the payment asset ('asset': 'USDC'), and a success boolean. Each call costs $0.005 USDC.","failureModes":["Payment failure: x402 payment not accepted or USDC balance insufficient — returns 402 Payment Required","Invalid HTTP method: using POST or PUT returns method-not-allowed error","Network error: Base network congestion may delay payment verification","Malformed headers: non-string header values rejected by schema validation"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, on-demand random hex or integer value and are operating in a pay-per-use x402/USDC environment on Base. It is ideal for developers who want random data without managing a random-number-generator service themselves, and who are already integrated with x402 micropayment flows. Prefer alternatives if you need large volumes of random data (cost adds up per call), cryptographic-grade randomness with auditable entropy sources, or if you are not set up for USDC payments on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T03:19:46.597Z","isFirstParty":false,"canonicalSlug":"x-pay-random-data-generator-f3a0d3bc"}