x402
Pay per request.No key, no account.
Agents call a resource, get an HTTP 402 with the price, pay in USDC on Base, and retry. Inference, X/Twitter API and crypto RPC are all payable this way.
The 402 handshake.
Two requests to the same URL. The first tells you the price.- 1RequestCall the resource with no auth header.
- 2402The response lists accepts[]: what it costs and how to pay.
- 3SignPick one accepted option and sign it with your wallet.
- 4RetrySame URL with PAYMENT-SIGNATURE. The receipt comes back in PAYMENT-RESPONSE.
1 · Request2 · 402 challenge3 · Paid retry
POST /v1/chat/completions Host: api.surplusintelligence.ai Content-Type: application/json { "model": "claude-sonnet-4.5", "max_tokens": 800, "messages": [{ "role": "user", "content": "Hello" }] } ← HTTP/1.1 402 Payment Required PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6Mi… { "accepts": [{ "scheme": "upto", "network": "eip155:8453", "amount": "5502", "payTo": "<from the challenge>" }] } → retry, same URL PAYMENT-SIGNATURE: 0x9f2c…e41b ← HTTP/1.1 200 OK PAYMENT-RESPONSE: eyJzdWNjZXNzIjp0cnVl…
You authorize a ceiling, not a price.
With upto, you sign a maximum. After the response, only the actual cost settles. The final amount is in each 402 challenge.
Authorized ceilingsigned up front
Actually settledcharged after
What you can pay for.
Inference
The OpenAI-compatible surface, with no API key. Routed to the cheapest healthy seller, settled after the response.
/v1/chat/completionsX/Twitter API
Read endpoints for agents that need social data, paid per call.
Listed in /x402/infoCrypto RPC
JSON-RPC access for on-chain reads, paid per call.
Listed in /x402/infoNetworkBase mainneteip155:8453
AssetUSDC0x8335…2913
Schemesupto (preferred), exactPermit2 for upto
AccountNone neededjust a wallet