# OpenAPI Preflight Validator

> OpenAPI Preflight Validator is a paid API for AI agents from base-agent-preflight.bytoken2023.workers.dev, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-14).

Validates a public OpenAPI JSON or YAML document for server URLs, authentication declarations, operation coverage, and content fingerprint.

## Facts

- Endpoint: GET https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/web/openapi-preflight
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openapi-preflight-validator-4fdd5912
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VgkUR5DiG_M7A9NbK886R

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 openapi-preflight-validator-4fdd5912
```

Example prompt: Can you run a preflight check on this OpenAPI spec at https://petstore3.swagger.io/api/v3/openapi.json — I want to know if the server URLs, auth declarations, and operation coverage all look valid before I start integrating it.

## When to prefer this

Use this endpoint when you need to validate a public OpenAPI document before integrating with an API — particularly when you care about server URL reachability, authentication scheme correctness, operation coverage completeness, and content fingerprinting. Prefer it over generic HTTP validators when you need OpenAPI-specific structural checks.

## Known failure modes

- URL not reachable or returns non-200 — document fetch failure
- URL does not point to valid JSON or YAML — parse error
- OpenAPI document missing required fields (info, paths) — schema validation failure
- Server URL in the spec is unreachable — server URL check failure
- Authentication scheme declared but malformed — auth declaration warning
- Request missing required `url` query parameter — 400 bad request

## How this service works

Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.

## Output

Returns a structured assessment including network and product identity, activity summary, authentication declarations found, operation coverage metrics, content fingerprint, and an overall provenance report for the OpenAPI document.

## 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",
       "pattern": "^https?://",
       "maxLength": 2048,
       "description": "Public OpenAPI JSON or YAML document URL."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "network": {
       "type": "string"
      },
      "product": {
       "type": "string"
      },
      "activity": {
       "type": "object"
      },
      "identity": {
       "type": "object"
      },
      "assessment": {
       "type": "object"
      },
      "provenance": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "product": "openapi-spec-preflight",
  "assessment": {
   "flags": [],
   "risk_level": "low",
   "risk_score": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openapi-preflight-validator-4fdd5912/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-agent-preflight.bytoken2023.workers.dev](https://www.zero.xyz/host/base-agent-preflight.bytoken2023.workers.dev/llms.txt)
