# QuantaFlow x402 API Gateway – OpenTDB Proxy

> QuantaFlow x402 API Gateway – OpenTDB Proxy is a paid API for AI agents from quanta-roan.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Proxies requests to the Open Trivia Database (OpenTDB) API via an x402 micropayment-gated gateway, charging $0.01 USDC per call.

## Facts

- Endpoint: POST https://quanta-roan.vercel.app/api/service/opentdb?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/quantaflow-x402-api-gateway-opentdb-proxy-6165c66c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ANbnZCOwb-2oyhhABxIuI

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 quantaflow-x402-api-gateway-opentdb-proxy-6165c66c -d '<json body>'
```

Example prompt: Fetch me 10 medium-difficulty multiple-choice trivia questions from the Science & Nature category using the OpenTDB gateway — pay the $0.01 USDC per-call fee automatically.

## When to prefer this

Choose this endpoint when you need pay-per-use access to OpenTDB trivia data without managing an API key, want to consume trivia data via x402 micropayments (USDC on-chain), or are building a web3-native application where all external API calls should go through a crypto payment rail. Prefer alternatives (direct OpenTDB API) if you need high-volume access where per-call costs would accumulate significantly.

## Known failure modes

- Payment failure: insufficient USDC balance or x402 payment rejection returns a 402 Payment Required error
- Invalid path: incorrect OpenTDB path segment results in a 404 or upstream error passthrough
- Malformed query parameters: upstream OpenTDB validation errors are passed through as-is
- Rate limiting: OpenTDB upstream may throttle requests even if payment succeeds
- Network error: Vercel-hosted gateway unavailability returns a 5xx error

## How this service works

Every request, a quantum of value. x402 protocol-based payment endpoint for web3/DeFi tools.

## Output

The raw upstream OpenTDB API response is passed through after successful payment verification — typically a JSON object containing an array of trivia question objects with fields like question text, correct answer, incorrect answers, category, difficulty, and type (multiple choice or boolean).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "body": {
   "type": "string",
   "description": "Optional JSON body forwarded to POST requests."
  },
  "path": {
   "type": "string",
   "description": "Path below the selected upstream origin."
  },
  "query": {
   "type": "object"
  },
  "method": {
   "enum": [
    "GET",
    "POST"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "description": "The upstream response body and content type are passed through after successful payment."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/quantaflow-x402-api-gateway-opentdb-proxy-6165c66c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from quanta-roan.vercel.app](https://www.zero.xyz/host/quanta-roan.vercel.app/llms.txt)
