# 3HZ Verified Random Integer

> 3HZ Verified Random Integer is a paid API for AI agents from wallet-services-poc-clean-mainnet.3hz-services.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-18).

Returns a cryptographically verifiable random integer within a user-specified inclusive range, backed by the public drand Quicknet randomness beacon with full proof data.

## Facts

- Endpoint: GET https://wallet-services-poc-clean-mainnet.3hz-services.workers.dev/verified-random
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/3hz-verified-random-integer-87c17957
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KR4vylV2WIpSSxmWefPRL

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 3hz-verified-random-integer-87c17957
```

Example prompt: Give me a verifiable random integer between 1 and 500, including the drand beacon signature and round number so I can confirm the result is legit.

## When to prefer this

Choose this endpoint when you need a random integer that is publicly auditable and cryptographically verifiable — for use cases like lotteries, raffles, games, or any scenario where participants must be able to independently confirm the randomness was not manipulated. Prefer this over a standard PRNG or non-verifiable random API when fairness guarantees and auditability matter.

## Known failure modes

- Invalid min/max values (e.g. min greater than max) result in a 400-level error
- drand beacon temporarily unavailable causes a service error
- Payment not included or invalid results in a 402 Payment Required response
- Non-integer query parameter values cause a validation error

## How this service works

Cryptographically verifiable random integer generated from the public drand Quicknet randomness beacon. Choose inclusive min and max values. The response includes the drand round, randomness and signature so the result can be independently checked.

## Output

A JSON object containing: the generated integer value within the requested range, the inclusive min and max used, the drand round number, the raw randomness hex string, the beacon signature, the chain hash, the algorithm name, the source URL, and a fetched_at timestamp — enabling full independent verification of the random output.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "max": {
       "type": "integer",
       "default": 100,
       "description": "Inclusive maximum integer"
      },
      "min": {
       "type": "integer",
       "default": 1,
       "description": "Inclusive minimum integer"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "value",
      "min",
      "max",
      "round",
      "randomness",
      "signature",
      "source",
      "chain_hash",
      "algorithm",
      "fetched_at"
     ],
     "properties": {
      "max": {
       "type": "integer"
      },
      "min": {
       "type": "integer"
      },
      "round": {
       "type": "integer"
      },
      "value": {
       "type": "integer"
      },
      "source": {
       "type": "string"
      },
      "algorithm": {
       "type": "string"
      },
      "signature": {
       "type": "string"
      },
      "chain_hash": {
       "type": "string"
      },
      "fetched_at": {
       "type": "string"
      },
      "randomness": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/3hz-verified-random-integer-87c17957/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from wallet-services-poc-clean-mainnet.3hz-services.workers.dev](https://www.zero.xyz/host/wallet-services-poc-clean-mainnet.3hz-services.workers.dev/llms.txt)
