{"uid":"cap_v_eYiIWEWkWDymRP7D6rz","slug":"openverbs-random-bytes-generator-0a0e74ac","name":"OpenVerbs Random Bytes Generator","description":"Generate cryptographically-secure random bytes, returned as hex, base64 or base64url.","url":"https://random.openverbs.com/v1/bytes","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":["count"],"properties":{"count":{"type":"integer","maximum":4096,"minimum":1,"description":"Number of random bytes."},"encoding":{"enum":["hex","base64","base64url"],"type":"string","description":"Output encoding (hex, base64, base64url). Default hex."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"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_2vA_koOdPqWq9bIwumgb2","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 cryptographically-secure random bytes returned in hex, base64, or base64url encoding","exampleAgentPrompt":"Generate 32 cryptographically-secure random bytes and return them as a base64url string.","exampleUseCases":[{"title":"Generating a secure session token","prompt":"I need a secure random token for a new user session — give me 32 bytes encoded as base64url."},{"title":"Creating a cryptographic nonce","prompt":"Generate 16 random bytes in hex format to use as a nonce for my AES encryption."},{"title":"Producing a random password salt","prompt":"Give me 64 cryptographically-secure random bytes in base64 so I can use them as a salt when hashing passwords."}],"resultDescription":"Returns a JSON object containing a string of random bytes encoded in the requested format (hex, base64, or base64url). The byte count matches the requested count (1–4096 bytes), and defaults to hex encoding if none is specified.","failureModes":["Count out of range (must be 1–4096): validation error returned","Invalid encoding enum value: request rejected","Missing required 'count' field: error response","Payment failure (x402): 402 response if USDC payment not provided or insufficient"],"whenToPreferThis":"Choose this endpoint when you need cryptographically-secure randomness (not pseudo-random) and want output directly in a web-safe or binary-compatible encoding (hex, base64, base64url). Ideal for generating tokens, nonces, salts, or keys. Prefer over sibling endpoints when the output is raw bytes rather than integers or strings from a charset.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:34:26.606Z","isFirstParty":false}