# Forest Gas Station URL Preflight

> Forest Gas Station URL Preflight is a paid API for AI agents from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Performs a bounded HTTP HEAD/GET preflight on a public URL, returning origin status, final URL, redirect chain, response headers, cache validators, and optional SHA256 body hash.

## Facts

- Endpoint: POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/url/preflight?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forest-gas-station-url-preflight-19c89995
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_n7zlEz6laFeUfmCgXeVqw

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 forest-gas-station-url-preflight-19c89995 -d '<json body>'
```

Example prompt: Can you do a preflight check on https://example.com/report.pdf and tell me the final URL, HTTP status, and what Content-Type header it returns?

## When to prefer this

Choose this endpoint when you need lightweight HTTP metadata about a URL — status, headers, redirects, cache validators — without downloading the full body. Ideal as a pre-flight step before heavier scraping or download operations, or for validating that a link is live and resolves correctly. Prefer this over full-page scrapers when you only need HTTP-level metadata, not page content or JavaScript-rendered output.

## Known failure modes

- Invalid or non-public URL (private IP, reserved DNS, credentials included) — rejected before network call, not settled
- Timeout after 8 seconds — request fails, not charged
- Response body exceeds 2 MiB cap — truncated, SHA256 not computed
- Origin server returns 4xx/5xx — reported as observation, still charged on success path
- HTTPS downgrade attempt rejected
- Non-port-80/443 URLs rejected

## How this service works

Inspect a public URL with HEAD; GET only on 405/501. Return origin status, final URL, headers, cache validators and up to 5 redirects. Limits: 8s, 2 MiB. Origin 4xx/5xx are observations; length is unverified and SHA256 covers only complete GET bodies. No JavaScript, login or availability guarantee. Base mainnet USDC

## Output

Returns the HTTP status code, final resolved URL, up to 5 redirect hops, all response headers, cache validators (ETag, Last-Modified), content length (unverified), and SHA256 hash of the body (only for complete GET responses where HEAD returned 405/501). Response is bounded to 8 seconds and 2 MiB. Origin 4xx/5xx errors are reported as observations rather than API failures.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "pattern": "^https?://",
   "maxLength": 2048,
   "minLength": 1,
   "description": "Absolute public HTTP(S) URL on port 80/443. No credentials. Private/reserved DNS/IPs and HTTPS downgrades rejected."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forest-gas-station-url-preflight-19c89995/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run](https://www.zero.xyz/host/http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/llms.txt)
