{"uid":"cap_F83DwvZ4Ipx9n_MQhH836","slug":"saylor-innovations-secure-random-number-bytes-generator-d35fa8f8","name":"Saylor Innovations Secure Random Number & Bytes Generator","description":"Secure random integer in a range plus random bytes as hex and base64","url":"https://saylorinnovations.com/api/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"],"type":"string"},"queryParams":{"type":"object","properties":{"max":{"type":"string","description":"optional integer, default 100"},"min":{"type":"string","description":"optional integer, default 0"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["integer","hex"],"properties":{"hex":{"type":"string"},"max":{"type":"number","description":"Maximum value"},"min":{"type":"number","description":"Minimum value"},"bytes":{"type":"number","description":"Size in bytes"},"base64":{"type":"string"},"integer":{"type":"number"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CGViNCY_phnlOtNm0yjnv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a cryptographically secure random integer within a user-specified range plus 1–64 random bytes returned as both hex and base64 strings.","exampleAgentPrompt":"Give me a cryptographically secure random integer between 1 and 1000, plus 32 random bytes in both hex and base64 format.","exampleUseCases":[{"title":"Random nonce for cryptographic signing","prompt":"I need a fresh cryptographic nonce — give me a secure random integer between 0 and 2147483647 and 64 random bytes in hex so I can use it as a nonce for signing a message."},{"title":"Fair lottery number draw","prompt":"Pick a secure random number between 1 and 100 for our office lottery — and throw in 16 random bytes in base64 just so we can prove the draw was cryptographically unbiased."},{"title":"Random seed for procedural generation","prompt":"Generate a secure random integer between 0 and 999999 and give me 32 random bytes in both hex and base64 — I need an unpredictable seed for my procedural world generator."}],"resultDescription":"Returns a JSON object containing: the generated random integer (within the requested min–max range), the number of random bytes requested, those bytes encoded as a hex string, and those same bytes encoded as a base64 string, plus echoed min and max values.","failureModes":["Invalid or out-of-range byte count (outside 1–64) may result in an error response","Min greater than max yields an invalid range error","Payment failure (x402 protocol) blocks access and returns a 402 status","Network timeout or service unavailability returns a 5xx error"],"whenToPreferThis":"Choose this endpoint when you need cryptographically secure randomness — a random integer in a bounded range combined with raw random bytes — in a single call. It is especially useful when you need both a numeric random value and raw entropy (as hex/base64) simultaneously, such as for nonce generation, seeding, or unbiased selection. It costs $0.01 USDC per call via the x402 payment protocol, so prefer it when trust in randomness quality matters more than cost.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T06:53:43.933Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-secure-random-number-bytes-generator-d35fa8f8"}