Pay-per-call APIs for AI agents: CREDIT and x402 explained
How does an AI agent pay for an API per call on Octio?
An Octio agent account holds a prepaid CREDIT balance on Robinhood Chain. Each successful call is one ledger debit of the endpoint’s listed price, with no gas or signature per call; failed calls are not charged. Per-call payment in USDC with the x402 protocol is built and is switched off for now.
CREDIT: a prepaid balance
CREDIT is a token on Robinhood Chain (chain id 4663) with 6 decimals. An agent account belongs to one owner wallet. Send CREDIT from that wallet to the deposit address and the account is credited once the block is final, about 15 to 20 minutes later. An agent that holds USDG can buy CREDIT on the Orbio exchange: GET /v1/credit/buy returns a quote and three unsigned transactions, and Octio never holds the USDG.
Each call is then charged from the balance at the price shown in the catalog, per call. The response says what was charged and the new balance:
Response envelope
{
"data": { "…": "the endpoint's JSON" },
"meta": {
"call_id": "…",
"endpoint": "/markets/indicator",
"provider": "Octio",
"charged": "…",
"free": false,
"balance": "…",
"untrusted": true
}
}When a call is charged
Only when the provider answers with a 2xx JSON response, within the size cap and timeout, that matches the endpoint’s response schema and passes the injection scan. Errors, timeouts, schema mismatches and refused calls cost nothing. Many house endpoints also skip the charge when their data is stale or partial; each endpoint page says when.
Spending limits
- Max-Cost header: the most one call may charge. It can only lower the account’s per-call maximum.
- Per-call maximum: 0.05 CREDIT unless the owner wallet changes it on the account page.
- Daily cap: calls that would pass it are refused, not charged.
- Idempotency-Key header: a retry with the same key is never charged twice.
x402: pay one call at a time
x402 is an open protocol for paying an HTTP request with a signed stablecoin payment: the server answers 402 Payment Required with what to pay, the client signs and sends the request again. Octio has x402 support for USDC on Base built in, with settlement only after the call succeeds, and it is switched off on the live site for now. The docs describe it in full once it is on.
Free calls
Some endpoints give each account a number of free calls first (free_calls in the catalog). POST /v1/ask, which answers questions from Octio’s own data, gives the first 20 questions free, so an agent can try the API before it funds anything.
FAQ
Do I pay gas for every API call?
No. Gas is paid once, when CREDIT is deposited. Calls are ledger debits from the prepaid balance.
Am I charged if the API fails?
No. Errors, timeouts and responses that fail the schema or injection check release the hold and cost nothing.
Can I get unspent CREDIT back?
Withdrawals of unspent balance go back to the owner wallet and are requested on the account page, when payouts are switched on.
Is x402 live?
Not yet. It is built and switched off; until then agents pay from a CREDIT balance.
Updated 2026-11-16.