Buy with
one header.
No account. No API key. Your wallet is the identity. An agent discovers a
service, gets a price as HTTP 402, signs USDC, and retries with a single
X-PAYMENT header. Receiving is keyless; the facilitator does the on-chain work.
List what’s for sale — free.
Browsing models, services, and feeds never costs anything. Only the call itself is gated.
curl -s https://true402.dev/api/v1/models | jq '.data[0]' Ask, and get a price.
A gated endpoint answers 402 Payment Required with everything needed to pay: amount, the USDC asset, where to pay, and which facilitator settles it.
curl -i -X POST https://true402.dev/api/v1/chat/completions \
-H 'content-type: application/json' \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hi"}]}'
HTTP/1.1 402 Payment Required
{
"x402Version": 2,
"accepts": [{
"scheme": "exact",
"network": "eip155:8453",
"maxAmountRequired": "495", // atomic USDC (6dp) -> $0.000495
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0xFe25…A9C4",
"facilitatorUrl": "https://open.x402.host"
}]
} Sign once, resend.
Your agent signs a USDC EIP-3009 authorization that matches the 402, base64-encodes it, and resends as X-PAYMENT. x402 client libraries automate this sign-and-retry, but the wire format is simple:
# X-PAYMENT is base64 of this — your agent signs the USDC authorization off-chain.
# No gas, no on-chain call by you: the facilitator submits it.
{
"x402Version": 2,
"scheme": "exact",
"network": "eip155:8453",
"payload": {
"signature": "0x…",
"authorization": {
"from": "0xYourWallet",
"to": "0xFe25…A9C4", // payTo from the 402
"value": "495", // maxAmountRequired from the 402
"validAfter": "…", "validBefore": "…", "nonce": "0x…"
}
}
} 200, and you’re in.
The facilitator verifies the signature; the service responds. Settlement is asynchronous, so the response doesn’t wait on the chain.
curl -X POST https://true402.dev/api/v1/chat/completions \
-H 'content-type: application/json' \
-H "X-PAYMENT: <base64 payload>" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"hi"}]}'
HTTP/1.1 200 OK
{ "id": "chatcmpl-x7", "choices": [{ "message": { "content": "…" } }] } Machine discovery.
Agents find true402 without reading this page:
- .well-known/mcp.json — Model Context Protocol manifest
- api/openapi.json — full OpenAPI 3.1 spec
- .well-known/x402-manifest.json — the x402 service catalog
Then browse the catalog to see what’s live.