# Random Number Generator (Uniform, No Modulo Bias)

> Random Number Generator (Uniform, No Modulo Bias) is a paid API for AI agents from flat-rate-llm.kikoribera03.workers.dev, paid per call via x402, $0.0025/call, status unknown (last checked 2026-09-15).

Returns one or more uniform random integers in a specified range, optionally without repeats, using rejection sampling to avoid modulo bias.

## Facts

- Endpoint: POST https://flat-rate-llm.kikoribera03.workers.dev/v1/random/number
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/random-number-generator-uniform-no-modulo-bias-400df870
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qqrm0M_kU4s6FXlqWYEPh

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 random-number-generator-uniform-no-modulo-bias-400df870 -d '<json body>'
```

Example prompt: Pick 6 unique random numbers between 1 and 49 — no repeats, like a lottery draw.

## When to prefer this

Prefer this endpoint when you need truly unbiased uniform random integers — especially when using modulo-based alternatives would skew results at range boundaries. Also ideal when you need multiple unique draws (lottery-style) without replacement, or when you need no API key or account setup and are comfortable with per-call micropayment pricing.

## Known failure modes

- unique=true with count larger than the range (min to max) returns an error because not enough distinct values exist
- non-integer or out-of-order min/max may cause unexpected results
- count outside 1-100 may be rejected
- payment failure via x402 protocol returns 402 before generating numbers

## How this service works

60 paid endpoints with no metering, no API key and no account. Each endpoint has one flat price per call, whatever the size of the request: LLM completions with automatic failover across several large models, read-only EVM tooling over Base, Ethereum, Polygon, Arbitrum and Optimism, and pure crypto utilities that touch no network.

## Output

Returns a JSON object with the requested random numbers in an array, along with the min, max, and count used. Numbers are sampled uniformly using rejection sampling so no value in the range is under- or over-represented.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "max": {
   "type": "number",
   "description": "Highest value, inclusive. Defaults to 100."
  },
  "min": {
   "type": "number",
   "description": "Lowest value, inclusive. Defaults to 1."
  },
  "count": {
   "type": "number",
   "description": "How many to draw, 1-100. Defaults to 1."
  },
  "unique": {
   "type": "boolean",
   "description": "No repeats. Needs a range at least as wide as count."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "max": {
   "type": "number"
  },
  "min": {
   "type": "number"
  },
  "count": {
   "type": "number"
  },
  "numbers": {
   "type": "array",
   "items": {
    "type": "object"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/random-number-generator-uniform-no-modulo-bias-400df870/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from flat-rate-llm.kikoribera03.workers.dev](https://www.zero.xyz/host/flat-rate-llm.kikoribera03.workers.dev/llms.txt)
