# x402 Preflight URL Inspector

> x402 Preflight URL Inspector is a paid API for AI agents from solana-x402-microtools-mainnet.valecity.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Probes a public HTTPS URL without following redirects and inspects whether it returns an x402 v2 payment-required challenge

## Facts

- Endpoint: GET https://solana-x402-microtools-mainnet.valecity.workers.dev/api/preflight?utm_source=zero.xyz
- Price: $0.01/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-url-inspector-5cc435e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_anwI8JdS-qbY1NkpE8-yT

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-url-inspector-5cc435e4
```

Example prompt: Can you probe https://api.example.com/data and tell me if it returns an x402 v2 payment challenge — and if so, what are the payment terms?

## When to prefer this

Use this endpoint when you need to determine programmatically whether a given HTTPS URL is protected by the x402 v2 micropayment protocol before attempting to call it, especially when building payment-aware agents or integrating with x402-gated APIs. Prefer it over generic HTTP HEAD tools when you specifically need x402 challenge parsing and structured payment terms extraction.

## Known failure modes

- URL is not a valid HTTPS URI with a public DNS hostname — request rejected
- URL uses a custom port, URL credentials, or secret-bearing query parameters — request rejected
- Target host is unreachable or DNS fails — error returned
- Target returns a redirect chain but redirects are not followed — only first response inspected
- x402 terms present but malformed — is_x402_v2 may be false even if 402 status returned

## How this service works

Probe one public HTTPS URL without following redirects; inspect x402 v2 challenge

## Output

Returns the target URL, HTTP status code, latency in milliseconds, a boolean indicating whether the URL serves an x402 v2 challenge, the payment terms object (or null if not x402), and the timestamp of the check.

## 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",
       "format": "uri",
       "maxLength": 1600,
       "description": "HTTPS URL with a public DNS hostname, no custom port, URL credentials or secret-bearing query parameters"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "target",
      "http_status",
      "latency_ms",
      "is_x402_v2",
      "terms",
      "checked_at"
     ],
     "properties": {
      "terms": {
       "type": [
        "object",
        "null"
       ]
      },
      "target": {
       "type": "string"
      },
      "checked_at": {
       "type": "string",
       "format": "date-time"
      },
      "is_x402_v2": {
       "type": "boolean"
      },
      "latency_ms": {
       "type": "integer"
      },
      "http_status": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-preflight-url-inspector-5cc435e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from solana-x402-microtools-mainnet.valecity.workers.dev](https://www.zero.xyz/host/solana-x402-microtools-mainnet.valecity.workers.dev/llms.txt)
