# x402 Preflight

> x402 Preflight is a paid API for AI agents from preflight.kagurazaka.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Probes an x402 payment endpoint before you pay it, returning a safety verdict (ok/caution/avoid) with uptime history, buyer statistics, and price comparisons against similar listings.

## Facts

- Endpoint: GET https://preflight.kagurazaka.dev/v1/preflight?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-preflight-90f02660
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hkQRfU8EbzCT6zGStC4pI

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-preflight-90f02660
```

Example prompt: Before I pay it, can you run a preflight check on https://api.example.com/data to make sure it's legitimate, has good uptime, and isn't overpriced — flag it if it costs more than $0.01 per call?

## When to prefer this

Use this endpoint whenever an AI agent is about to make an x402 payment to an unknown or untrusted seller and needs a safety gate before committing funds. It is specifically designed for the x402 protocol ecosystem and provides richer signal than a generic HTTP health check by combining live probing, EIP-712 payment metadata validation, Bazaar buyer statistics, and price benchmarking in a single call.

## Known failure modes

- Target URL is unreachable or times out — probe returns live failure details but verdict may be caution/avoid
- EIP-712 domain or payTo address is malformed or missing — returned as a reason for caution/avoid
- Endpoint not listed in Bazaar — bazaar and history fields may be null with reduced verdict confidence
- URL parameter missing — request rejected with validation error
- max_price_usd exceeded by actual price — verdict set to avoid regardless of other signals
- Endpoint is valid but has no historical monitoring data — history field is null

## How this service works

Check an x402 seller before you pay it. Probes the endpoint now, checks that its payment can actually succeed (token EIP-712 domain, payTo), and adds its 30-day uptime from our monitor of paid Bazaar listings, how many distinct buyers paid it, and how its price compares with similar listings, with cheaper well-used alternatives. Returns a verdict (ok, caution, avoid) with the reasons.

## Output

A JSON object containing: a verdict string (ok, caution, or avoid); a reasons array explaining any issues; a live probe snapshot (HTTP status, latency, protocol version, price, networks, payTo address); a bazaar object with distinct payer count and call volume over 30 days; a history object with 30-day uptime ratio, median latency, last failure timestamp, and price changes; and a market object with the median price of similar listings and cheaper well-used alternatives.

## 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",
       "maxLength": 2048,
       "description": "https URL of the x402 endpoint you are about to pay"
      },
      "method": {
       "enum": [
        "GET",
        "POST"
       ],
       "type": "string",
       "description": "method you will call it with (default GET)"
      },
      "max_price_usd": {
       "type": "number",
       "description": "the most you are willing to pay per call; a higher price gives the verdict avoid"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "url",
      "verdict",
      "reasons"
     ],
     "properties": {
      "now": {
       "type": "object",
       "description": "the live probe: method, status, latency, protocol version, price, networks, payTo"
      },
      "url": {
       "type": "string"
      },
      "bazaar": {
       "type": "object",
       "description": "the CDP Bazaar listing: distinct payers and calls in 30 days"
      },
      "market": {
       "type": "object",
       "description": "median price of similar listings and cheaper alternatives with payers and uptime"
      },
      "history": {
       "type": "object",
       "description": "our monitor's 30-day record: probes, uptime (0-1), median latency, last failure, price changes; null when not monitored"
      },
      "reasons": {
       "type": "array",
       "description": "why the verdict is not ok; empty when it is"
      },
      "verdict": {
       "enum": [
        "ok",
        "caution",
        "avoid"
       ],
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-preflight-90f02660/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from preflight.kagurazaka.dev](https://www.zero.xyz/host/preflight.kagurazaka.dev/llms.txt)
