# ForgeMesh x402 Endpoint Preflight & Health Check

> ForgeMesh x402 Endpoint Preflight & Health Check is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Checks whether a given URL is a valid, reachable x402-payment-gated endpoint and returns its payment envelope details, grade, and dual-stack compatibility findings.

## Facts

- Endpoint: POST https://x402.forgemesh.io/x402-endpoint-preflight
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forgemesh-x402-endpoint-preflight-health-check-1bf483b7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ojfesW2O4OV_7ToYUxkUS

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 forgemesh-x402-endpoint-preflight-health-check-1bf483b7 -d '<json body>'
```

Example prompt: Can you run a preflight check on https://x402.example.com/some-route and tell me if it's a properly configured x402 endpoint — what grade it gets, whether it's reachable, and what the payment envelope looks like?

## When to prefer this

Use this endpoint when you need to programmatically verify that a specific URL is correctly configured as an x402 payment endpoint — especially before integrating it into an agent workflow, listing it in a directory, or debugging why payments are failing. It is the canonical preflight/health-check tool for the x402 ecosystem, returning structured grading and envelope details that generic HTTP probes cannot provide.

## Known failure modes

- URL is not reachable — reachable: false with no envelope data
- URL does not return a 402 status — is_402: false and low grade
- Malformed x402 envelope — envelope_valid: false with envelope_errors populated
- URL is reachable but has no x402 or payment headers at all — grade may be F
- Network timeout or DNS failure on the target URL
- Invalid URL format provided in the request body

## How this service works

x402 utility APIs for AI agents: documents/OCR, PDFs, vision, audio, embeddings, web extraction, dictionary and slang lookups, games, chess/legal-move logic, math, conversions, time utilities, market and economic data, space/geo data, domain vetting, content-signal checks, and x402 ecosystem intelligence. Agents POST JSON, receive a 402 challenge, pay USDC on Base, and retry for the result.

## Output

Returns a JSON object with a letter grade (e.g. 'A'), reachability flag, HTTP status, response time in ms, whether a valid x402 envelope was found (in header or body), whether MPP dual-stack is supported, a list of human-readable findings, the raw x402 envelope, accepted payment assets and amounts, and any envelope errors detected.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "x402 endpoint URL to health-check, e.g. https://x402.example.com/some-route"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://library.forgemesh.io/business-management",
  "grade": "A",
  "is_402": true,
  "findings": [
   "Valid x402 v2 envelope found in the header.",
   "WWW-Authenticate: Payment header also present — this endpoint speaks both x402 and MPP dual-stack, reaching agents on either payment stack."
  ],
  "reachable": true,
  "http_status": 402,
  "method_used": "GET",
  "x402_envelope": "header",
  "envelope_valid": true,
  "mpp_dual_stack": true,
  "accepts_summary": [
   {
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "payTo": "0x85df5380DEbe236AD6BF49dE788243924B080267",
    "amount": "3000",
    "scheme": "exact",
    "network": "eip155:8453"
   }
  ],
  "envelope_errors": [],
  "response_time_ms": 214
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forgemesh-x402-endpoint-preflight-health-check-1bf483b7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
