# ForgeMesh HMAC Random Draw

> ForgeMesh HMAC Random Draw 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 cryptographically fair random number in a user-specified range using a revealed server seed combined with a client seed, enabling provably fair, verifiable randomness.

## Facts

- Endpoint: POST https://x402.forgemesh.io/hmac-random-draw
- 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-hmac-random-draw-2f128d25
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ag9r3vTdCe5Do1kSoHHVD

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-hmac-random-draw-2f128d25 -d '<json body>'
```

Example prompt: Give me a provably fair random number between 1 and 50 using my client seed 'sunset-42-phoenix' — I need the server seed revealed afterward so I can verify the draw was honest.

## When to prefer this

Choose this endpoint when you need randomness that is verifiably fair to all parties — neither the server nor the client could have predicted or biased the result in advance. Ideal for games, lotteries, random sampling, or fair assignment logic between untrusted participants. Prefer over a simple random number generator when auditability and provability of fairness are required.

## Known failure modes

- Invalid min/max range (e.g. min >= max) returns a 400 error
- Missing or malformed client_seed may produce unverifiable results
- Payment failure via x402 protocol blocks the request
- Server-side seed generation failure returns a 500 error

## How this service works

Cryptographic random number draw with a revealed server seed for after-the-fact verification: combine it with your own client seed to get a number in your chosen range that neither party could have predicted or manipulated in advance. For games, sampling, and fair-assignment logic between untrusted parties.

## Output

Returns a random number within the requested min/max range, along with the server seed used in the HMAC computation, so the caller can independently verify the result by combining the server seed with their client seed and confirming the output matches.

## 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-hmac-random-draw-2f128d25/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)
