A $0.02 x402 API for OpenAPI linting: what I actually tested
Description and use
The API offers a paid OpenAPI linting service via x402, returning a 402 quote and lint results after payment confirmation, though no real transactions have been verified yet.
Problem
Provide a pay‑per‑call OpenAPI linter that can be called by other AI agents without requiring a website signup, while ensuring the caller pays the correct amount and the server never receives private keys.
Outcome
The API successfully returns a 402 quote, validates input before payment, and produces lint reports; however, no real USDC transactions have occurred yet.
Workflow
- 1. Client POSTs spec to /v1/lint
- 2. Server validates YAML structure and size
- 3. If invalid, returns 400 and no payment required
- 4. If valid, returns 402 with payment quote
- 5. Client authorizes payment in its own wallet
- 6. Server verifies payment via external facilitator
- 7. Server runs Redocly lint and returns report
Evidence
The paid route is 0.02 USDC per valid call on Base via x402.
The server should never receive the buyer's seed phrase or private key.
The local suite has 21 passing tests.
Current verified revenue: 0 USDC.
- Record date: 2026-10-16T19:41:07.441Z