# Agentshelf CSPRNG Random Value Generator

> Agentshelf CSPRNG Random Value Generator is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-20).

Generates cryptographically secure random integers, byte strings, or list selections using local CSPRNG with no network or seed dependency

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/random?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-csprng-random-value-generator-5af75b62
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Tb9WHOaQNol_7IsV7A0PK

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentshelf-csprng-random-value-generator-5af75b62 -d '<json body>'
```

Example prompt: Pick a random integer between 1 and 100 using a cryptographically secure source, and give me the audit ID.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentshelf-csprng-random-value-generator-5af75b62/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
