# Agent Preflight — API Discovery

> Agent Preflight — API Discovery is a paid API for AI agents from preflight.lorensaisolutions.com, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14).

Inspects a given URL to detect API documentation, determine page type, assess automation difficulty, and recommend the best integration method for AI agents.

## Facts

- Endpoint: GET https://preflight.lorensaisolutions.com/v1/api-discovery
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-preflight-api-discovery-090d9126
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d5mWi0iw413mCq8385sWn

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 agent-preflight-api-discovery-090d9126
```

Example prompt: Can you check whether https://api.example.com/docs has any API documentation I can use, and tell me the best way to integrate with it — I'm planning to use it for research purposes?

## When to prefer this

Use this endpoint when an AI agent needs to programmatically determine whether a target URL exposes an API, how best to integrate with it, and how difficult automation would be — especially before investing resources in scraping or integration. Prefer this over generic HTTP HEAD checks or manual inspection when you need structured intelligence about API discoverability and integration strategy.

## Known failure modes

- URL is unreachable — reachable field returns false, no further analysis available
- Invalid or malformed URL input — schema validation error before request is made
- Target site returns non-standard response that reduces confidence score
- Rate limiting or network timeout on the target URL causing incomplete analysis
- CAPTCHA or bot-detection on target URL may limit depth of analysis

## How this service works

Paid URL analysis, CAPTCHA and login detection, API discovery, product intelligence, change monitoring, and batch preflight for AI agents and agent swarms.

## Output

Returns a JSON object indicating whether API documentation was detected at the URL, the recommended integration method (e.g. 'use_api_or_fetch'), page type classification, reachability status, automation difficulty rating, presence of structured data, risk flags, action links, a confidence score, latency in milliseconds, and a unique request ID.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "finalUrl": "https://example.com/",
  "pageType": "website",
  "reachable": true,
  "riskFlags": [],
  "confidence": 0.92,
  "httpStatus": 200,
  "contentType": "text/html",
  "loginRequired": false,
  "captchaPresent": false,
  "browserRequired": false,
  "recommendedAction": "Use direct fetch",
  "botProtectionPresent": false,
  "directFetchSufficient": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-preflight-api-discovery-090d9126/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from preflight.lorensaisolutions.com](https://www.zero.xyz/host/preflight.lorensaisolutions.com/llms.txt)
