# CSPRNG Random Integer Generator (Cloudflare Workers)

> CSPRNG Random Integer Generator (Cloudflare Workers) is a paid API for AI agents from money-reactor.makar52nn2016.workers.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-30).

Returns cryptographically secure random integers in a specified [min, max] range using crypto.getRandomValues for unbiased sampling

## Facts

- Endpoint: GET https://money-reactor.makar52nn2016.workers.dev/api/random?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/csprng-random-integer-generator-cloudflare-workers-dbefb1ea
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7LfHBEiEVv2GXZpTqJszY

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 csprng-random-integer-generator-cloudflare-workers-dbefb1ea
```

Example prompt: Give me 5 cryptographically secure random integers between 1 and 500 — I need them unbiased for a shuffle.

## When to prefer this

Choose this endpoint when you need cryptographically secure, unbiased random integers (e.g. for shuffles, canary rollout, simulation jitter, or lotteries) and cannot rely on a local PRNG. Prefer this over Math.random()-based generators when bias elimination or reproducible fairness is important. Ideal for agentic workflows that need randomness as a service without deploying their own crypto infrastructure.

## Known failure modes

- Invalid or missing min/max parameters — returns error if min >= max
- Non-integer or out-of-range parameter values cause malformed request error
- Payment not attached or insufficient USDC — returns 402 Payment Required
- Cloudflare Worker cold start or timeout — rare latency spike or 503
- n (count) too large — may be rejected or rate-limited

## How this service works

CSPRNG random integers in [min,max] via crypto.getRandomValues - unbiased sampling for shuffles, canary rollout, jitter and simulation

## Output

Returns a JSON object containing one or more cryptographically secure random integers sampled uniformly from the specified [min, max] range, including the parameters used (n, min, max, mode).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "n": 1,
     "max": 100,
     "min": 1,
     "mode": "int"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/csprng-random-integer-generator-cloudflare-workers-dbefb1ea/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from money-reactor.makar52nn2016.workers.dev](https://www.zero.xyz/host/money-reactor.makar52nn2016.workers.dev/llms.txt)
