# x402-random Random Number Generator

> x402-random Random Number Generator is a paid API for AI agents from x402-random.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Generates a random number within a caller-specified numeric range, delivered via a micropayment-gated API

## Facts

- Endpoint: POST https://x402-random.vercel.app/api/random
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-random-vercel-app-4ca2b7ce
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LSwJachxlQMz90ZFORAZR

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 x402-random-vercel-app-4ca2b7ce -d '<json body>'
```

Example prompt: Pick a random number between 1 and 500 for me.

## When to prefer this

Use this endpoint when you need a random number generated server-side via a simple API call and are operating in an x402 micropayment context; suitable for lightweight randomization tasks where a $0.01 USDC cost per call is acceptable.

## Known failure modes

- Invalid range (min greater than max) — likely returns 400 Bad Request
- Missing required range parameters — returns 400 with parameter error
- Payment not provided or insufficient — returns 402 Payment Required
- Service unavailable — returns 500 or timeout from Vercel serverless function

## How this service works

Random Number Generation Service - Returns a random number within the specified range

## Output

Returns a single random number that falls within the specified minimum and maximum range provided in the request.

## Example request

```json
{
 "max": 100,
 "min": 1
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "max": {
   "type": "number",
   "description": "Maximum value for random number (default: 100)"
  },
  "min": {
   "type": "number",
   "description": "Minimum value for random number (default: 1)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cost": {
   "type": "string"
  },
  "range": {
   "type": "object",
   "properties": {
    "max": {
     "type": "number"
    },
    "min": {
     "type": "number"
    }
   }
  },
  "network": {
   "type": "string"
  },
  "success": {
   "type": "boolean"
  },
  "timestamp": {
   "type": "string",
   "format": "date-time"
  },
  "randomNumber": {
   "type": "number"
  }
 },
 "description": "Random number generation result"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-random-vercel-app-4ca2b7ce/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-random.vercel.app](https://www.zero.xyz/host/x402-random.vercel.app/llms.txt)
