# X Pay Random Data Generator

> X Pay Random Data Generator is a paid API for AI agents from www.api-xpay.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-02).

Returns a random hex string and integer with metadata including network and asset context, billed per-request via x402/USDC on Base.

## Facts

- Endpoint: GET https://www.api-xpay.com/x402/random?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-pay-random-data-generator-f3a0d3bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_b6I1Egy9lz-uU_lk5A86i

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 x-pay-random-data-generator-f3a0d3bc
```

Example prompt: Can you fetch me a random hex value and integer right now using the X Pay random data API — I just need one fresh random result billed to my USDC wallet on Base.

## When to prefer this

Choose this endpoint when you need a lightweight, on-demand random hex or integer value and are operating in a pay-per-use x402/USDC environment on Base. It is ideal for developers who want random data without managing a random-number-generator service themselves, and who are already integrated with x402 micropayment flows. Prefer alternatives if you need large volumes of random data (cost adds up per call), cryptographic-grade randomness with auditable entropy sources, or if you are not set up for USDC payments on Base.

## Known failure modes

- Payment failure: x402 payment not accepted or USDC balance insufficient — returns 402 Payment Required
- Invalid HTTP method: using POST or PUT returns method-not-allowed error
- Network error: Base network congestion may delay payment verification
- Malformed headers: non-string header values rejected by schema validation

## How this service works

Generate a random integer and hex bytes

## Output

A JSON object containing: a 16-byte random hex string ('hex'), a random integer ('integer'), the number of bytes ('bytes'), the blockchain network ('network': 'base'), the payment asset ('asset': 'USDC'), and a success boolean. Each call costs $0.005 USDC.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "a1b2c3d4e5f6789012345678abcdef01",
  "asset": "USDC",
  "bytes": 16,
  "integer": 123456789,
  "network": "base",
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-pay-random-data-generator-f3a0d3bc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.api-xpay.com](https://www.zero.xyz/host/www.api-xpay.com/llms.txt)
