{"uid":"cap_L0q776cCG89RywiKKENyO","slug":"cryptographically-secure-random-string-generator-9d46999c","name":"Cryptographically Secure Random String Generator","description":"Cryptographically secure random string","url":"https://x402render-u5vwpxpyua-uc.a.run.app/random-string","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"length":{"type":"number","description":"number"},"alphabet":{"type":"string","description":"string (optional)"}}},"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_8Y6fNYt-b83yuJOYghL9E","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 string of a specified length, optionally from a custom alphabet","exampleAgentPrompt":"Generate a cryptographically secure random string that's 32 characters long, using only alphanumeric characters (letters and numbers).","exampleUseCases":[{"title":"Secure API key generation","prompt":"I need a cryptographically secure random string 48 characters long using uppercase letters, lowercase letters, and digits — something I can use as an API key."},{"title":"Random password with custom alphabet","prompt":"Generate a secure random password that's 20 characters long using only the characters A-Z, a-z, 0-9, and the special characters !@#$%."},{"title":"Session nonce for authentication","prompt":"Create a secure random nonce that's 16 characters long for a login session, using only hexadecimal characters (0-9 and a-f)."}],"resultDescription":"Returns a cryptographically secure random string of the requested length, drawn from the specified alphabet (or a default character set if no alphabet is provided). The response is a string suitable for use as tokens, nonces, passwords, or identifiers.","failureModes":["Invalid or missing length parameter — returns an error if length is not a valid number","Alphabet too short or empty — may return an error or fall back to a default character set","Very large length values may be rejected or result in timeout","Malformed request body — returns a 400-level error"],"whenToPreferThis":"Choose this endpoint when you need cryptographically secure randomness (not just pseudo-random), especially for security-sensitive use cases like tokens, session IDs, nonces, or passwords. Prefer this over client-side Math.random() or non-cryptographic generators when security guarantees matter. The custom alphabet parameter makes it particularly useful when character set constraints are required (e.g. URL-safe, hex-only, alphanumeric-only).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:34:09.631Z","isFirstParty":false}