# x402 Dev Tools – API Origin Linter

> x402 Dev Tools – API Origin Linter is a paid API for AI agents from dev.kagurazaka.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-30).

Lints an x402 API origin by fetching its OpenAPI and discovery docs, probing paid routes without payment, and reporting 402 compliance errors, price mismatches, and missing Bazaar extensions.

## Facts

- Endpoint: GET https://dev.kagurazaka.dev/v1/lint?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-dev-tools-api-origin-linter-ef8d7e2a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NP4bHDV0yQza4WuMkH3e3

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-dev-tools-api-origin-linter-ef8d7e2a
```

Example prompt: Can you lint my x402 API at https://api.example.com and tell me which routes aren't returning 402 correctly, if there are any price mismatches with my OpenAPI doc, and whether I'm missing any CDP Bazaar extensions?

## When to prefer this

Use this endpoint when you need to validate an x402 API origin end-to-end for protocol compliance — specifically when you want to catch 402 response issues, price inconsistencies between OpenAPI declarations and live 402 responses, missing CDP Bazaar extensions, or wrong EIP-712 USDC domains. It is the canonical pre-publish linter for x402 APIs and mirrors the exact checks performed by x402scan, the CDP Bazaar crawler, and agent discovery systems.

## Known failure modes

- Origin is unreachable or returns non-HTTPS URL — request fails or no routes checked
- Origin has no /openapi.json — missing OpenAPI findings reported
- No paid routes found — returns zero checked_routes with no findings
- Rate limiting or network timeout on probed routes — some routes may not be checked
- Origin returns malformed 402 responses — decode errors reported as findings

## How this service works

Checks an x402 API origin the way x402scan, the CDP Bazaar and agents read it: fetches /openapi.json and /.well-known/x402, then calls each paid route without paying (up to 30) and decodes its 402. Reports routes that do not answer 402, missing or v1-only PAYMENT-REQUIRED headers, prices that differ from the OpenAPI document, resource URLs that differ from the route, wrong USDC EIP-712 domains, missing Bazaar extensions and missing descriptions.

## Output

Returns a JSON object with an ok flag, the API name, origin, count of paid and checked routes, a list of routes with their 402 status and declared vs actual prices, an array of findings (each with level, location, and message), and counts of errors and warnings.

## 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": [
      "origin"
     ],
     "properties": {
      "origin": {
       "type": "string",
       "description": "the https origin, such as https://api.example.com"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "ok": {},
      "name": {},
      "errors": {},
      "origin": {},
      "routes": {},
      "findings": {},
      "warnings": {},
      "paid_routes": {},
      "checked_routes": {}
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": false,
  "name": "Weather API",
  "errors": 1,
  "origin": "https://api.example.com",
  "routes": [
   {
    "path": "/v1/weather",
    "bazaar": true,
    "method": "GET",
    "status": 402,
    "price_usd": 0.001,
    "declared_usd": 0.002
   }
  ],
  "findings": [
   {
    "level": "error",
    "where": "GET /v1/weather",
    "message": "the 402 asks $0.001 but the OpenAPI document declares $0.002"
   }
  ],
  "warnings": 1,
  "paid_routes": 2,
  "checked_routes": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-dev-tools-api-origin-linter-ef8d7e2a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from dev.kagurazaka.dev](https://www.zero.xyz/host/dev.kagurazaka.dev/llms.txt)
