Skip to main content
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.
  1. 1RequestCall the resource with no auth header.
  2. 2402The response lists accepts[]: what it costs and how to pay.
  3. 3SignPick one accepted option and sign it with your wallet.
  4. 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…
Pricing

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
DiscoveryGET /x402/info ↗Service and resource summary./.well-known/x402 ↗The standard x402 resource manifest.

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/completions

X/Twitter API

Read endpoints for agents that need social data, paid per call.

Listed in /x402/info

Crypto RPC

JSON-RPC access for on-chain reads, paid per call.

Listed in /x402/info
NetworkBase mainneteip155:8453
AssetUSDC0x8335…2913
Schemesupto (preferred), exactPermit2 for upto
AccountNone neededjust a wallet