Pay per call with x402

Past the free keyless budget, pay for a call in USDC with no account and no key.

A request passes a payment step on its way to the server

x402 lets a client, often an agent, pay for an HTTP request in stablecoins without an account or a key. On avee it is the way past the free keyless budget: the free tier stays, and a client that would rather pay than wait gets its answer at once.

For a quick setup, start with AI agents that pay per call.

Prices and networks

USDC on Base, Arbitrum and Solana. The price follows the operation's x-avee-cost-cu, in four tiers from $0.002 to $0.01. The live list, with every payable operation, network, asset and amount:

curl 'https://api.preview.avee.tech/api/v1/.well-known/x402'

status, key, the token verdict and its proof are not sold. A caller with an API key is never asked to pay.

The flow

  1. A keyless call over its budget answers 429, which also carries PAYMENT-REQUIRED: base64 x402 v2 payment requirements for that call.
  2. A client that sends Accept-Payment: x402 gets the same requirements as a 402 instead, with the document in the body and Retry-After and the RateLimit headers kept.
  3. Repeat the request with PAYMENT-SIGNATURE (v1 X-PAYMENT works too). It skips the keyless budget.
  4. The payment is settled only when the call answers 2xx. The receipt is in PAYMENT-RESPONSE.

A malformed request that opts in or pays is 400 and never charged. A payment-identifier reused with a different request is 409.

Over MCP

A keyless tool call over its limit pays per the x402 MCP transport: send Accept-Payment: x402 for a PaymentRequired result, or _meta["x402/payment"] to pay; the receipt is _meta["x402/payment-response"]. Tools and their results are unchanged.

Clients

The SDKs take a payer and handle the whole flow; any x402 v2 client library works against the raw API.

On this page