# x402 Endpoint Linter

> x402 Endpoint Linter is a paid API for AI agents from klane402.deanhiki.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-31).

Validates and lints an x402 payment endpoint URL, checking its 402 response, version, payment fields, asset validity, and price metadata before you pay it.

## Facts

- Endpoint: GET https://klane402.deanhiki.workers.dev/api/x402-lint?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-endpoint-linter-c7345a89
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Fhe6lyVLy81SVHYx10mv8

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-endpoint-linter-c7345a89
```

Example prompt: Before I pay it, can you lint the x402 endpoint at https://example.com/api/data and tell me if the 402 status, version, accepts fields, USDC asset, and price are all correctly configured?

## When to prefer this

Use this endpoint when you need to validate an x402 payment endpoint before committing a payment, integrating it into an automated workflow, or diagnosing why an x402 API is not behaving correctly. It is the only known purpose-built x402 lint tool and is ideal as a pre-flight check step in any agent that consumes x402-gated APIs.

## Known failure modes

- URL does not return HTTP 402 status — reported as an issue
- Missing or invalid x402Version field in response
- accepts[] array missing required fields like scheme, network, amount, asset, payTo, resource, or timeout
- Unknown or unsupported USDC asset address — flagged as issue
- URL is unreachable or times out — returns ok:false with connectivity issue
- Malformed JSON in 402 response body

## How this service works

Lint any x402 endpoint before you pay it: fetches the URL, checks 402 status, x402Version, accepts[] fields (scheme, network, amount, asset, payTo, resource, timeout), known USDC asset, price in USD and discovery metadata. Returns {ok, issues[], summary}. Query: url. $0.01.

## Output

Returns a JSON object with: ok (boolean indicating overall validity), issues (array of strings describing specific problems found), and summary (object with network name and priceUSD). A clean endpoint returns ok:true and an empty issues array.

## 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",
     "properties": {
      "url": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "issues": [],
  "summary": {
   "network": "base",
   "priceUSD": 0.002
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-endpoint-linter-c7345a89/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from klane402.deanhiki.workers.dev](https://www.zero.xyz/host/klane402.deanhiki.workers.dev/llms.txt)
