# AIMarket Fair Random (ECVRF)

> AIMarket Fair Random (ECVRF) is a paid API for AI agents from modelmarket.dev, paid per call via x402, $0.006/call, status unknown (last checked 2026-10-12).

Generates verifiable random bytes using an Elliptic Curve Verifiable Random Function (ECVRF) over a caller-supplied seed, returning both the random output and a cryptographic proof anyone can verify offline.

## Facts

- Endpoint: POST https://modelmarket.dev/x402/fair-random?utm_source=zero.xyz
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aimarket-fair-random-ecvrf-e87abc4c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wRvCTPX3WLzuzobCdTDQA

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 aimarket-fair-random-ecvrf-e87abc4c -d '<json body>'
```

Example prompt: Run a verifiable random draw for our raffle using the seed 'WorldCup2025FinalDraw' and give me 32 random bytes along with the ECVRF proof so participants can verify the result is fair.

## When to prefer this

Choose this endpoint when you need publicly auditable, tamper-proof randomness where participants must be able to verify the draw offline without trusting the operator — such as lotteries, raffles, NFT drops, or tie-breaks. The deterministic ECVRF property means committing the seed publicly before calling ensures no one (including the caller) can cherry-pick the outcome. Prefer this over a simple PRNG or opaque randomness source whenever fairness auditability is a requirement.

## Known failure modes

- Seed exceeds 4096 bytes — request rejected
- num_bytes outside 1–64 range — validation error
- Payment not attached or insufficient USDC — 402 Payment Required
- Malformed request body — 400 Bad Request

## How this service works

Verifiable random bytes for a draw, raffle or tie-break: an ECVRF output over your seed plus a proof anyone can check offline. The same seed always gives the same output, so publish the seed first.

## Output

Returns verifiable random bytes (1–64 bytes, default 32) derived deterministically from the input seed via ECVRF, along with a cryptographic proof. The proof allows any third party to independently verify offline that the output was faithfully computed from the committed seed without any manipulation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "seed": {
   "type": "string",
   "description": "the seed or message the draw is bound to (up to 4096 bytes)"
  },
  "num_bytes": {
   "type": "integer",
   "description": "output length, 1-64 (default 32)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {},
  "status": "ok",
  "receipt": {},
  "service": "fair-random",
  "capability_id": "sortes.draw@v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aimarket-fair-random-ecvrf-e87abc4c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from modelmarket.dev](https://www.zero.xyz/host/modelmarket.dev/llms.txt)
