# x402 Doctor Preflight Check

> x402 Doctor Preflight Check is a paid API for AI agents from x402-doctor.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-14).

Validates an x402 payment endpoint before paying it, returning a go/caution/no_go verdict with the recommended payment option and detailed reasons

## Facts

- Endpoint: GET https://x402-doctor.onrender.com/api/v1/preflight?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-doctor-preflight-check-ed08610b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TI052caBS9Vv_ZmrfQKdw

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 x402-doctor-preflight-check-ed08610b
```

Example prompt: Before I pay that x402 endpoint at https://someapi.example.com/data, run a preflight check on it with a max budget of $0.05 and tell me if it's safe to pay on the Base network (eip155:8453).

## When to prefer this

Use this endpoint whenever an AI agent is about to make a payment to an x402-enabled API and needs a safety check first — especially when the endpoint is unfamiliar, budget constraints matter, or you need to confirm token/network compatibility before committing funds. It is the right choice when you want a non-paying diagnostic that surfaces price mismatches, HTTPS issues, and unknown tokens before any transaction occurs. Prefer it over blindly calling the target endpoint when operating in automated pipelines where a bad payment could waste funds or expose the agent to fraudulent endpoints.

## Known failure modes

- Target URL is unreachable or returns non-402 status — endpoint reports it cannot inspect the payment challenge
- Target endpoint uses an unknown or unsupported token — flagged as 'unknown token' reason with no_go verdict
- Budget (max_usd) is below the endpoint's price — verdict becomes no_go with over-budget reason
- Endpoint is not served over HTTPS — flagged as a no_go safety issue
- Malformed or missing x402 payment headers at the target — diagnosis shows format errors in reasons
- x402 Doctor itself may be temporarily unavailable on the Render free tier (cold start latency or downtime)

## How this service works

Is this x402 endpoint safe to pay? Check it before your AI agent pays: go / caution / no_go, the recommended payment option, and why (payment would fail, over your budget, price above advertised, not HTTPS, unknown token). Never pays the endpoint. Cached 10 min.

## Output

Returns a verdict ('go', 'caution', or 'no_go'), a safe_to_pay boolean, a human-readable summary, a recommended payment option index, an array of payment options (each with USD cost, network, token symbol, pay-to address, and a list of problems), and a reasons array with severity levels ('no_go', 'caution', 'info') and machine-readable codes explaining the decision. Results are cached for 10 minutes.

## 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",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "The x402 endpoint you are about to pay."
      },
      "method": {
       "enum": [
        "GET",
        "POST"
       ],
       "type": "string",
       "description": "HTTP method you will call it with. Default: try GET, then POST."
      },
      "max_usd": {
       "type": "string",
       "description": "Your budget per call in USD; above it the verdict is no_go."
      },
      "network": {
       "type": "string",
       "description": "CAIP-2 network you want to pay on, e.g. eip155:8453 or solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "url",
      "verdict",
      "safe_to_pay",
      "summary",
      "options",
      "reasons"
     ],
     "properties": {
      "url": {
       "type": "string"
      },
      "cached": {
       "type": "boolean"
      },
      "method": {
       "type": [
        "string",
        "null"
       ]
      },
      "options": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "index",
         "payable",
         "problems"
        ],
        "properties": {
         "usd": {
          "type": [
           "number",
           "null"
          ]
         },
         "index": {
          "type": "integer"
         },
         "amount": {
          "type": [
           "string",
           "null"
          ]
         },
         "pay_to": {
          "type": [
           "string",
           "null"
          ]
         },
         "network": {
          "type": [
           "string",
           "null"
          ]
         },
         "payable": {
          "type": "boolean"
         },
         "problems": {
          "type": "array",
          "items": {
           "type": "string"
    
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://ichimoku-signal.onrender.com/signal/BTC-USDT",
  "cached": false,
  "method": "GET",
  "options": [
   {
    "usd": 0.02,
    "index": 0,
    "amount": "20000",
    "pay_to": "0x6B0F4651eD42893ab58139938175E4a69f175F25",
    "network": "eip155:8453",
    "payable": true,
    "problems": [],
    "asset_symbol": "USDC",
    "network_name": "Base"
   }
  ],
  "reasons": [],
  "signals": {
   "https": true,
   "advertised_price_usd": 0.02,
   "listed_in_cdp_bazaar": false
  },
  "summary": "OK to pay: $0.02 on Base.",
  "verdict": "go",
  "checked_at": "2026-09-23T17:00:00.000Z",
  "safe_to_pay": true,
  "recommended_option": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-doctor-preflight-check-ed08610b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-doctor.onrender.com](https://www.zero.xyz/host/x402-doctor.onrender.com/llms.txt)
