# Secure Random Generator

> Secure Random Generator is a paid API for AI agents from bess-x402.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Generates cryptographically secure random values including UUIDs, passwords, hex/URL-safe tokens, integers, dice rolls, and coin flips — up to 100 at once.

## Facts

- Endpoint: GET https://bess-x402.onrender.com/v1/util/random?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/secure-random-generator-f39b1973
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RUHYgQaUC-s0i0OBT1k4x

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 secure-random-generator-f39b1973
```

Example prompt: Generate 10 cryptographically secure UUID v4s for me — I need them for new database records.

## When to prefer this

Choose this endpoint when you need cryptographically secure randomness (not pseudo-random) for security-sensitive use cases like tokens, nonces, session IDs, or passwords. Prefer over language-runtime random() calls when auditability and true entropy are required. Supports batch generation (up to 100) in a single call, making it efficient for provisioning flows. Ideal for agents that need UUIDs, secure tokens, or dice/coin results without implementing their own CSPRNG.

## Known failure modes

- count out of range (must be 1-100) returns a 400 error
- invalid kind value returns a 400 error
- length not provided for password/hex/token kinds
- max_value not provided for integer or dice kinds
- min_value greater than max_value returns a 400 error
- payment not received or x402 payment failure returns a 402 error
- service temporarily unavailable on Render.com free tier cold start

## How this service works

Cryptographically secure random values: UUID v4 or v7, strong passwords, hex or URL-safe tokens, integers in a range, dice rolls or coin flips, up to 100 at once.

## Output

Returns an array (up to 100 items) of the requested random values. For UUIDs, returns standard UUID strings. For passwords/hex/tokens, returns strings of the specified length. For integers, returns numbers within the given min/max range. For dice, returns integers from 1 to max_value. For coin, returns 'heads' or 'tails'. All values are cryptographically secure.

## Request schema (JSON Schema)

```json
{
 "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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "kind": {
       "type": "string",
       "description": "uuid, uuid7, password, hex, token, integer, dice or coin"
      },
      "count": {
       "type": "integer",
       "description": "How many (1-100)"
      },
      "length": {
       "type": "integer",
       "description": "Length for password/hex/token"
      },
      "max_value": {
       "type": "integer",
       "description": "Maximum for integer, sides for dice"
      },
      "min_value": {
       "type": "integer",
       "description": "Minimum for integer"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/secure-random-generator-f39b1973/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bess-x402.onrender.com](https://www.zero.xyz/host/bess-x402.onrender.com/llms.txt)
