One POST per tool.

Each of our … tools is a plain HTTPS endpoint that charges per call with x402 v2. No accounts and no API keys: a request without payment gets the price, a request with a signed payment gets the result.

Base URL
CatalogGET /v1/resources, free JSON
Call a toolPOST /v1/<id> with a JSON body. Without a payment it answers 402 with the price.
Pay in
Call fromPlain HTTP, the CLI or MCP

To try a tool before writing code, open it in Tools or ask for it in Ask. Both show the price before anything is signed.

Quickstart

Ask for the price. The answer is 402 with the terms in a header and in the body.


      

Sign one entry of accepts[] and send the same request again with the signature. The CLI does both steps for you:


    

How x402 pays for a call

  1. Quote. The 402 lists one entry per network in accepts[], each with the exact amount, the stablecoin asset, payTo and maxTimeoutSeconds.
  2. Sign. Sign an EIP-3009 TransferWithAuthorization for that amount. The EIP-712 domain is extra.name, extra.version, the chain id and the asset address. Check it against your caps first; no gas is needed.
  3. Run. Repeat the request with a payment-signature header. The server checks the signature, amount, recipient, time window, that the nonce is unused and that the wallet holds enough, then runs the tool.
  4. Settle. Only if the tool returned a result is the authorization sent on chain. The answer carries the result, a receipt and a payment-response header with the transaction. A failed tool never settles.

The payment-signature value is base64 of:

{
  "x402Version": 2,
  "resource": { …from the 402 },
  "accepted": { …the accepts[] entry you chose },
  "payload": {
    "signature": "0x…",
    "authorization": { "from": "0x…", "to": "0x…", "value": "20000",
      "validAfter": "1767225590", "validBefore": "1767225720", "nonce": "0x…" }
  }
}

x402 v1 clients may send the same payload in X-PAYMENT with {"x402Version":1,"scheme":"exact","network":…}.

Networks and assets

Endpoints

GET /v1/resourcesThe catalog: every tool, its price, inputs and status.
POST /v1/<id>Run a tool (402 first, then paid).
GET /api/quote/<id>The price and terms for one tool, without calling it.
GET /api/ledgerSettled payments, totals and days.
GET /api/proofsWhat recent data calls returned, with sha256.
GET /api/holder/<address>Holder tier and free runs left today.
POST /mcpRemote MCP server (JSON-RPC).

Headers

payment-requiredResponse, 402. Base64 JSON with the terms.
payment-signatureRequest. Base64 JSON with your signed authorization.
payment-responseResponse, 200. Base64 JSON: success, transaction, network, payer.
x-toll-holderRequest. Your wallet, to be quoted the holder price; the payment must then come from it.
x-toll-passRequest. A signed one-day holder pass for free runs.

Errors and charges

Payment problems answer 402 again with fresh terms and error set to one of these. Nothing is charged in any of them.

payment_requiredNo payment attached; here is the price.
wrong_amountThe authorization is not for the quoted amount. Sign the new terms.
expiredThe authorization's time window has passed.
nonce_usedThat authorization was already used. Each payment needs a new nonce.
invalid_signatureThe signature does not verify, or is not from the paying wallet.
insufficient_fundsThe paying wallet holds less than the amount.
holder_mismatchThe holder price was asked for one wallet but paid from another.
settle_failedThe tool ran but the transfer did not go through; the result is withheld and nothing moved.
offline503: the tool is not available on this server right now.

Tool errors (bad input, an upstream service down) answer 4xx or 5xx with {"error":{"code","message"},"charged":false}.

The agent wallet

The Budget page makes a key in your browser with a cap per call and a cap per day; Ask and Tools pay from it after your yes. The CLI keeps its own key, encrypted with your password, and checks the same two caps before it signs.

Holders

Free runs: sign this with personal_sign, with expires a unix time at most 24 hours ahead, then send x-toll-pass: <address>.<expires>.<signature>.


    

CLI


      

Every payment is checked against the per-payment and daily caps before it is signed; --yes skips the prompt but never the caps.

MCP server

Local, paying from the CLI wallet inside its caps:


      

Remote, nothing to install: . It lists and quotes the catalog for free; its call tool returns the 402 terms until your client passes a signed payment.

Catalog JSON

Every tool with its price, inputs and status: /v1/resources.