# random/v1 — Random number generator

Generates cryptographically random integers using Go's standard library
(`crypto/rand`). An LLM asked for "a random number" produces a
plausible-looking but non-random guess (it's a deterministic function of
its context); this endpoint returns an actual one, drawn from the OS's
CSPRNG.

### `POST /v1/random/int`

**Request**

```json
{ "min": 1, "max": 6, "count": 3 }
```

- `min` (required) — lower bound, inclusive.
- `max` (required) — upper bound, inclusive. Must be >= `min`.
- `count` (optional, default `1`) — how many numbers to generate, 1-1000.

**Response**

```json
{ "numbers": [4, 1, 6] }
```

**Error response**

```json
{ "error": "min (10) must not be greater than max (1)" }
```

**Example**

```bash
curl -s -X POST https://apished.com/v1/random/int \
  -H 'Content-Type: application/json' \
  -d '{"min": 1, "max": 100}'
# {"numbers":[57]}
```

## Out of scope

Floats, weighted/non-uniform distributions, and shuffling — integers in a
range cover the common case; ask if you need more.

## Files

- `random.go` — module wiring (routes, HTTP handlers)
- `ints.go` — pure random-generation logic
- `ints_test.go` — range, count, and error tests
