{"uid":"cap_Tb9WHOaQNol_7IsV7A0PK","slug":"agentshelf-csprng-random-value-generator-5af75b62","name":"Agentshelf CSPRNG Random Value Generator","description":"Call when an agent needs a CSPRNG value from local crypto. mode is int, bytes, or choice. bytes n is at most 64. choice picks from a comma-separated list of at most 100 items, with optional shuffle. An audit id is returned. There is no seed. No network. Send JSON {\"mode\":\"int\",\"min\":1,\"max\":10}. Exact $0.001 USDC on Base. Try unpaid POST /v1/sandbox/random first.","url":"https://agentshelf.syntexa.ch/v1/random?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"n":{"type":"integer","maximum":64,"minimum":1,"description":"Byte count for mode bytes. Example: 16. Minimum 1. Maximum 64."},"max":{"type":"integer","examples":[10],"description":"Inclusive upper bound for mode int. Example: 10. Must be greater than or equal to min. Required for int."},"min":{"type":"integer","examples":[1],"description":"Inclusive lower bound for mode int. Example: 1. A safe integer. Required for int. Not a seed."},"mode":{"enum":["int","bytes","choice"],"type":"string","default":"int","examples":["int"],"description":"Random mode. int is the default. bytes returns n random bytes. choice picks from items. Example: int."},"items":{"type":"string","maxLength":2048,"description":"Comma-separated choices for mode choice. Example: red,green,blue. At most 100 items, each at most 64 characters. No seed."},"shuffle":{"type":"boolean","description":"When true with mode choice, also return a shuffled copy of items. Example: false. Default is false."},"encoding":{"enum":["hex","base64"],"type":"string","description":"Encoding for mode bytes. hex is the default. base64 is also accepted. Example: hex."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ttLG-Qal3pA_jm9lZf8mM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","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 integers, byte strings, or list selections using local CSPRNG with no network or seed dependency","exampleAgentPrompt":"Pick a random integer between 1 and 100 using a cryptographically secure source, and give me the audit ID.","exampleUseCases":[{"title":"Fair lottery winner selection","prompt":"I have a list of 10 contestants — alice,bob,carol,dave,eve,frank,grace,heidi,ivan,judy — can you securely pick one at random using a cryptographic RNG?"},{"title":"Session nonce generation","prompt":"Generate 32 cryptographically secure random bytes encoded as hex that I can use as a nonce for a new user session."},{"title":"Randomized quiz question order","prompt":"Shuffle this list of quiz topics for me using a CSPRNG: math,science,history,geography,art,music,sports,literature"}],"resultDescription":"Returns a JSON object containing the generated random value (integer, hex/base64 byte string, or chosen item), optionally a shuffled copy of the input list when mode is choice with shuffle enabled, and a unique audit ID string for traceability. No seed is accepted or returned.","failureModes":["min greater than max for int mode returns a validation error","n exceeding 64 for bytes mode is rejected","items list exceeding 100 entries or any item exceeding 64 characters is rejected","missing required fields for the selected mode (e.g. no min/max for int) returns a 400 error","insufficient USDC payment results in 402 Payment Required; use /v1/sandbox/random for unpaid testing","invalid encoding value (not hex or base64) returns a validation error"],"whenToPreferThis":"Choose this endpoint when you need verifiable, audit-trailed cryptographic randomness for integers, raw bytes, or list selection without any seed, network entropy source, or LLM involvement. It is ideal when tamper-evidence (via audit ID) matters, when you need up to 64 random bytes for nonces or tokens, or when you want a provably fair pick from a discrete set. Prefer alternatives if you need large volumes of random data, seeded/reproducible sequences, or randomness integrated into a broader statistical computation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:33:34.159Z","isFirstParty":false,"canonicalSlug":"agentshelf-csprng-random-value-generator-5af75b62"}