# Fund an Octio account with CREDIT

**How does an AI agent put CREDIT on its Octio account?**

Pick the way that matches what the agent holds; the table on this page lists only the ways open right now. A top-up, while one is open, takes one gasless x402 signature (`POST /v1/credit/topup`); a USDG purchase starts with a free quote (`GET /v1/credit/buy`); CREDIT is sent from the owner wallet to the deposit address. `GET /v1/me` shows the balance.

1. **Get an API key**: Create one with Sign-In with Ethereum (POST /v1/auth/keys) from the wallet that will own the account, or on the account page. Fund from that same wallet.
2. **Pick the way that fits**: Find what the agent holds in the table: USDC on Base, USDG or CREDIT on Robinhood Chain, or nothing yet.
3. **Send it from the owner wallet**: Sign the x402 top-up offer, or send the three purchase transactions, or the CREDIT transfer, from the owner wallet.
4. **Check the balance**: Read GET /v1/me until balance shows the new CREDIT.

## Which way fits what you hold

This table is built from the live config (`GET /api/config`) each time the page is shown, so a way that is closed right now is not listed. Every field of each request is in [llms.txt](https://www.octio.xyz/llms.txt), section 2.

Ways to fund an Octio account, open right now

| You hold | Do this | Credited | You need |
| --- | --- | --- | --- |
| USDC on Base | Top up with one x402 signature (gasless): `POST /v1/credit/topup?usdc=<1 to 50>`. Send it with your API key: the 402 answer is an x402 v2 offer for exactly that amount with a CREDIT quote. Sign the EIP-3009 authorization it asks for from the owner wallet or a payer wallet linked to the account (POST /v1/credit/payers) and send it again in PAYMENT-SIGNATURE. Or top up from the call itself: send a call with your API key and the header X-Octio-Topup-Max: <the most USD one top-up may take>; if the balance is short, its 402 INSUFFICIENT_BALANCE carries this top-up offer in PAYMENT-REQUIRED, and the same request sent again with PAYMENT-SIGNATURE tops up the account, then runs the call. | At once (200), or once the transfer is mined (202 pending) | An API key, and USDC in the owner wallet or a linked payer wallet: a plain wallet, or a smart wallet deployed on Base (EIP-1271, an EIP-7702 delegation too). No gas. |
| USDG on Robinhood Chain | Top up with one x402 signature (gasless): `POST /v1/credit/topup?usdg=<1 to 50>`. Send it with your API key: the 402 answer is an x402 v2 offer for exactly that amount with a CREDIT quote. Sign it from the owner wallet and send it again in PAYMENT-SIGNATURE. Or top up from the call itself: send a call with your API key and the header X-Octio-Topup-Max: <the most USD one top-up may take>; if the balance is short, its 402 INSUFFICIENT_BALANCE carries this top-up offer in PAYMENT-REQUIRED, and the same request sent again with PAYMENT-SIGNATURE tops up the account, then runs the call. | At once (200), or once the transfer is mined (202 pending) | An API key, and USDG in the owner wallet. No gas. |
| USDG on Robinhood Chain | Buy CREDIT on the Orbio exchange: `GET /v1/credit/buy?usdg=<amount>&wallet=<owner wallet>`. Free, no key needed. It answers with a live quote and three unsigned transactions (approve, buy, transfer to the deposit address): send them in order from the owner wallet. Octio never holds the USDG. | About 15 to 20 minutes after the last transfer, once its block is final | ETH on Robinhood Chain for gas on all three transactions; the owner wallet sends them. |
| CREDIT on Robinhood Chain | Send CREDIT to the deposit address: `CREDIT.transfer(0x75bF3FfC85D451554c31A669315d728179a807EE, <amount in atoms, 6 decimals>)`. Send it from the owner wallet: deposits are matched by the sender, and CREDIT from any other address is not credited. | About 15 to 20 minutes after the transfer, once its block is final | ETH on Robinhood Chain for gas; the owner wallet sends it. |
| USDC on Base or USDG on Robinhood Chain, and no account | Pay each call with x402 instead: `<METHOD> /v1<path> with no Authorization header`. Call a paid endpoint without a key: it answers 402 with an x402 offer for that one call. Sign it and send the request again. No balance and no account. | Nothing to credit: each call is paid on its own, only when it succeeds | A plain wallet holding the token (a 65-byte ECDSA signature). No gas. |
| Nothing yet | Start with the free calls: `<METHOD> /v1<path> or POST /v1/ask, with your API key`. A new account's first 3 calls to the Octio house endpoints are free (free_calls in the catalog), and POST /v1/ask answers the first 20 questions free, so an agent can try them before it holds any CREDIT. | Nothing to credit: free calls are not charged | An API key (Sign-In with Ethereum, no funds needed). |

An agent can also ask: `GET /v1/credit/options?have=usdc` (or `usdg`, `credit`, `eth`, `none`, with `chain`, `amount` and `credit` if it knows them) is free and needs no key. It ranks the open ways for what the agent holds and gives each one’s exact next requests, limits, the CREDIT it would buy and a `best` pick with the reason. Over MCP the `funding_options` tool answers the same for the signed-in account.

## Top up with one x402 signature

A top-up is open while `GET /api/config` says so: `x402.topup_base.enabled` for USDC on Base, `x402.topup.enabled` for USDG on Robinhood Chain. The amount limits are next to each flag. The flow:

1. `POST /v1/credit/topup?usdc=<amount>` (or `?usdg=`) with `Authorization: Bearer <API key>`. The answer is 402 with a `PAYMENT-REQUIRED` header: an x402 v2 offer for exactly that amount, and a quote of the CREDIT it buys.
2. Check the offer: its `payTo` must be the pay-to address [llms.txt](https://www.octio.xyz/llms.txt) lists for that network, and the quote’s `credit` is what the account gets.
3. Sign the EIP-3009 `TransferWithAuthorization` it asks for from the owner wallet, with `value` equal to the offered amount and a short `validBefore` (60 seconds to 10 minutes ahead).
4. Send the same request again with the signature in `PAYMENT-SIGNATURE`. 200 `{credited, balance, tx_hash, rate}` means it is on the balance; 202 `{status: "pending"}` means it is credited once the transfer is mined.

The wallet pays no gas. One top-up runs at a time per account, within daily limits.

Over MCP, while a top-up is open, two tools do the same without any header work: `topup_credit {asset, amount}` returns the offer, the quote and the EIP-712 typed data with every field filled in (moves no money); the owner wallet signs it, and `submit_topup {asset, amount, authorization, signature}` sends it through the same route with the same checks and limits.

## Buy CREDIT with USDG

`GET /v1/credit/buy?usdg=<amount>&wallet=<owner wallet>` is free and needs no key. It returns a live quote, `min_credit_out` and three unsigned transactions; Octio never holds the USDG and signs nothing. Send them in order from the owner wallet, each after the previous one is mined:

1. approve the exchange for exactly that USDG amount, never unlimited;
2. buy CREDIT to your own wallet: it reverts if you would get less than `min_credit_out`;
3. transfer the CREDIT to the deposit address, never more than the buy delivered.

Each step needs ETH for gas on Robinhood Chain. The deposit counts once its block is final, about 15 to 20 minutes later. The MCP tool `quote_credit_purchase` returns the same quote.

## Deposit CREDIT

Call `CREDIT.transfer(<deposit address>, <amount in atoms, 6 decimals>)` on the CREDIT token from the owner wallet. The deposit address and the token address are in [llms.txt](https://www.octio.xyz/llms.txt), in `GET /v1/me` (`deposit_address`) and on the [account page](https://www.octio.xyz/account). The deposit counts once its block is final, about 15 to 20 minutes after the transfer; CREDIT sent before the account exists is credited when it is created.

## Check the balance

Read the balance

```
curl -s https://www.octio.xyz/v1/me -H "Authorization: Bearer $TM_KEY"
# {"balance": "…", "spent_today": "…", "daily_cap": "…", "deposit_address": "0x…", "deposits_auto_credited": true, …}
```

`deposits_auto_credited: false` means this account’s deposits wait for support. Every paid call also returns the new balance in `meta.balance`. Over MCP, `get_balance` reads the same.

## Wallet rules

- One owner wallet: the wallet that signed for the API key owns the account. Fund from that wallet.
- Deposits are matched by sender: CREDIT counts only when it reaches the deposit address in a transfer from the owner wallet. CREDIT from any other address, or delivered to the deposit address by a contract, is not credited.
- An x402 top-up needs a plain wallet without code: a smart-contract wallet or an EIP-7702 delegation is refused, and nothing is charged. Where `/api/config` shows `x402.topup_base.smart_wallets: true`, the USDC top-up on Base also takes a smart wallet deployed on Base (EIP-1271) and payer wallets linked to the account (llms.txt section 2c).
- A smart-contract owner wallet can still buy with USDG, but its deposits are not credited automatically; the `notes` in the quote say how they are.

## Pitfalls

- Sign the amount the 402 offer gives, never one you worked out, and read the quote’s `credit` first: a small top-up can buy less CREDIT than the amount suggests.
- Each top-up authorization works once. After a refusal, sign a new one with a new nonce; a replay is 409 `DUPLICATE_REQUEST`.
- A refused or unknown top-up holds the account’s single top-up slot until its `validBefore` plus 2 minutes, so keep `validBefore` short.
- Never buy straight to the deposit address: the CREDIT must reach it in a transfer from the owner wallet.
- Copy the deposit address from `GET /v1/me`, llms.txt or the account page, never from a message or another site.

## FAQ

### How long until CREDIT shows on the balance?

A top-up is on the balance when the answer is 200, or once its transfer is mined after a 202. A CREDIT deposit, and the last step of a USDG purchase, count once the block is final, about 15 to 20 minutes after the transfer.

### Can an agent with no funds use Octio?

Yes. A new account gets free calls on the Octio house endpoints and free questions on `/ask`, and while x402 per call is open an endpoint can be paid one call at a time with no account.

### Does Octio hold my USDG?

Not for a purchase: the three transactions run from your own wallet on the Orbio exchange and Octio signs nothing. A top-up is a payment: the signed amount goes to Octio’s pay-to address and the account is credited with the quoted CREDIT.

### Can I get unspent CREDIT back?

Withdrawals of unspent balance go back to the owner wallet only, and are requested on the account page, while payouts are switched on.

Updated 2026-12-06. HTML version: https://www.octio.xyz/guides/fund-credit. Agent API reference: https://www.octio.xyz/llms.txt
