# ForgeMesh Provably Fair Random Number Generator

> ForgeMesh Provably Fair Random Number Generator is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Generates a random integer within a specified range and returns an HMAC-SHA256 server seed for post-draw verification, enabling provably fair randomness.

## Facts

- Endpoint: POST https://x402.forgemesh.io/random-number
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forgemesh-provably-fair-random-number-generator-ea154076
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zR81W7J3iLj4fGGv3ocs2

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 forgemesh-provably-fair-random-number-generator-ea154076 -d '<json body>'
```

Example prompt: Roll me a provably fair random number between 1 and 500 using my seed 'myRaffle2024' so I can verify the draw afterward.

## When to prefer this

Choose this endpoint when you need auditable, provably fair randomness — such as for games, public raffles, giveaways, or any tie-breaking scenario where participants must be able to verify the result was not tampered with. Unlike a plain RNG, it returns an HMAC-SHA256 server seed for post-draw verification and supports a client seed for combined fairness.

## Known failure modes

- Invalid min/max values (e.g. min greater than max) resulting in a 400 error
- Non-numeric min or max strings causing parsing errors
- Payment failure or insufficient USDC balance blocking the request
- Server-side seed generation failure returning a 500 error

## How this service works

Random number API with proof: an integer in your range plus the HMAC-SHA256 server seed revealed so the draw is verifiable after the fact. Provably fair randomness for games, raffles, and tie-breaking agents.

## Output

Returns a random integer within the requested min-max range, along with the HMAC-SHA256 server seed so the caller can independently verify the draw was fair and not manipulated after the fact.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "max": {
   "type": "string",
   "description": "default 100"
  },
  "min": {
   "type": "string",
   "description": "default 1"
  },
  "client_seed": {
   "type": "string",
   "description": "your seed for verifiability"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "proof": "HMAC-SHA256(server_seed, client_seed) first 4 bytes mod range — recompute to verify",
  "value": 4,
  "server_seed_revealed": "e3b1..."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forgemesh-provably-fair-random-number-generator-ea154076/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
