{"uid":"cap_zBAUE5bi80W0HqkW-ZAz4","slug":"agenttools-cryptographic-random-generator-6d566c6b","name":"AgentTools Cryptographic Random Generator","description":"Generate cryptographically secure randomness: passwords with charset rules, hex keys of any byte length, and uniform random integers (rejection sampling, no modulo bias). Never use Math.random for secrets. Use this when an agent needs to cSPRNG passwords, hex keys and uniform integers.","url":"https://agentstoolshub.com/api/v1/crypto/random-generator?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","required":[],"properties":{"max":{"type":"number","description":"Int maximum"},"min":{"type":"number","description":"Int minimum"},"mode":{"enum":["password","hex","int"],"type":"string","description":"Mode"},"upper":{"enum":["true","false"],"type":"string","description":"Include A–Z"},"digits":{"enum":["true","false"],"type":"string","description":"Include 0–9"},"length":{"type":"number","description":"Length (password/hex)"},"symbols":{"enum":["true","false"],"type":"string","description":"Include symbols"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"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_dNJebSBlducUJEuTOmFeQ","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 passwords, hex keys, and uniform random integers using a CSPRNG (rejection sampling, no modulo bias).","exampleAgentPrompt":"Generate a cryptographically secure random password that's 20 characters long and includes uppercase letters, digits, and symbols — no Math.random, I need this for a real secret.","exampleUseCases":[{"title":"Secure API key generation","prompt":"Generate a cryptographically secure 32-byte hex key I can use as an API secret — make sure it's CSPRNG, not Math.random."},{"title":"Random integer for token IDs","prompt":"Give me a cryptographically secure random integer between 100000 and 999999 with no modulo bias, I need it for a one-time token."},{"title":"Strong password for user account","prompt":"Create a secure random password that's 16 characters long with uppercase letters, digits, and symbols for a new user account."}],"resultDescription":"Returns a single generated value: a random password string matching the requested charset rules, a hex-encoded key of the specified byte length, or a uniform random integer within the specified [min, max] range. The response includes the generated value and metadata about the generation parameters used.","failureModes":["Missing required 'mode' parameter returns a 400 error","Invalid mode value (not 'password', 'hex', or 'int') returns a 400 error","For 'int' mode, missing min or max returns an error","min greater than or equal to max causes a validation error","Length of zero or negative for password/hex modes returns an error","Payment not provided or insufficient (x402) returns a 402 Payment Required"],"whenToPreferThis":"Use this endpoint whenever an agent needs cryptographically secure randomness — passwords, hex keys, or integers — rather than language-model-generated pseudo-random values or insecure Math.random. Prefer this over asking the LLM to generate a password, which is neither random nor secure. This endpoint guarantees CSPRNG quality with no modulo bias for integers and full charset control for passwords.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:49:28.029Z","isFirstParty":false,"canonicalSlug":"agenttools-cryptographic-random-generator-6d566c6b"}