# Foundry Random Number Generator

> Foundry Random Number Generator is a paid API for AI agents from minty-sprout.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-01).

Generates cryptographically secure random numbers as integers in a range, dice rolls (e.g. 2d6), or coin flips using an OS CSPRNG.

## Facts

- Endpoint: POST https://minty-sprout.onrender.com/v1/random-number?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/foundry-random-number-generator-1ad0acb7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iiuOJnDxBQ8ZnaOmEHAWn

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 foundry-random-number-generator-1ad0acb7 -d '<json body>'
```

Example prompt: Roll 3d6 dice for me using a cryptographically secure random number generator.

## When to prefer this

Choose this endpoint when you need cryptographically secure random numbers (OS CSPRNG), not just pseudo-random output. Ideal for gaming, lotteries, simulations, or any scenario where unpredictable, tamper-resistant randomness matters. Supports flexible input formats including integer ranges with optional count, standard dice notation (NdS), and coin flips in a single unified API.

## Known failure modes

- Invalid input format — malformed dice notation or unrecognized command returns an error
- Count value too large or out of range may be rejected
- Non-numeric min/max values cause a parse error
- min greater than max produces an invalid range error
- Payment not provided or insufficient USDC causes 402 response

## How this service works

Random numbers from a secure RNG: integers in a range, dice like 2d6, or a coin flip. Input: '1 100', '1 100 5', '2d6' or 'coin'.

## Output

Returns a JSON object containing the type ('integer' or 'coin'), source ('OS CSPRNG'), min, max, and a 'values' array with one or more random results. For dice rolls, returns the summed or individual roll values; for coin flips, returns 'heads' or 'tails'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 8000,
   "description": "'min max [count]', 'NdS' dice, or 'coin'"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "max": 100,
  "min": 1,
  "type": "integer",
  "source": "OS CSPRNG",
  "values": [
   34
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/foundry-random-number-generator-1ad0acb7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from minty-sprout.onrender.com](https://www.zero.xyz/host/minty-sprout.onrender.com/llms.txt)
