What is x402? How AI agents pay for APIs, one call at a time
x402 is a way for software to pay for an API call the moment it makes it — no account, no key, no invoice. It revives HTTP's long-dormant 402 Payment Required status code and pairs it with a stablecoin payment.
The handshake, in four steps
- Your client calls the API normally.
- Instead of data, the server answers 402 Payment Required with a small JSON: the price, the token (USDC), the chain (Base or Solana), and where to pay.
- The client pays that amount on-chain (directly or through a facilitator), then retries the same request with a proof header.
- The server verifies the payment and returns 200 with the data.
No signup, no dashboard, no monthly bill — the payment is the authentication.
GET /endpointClient → Server402 Payment Required + price, token, chainServer → ClientGET /endpoint + payment proof headerClient → Server200 OK + the dataServer → ClientWhy AI agents care
An agent can't fill in a signup form, paste a credit card, or wait for a sales call. x402 gives it the one thing it can do autonomously: pay, per call, in code. An agent can discover an API at 9:01 and be paying for it at 9:02.
↗How a team accidentally spent $500M on AI in one month- No API keys to provision, store or rotate.
- No subscription you forget to cancel — you pay for exactly the calls you make.
- Machine-readable pricing, so an agent can compare sources and route to the cheapest one that actually works.
Where it runs
Today x402 settles in USDC, mostly on Base (Coinbase's L2) and Solana. Both are cheap and fast enough that a fraction-of-a-cent API call doesn't get eaten by network fees — which is the whole point when calls cost a tenth of a cent.
What x402radar does with it
Anyone can claim their API is fast and cheap. We check. x402radar probes every listed endpoint, reads the price it quotes in its 402, measures how fast it responds and how often it's up, and — when there's real paid traffic — scores it. Right now the directory tracks 2,382 services across 25,215 endpoints. The point is simple: pick a source on evidence, not on a landing page.
The honest caveats
x402 is young, and we'd rather tell you the gaps than hide them. Some endpoints we list have never been quoted yet — we mark those unverified instead of pretending. On Solana we can often see that a provider got paid but not how much (plain RPC gives counts, not amounts). And a price is only a price: a $0.001 call that times out half the time is worse than a $0.003 call that always works — which is why we never rank on price alone.