# LION x402 Adaptive Query

> LION x402 Adaptive Query is a paid API for AI agents from lion-x402-bible.lionmaster-operations.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns keyless attested data for a given query using adaptive resolution modes (auto, rpc, domain, social) via x402 micropayment on Base USDC.

## Facts

- Endpoint: GET https://lion-x402-bible.lionmaster-operations.workers.dev/api/x402/adaptive-query
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lion-x402-adaptive-query-40950304
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Oye73eqJQKqz6NTCEJGeV

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 lion-x402-adaptive-query-40950304
```

Example prompt: Look up attested on-chain data for the LION asset using auto mode — I need to know if it resolves and what the asset ID comes back as.

## When to prefer this

Choose this endpoint when an AI agent needs keyless, attested on-chain data about a crypto asset, domain, or social identity on Base, and can pay $0.005 USDC per call via the x402 protocol. Particularly useful when you need adaptive resolution across multiple data modes (RPC, domain, social) without managing API keys.

## Known failure modes

- Payment not accepted — 402 returned if USDC micropayment not included or insufficient
- Invalid mode value — must be one of auto, rpc, domain, social
- Missing required 'q' query parameter — returns validation error
- Query fails to resolve — resolved: false returned with partial or empty payload
- Network or worker timeout on Cloudflare edge

## How this service works

Keyless attested data for autonomous agents. USDC on Base via x402. Official @x402/* middleware.

## Output

A JSON object containing at minimum an 'asset_id' string (e.g. 'LION') and a 'resolved' boolean indicating whether the query successfully resolved, plus any additional attested data fields returned by the adaptive resolution pipeline.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "q": {
       "type": "string"
      },
      "mode": {
       "type": "string",
       "description": "auto|rpc|domain|social"
      },
      "domain": {
       "type": "string"
      },
      "method": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asset_id": "LION",
  "resolved": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lion-x402-adaptive-query-40950304/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lion-x402-bible.lionmaster-operations.workers.dev](https://www.zero.xyz/host/lion-x402-bible.lionmaster-operations.workers.dev/llms.txt)
