{"slug":"agentshelf-syntexa-ch-v1-random-9bef6b","title":"Call when an agent needs a CSPRNG value from local crypto","host":"agentshelf.syntexa.ch","method":"POST","resource":"https://agentshelf.syntexa.ch/v1/random","category":"code","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}. Exa","price_listed":0.001,"price_asked":null,"state":"effects","state_label":"Not tested: has real-world effects","checks_7d":0,"answered_7d":0,"latency_ms_median":null,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"max":10,"min":1,"mode":"int"},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"examples":[{"max":10,"min":1,"mode":"int"}],"properties":{"encoding":{"description":"Encoding for mode bytes. hex is the default. base64 is also accepted. Example: hex.","enum":["hex","base64"],"type":"string"},"items":{"description":"Comma-separated choices for mode choice. Example: red,green,blue. At most 100 items, each at most 64 characters. No seed.","maxLength":2048,"type":"string"},"max":{"description":"Inclusive upper bound for mode int. Example: 10. Must be greater than or equal to min. Required for int.","examples":[10],"type":"integer"},"min":{"description":"Inclusive lower bound for mode int. Example: 1. A safe integer. Required for int. Not a seed.","examples":[1],"type":"integer"},"mode":{"default":"int","description":"Random mode. int is the default. bytes returns n random bytes. choice picks from items. Example: int.","enum":["int","bytes","choice"],"examples":["int"],"type":"string"},"n":{"description":"Byte count for mode bytes. Example: 16. Minimum 1. Maximum 64.","maximum":64,"minimum":1,"type":"integer"},"shuffle":{"description":"When true with mode choice, also return a shuffled copy of items. Example: false. Default is false.","type":"boolean"}},"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":false,"examples":[{"audit_id":"00000000-0000-4000-8000-000000000000","billed":true,"bytes":null,"choice":null,"encoding":null,"int":1,"items_count":null,"max":10,"min":1,"mode":"int","n":null,"ok":true,"receipt_id":"rcpt_01EXAMPLE000000000000000","shuffled":null,"warnings":[]}],"properties":{"audit_id":{"examples":["00000000-0000-4000-8000-000000000000"],"type":"string"},"billed":{"examples":[true],"type":"boolean"},"bytes":{"examples":[null],"type":["string","null"]},"choice":{"examples":[null],"type":["string","null"]},"encoding":{"anyOf":[{"enum":["hex","base64"],"type":"string"},{"type":"null"}],"examples":[null]},"int":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[1]},"items_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[null]},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[10]},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[1]},"mode":{"enum":["int","bytes","choice"],"examples":["int"],"type":"string"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[null]},"ok":{"const":true,"examples":[true],"type":"boolean"},"receipt_id":{"examples":["rcpt_01EXAMPLE000000000000000"],"type":"string"},"shuffled":{"anyOf":[{"items":{"type":"string"},"maxItems":100,"type":"array"},{"type":"null"}],"examples":[null]},"warnings":{"default":[],"examples":[[]],"items":{"type":"string"},"type":"array"}},"required":["ok","receipt_id","billed","mode","audit_id","int","min","max","encoding","n","bytes","choice","shuffled","items_count"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[],"description_full":"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.","last_updated":"2026-10-19T07:32:09.941Z","schemes":["exact"]}