Get 0G and fund your account
Inference is paid for from an on-chain balance, so funding comes before code. This is the step that takes the longest for most people, and the one where the semantics are worth understanding before you commit tokens.
By the end of this page you will have a signed-in account at pc.0g.ai with a balance you can spend on requests.
Before you start
Section titled “Before you start”You need a wallet that can hold an EVM asset and sign transactions. The instructions below use MetaMask; any wallet that supports adding a custom EVM network works the same way.
1. Get 0G tokens
Section titled “1. Get 0G tokens”Billing is denominated in 0G, the network’s native token. The official acquisition guide is get.0g.ai, which walks through the available paths depending on what you already hold and where you hold it.
Acquire slightly more than you plan to deposit. The deposit itself is an on-chain transaction and needs 0G left over to pay gas.
2. Add 0G Mainnet to your wallet
Section titled “2. Add 0G Mainnet to your wallet”Open MetaMask, choose Add network, then Add a network manually, and enter:
| Field | Value |
|---|---|
| Network name | 0G Mainnet |
| RPC URL | https://evmrpc.0g.ai |
| Chain ID | 16661 |
| Currency symbol | 0G |
| Block explorer | https://chainscan.0g.ai |
Save, then switch to the new network. Your 0G balance should appear. If it does not, confirm the tokens landed on 0G Mainnet rather than on another chain — the block explorer above is the fastest way to check an address.
3. Connect your wallet to the Console
Section titled “3. Connect your wallet to the Console”- Open pc.0g.ai.
- Click Connect Wallet in the top right.
- Select your wallet and approve the connection.
- Sign the authentication message.
The signature proves ownership of the address. It is not a transaction and costs no gas. Your wallet address is your account identity — keys, balance, and usage history all hang off it.
Confirm the network indicator reads Mainnet before continuing.
4. Deposit
Section titled “4. Deposit”Go to Dashboard → Billing and open the funding entry. Enter an amount and confirm the transaction in your wallet.
The deposit moves 0G from your wallet into the Router’s on-chain payment contract. Once the transaction confirms, the balance is usable within a few seconds.
What a deposit actually means
Section titled “What a deposit actually means”Read this before depositing a large amount.
- One-way. Depositing moves tokens into the payment contract. There is no withdrawal path back to your wallet.
- Non-refundable. The balance cannot be converted back to transferable tokens.
- Inference only. It pays for requests you send, and nothing else.
- No expiry. An unused balance stays available indefinitely.
- Debited per request. Cost is computed from the tokens each request consumes, and every response reports its own exact cost.
The practical guidance: deposit what you expect to spend over a reasonable horizon, not your whole holding. You can always deposit again.
5. Confirm your balance
Section titled “5. Confirm your balance”Back on Dashboard → Overview, the current balance should reflect the deposit. The Console also shows spend for the current period, recent requests, and active keys — enough to confirm the account is live before you write any code.
When it does not work
Section titled “When it does not work”The deposit transaction fails or never submits. Almost always insufficient gas. The deposit spends 0G and also needs 0G to pay for the transaction itself, so a wallet drained to exactly the deposit amount cannot complete it. Leave a margin.
The transaction confirmed but the balance still reads zero. Give it a few seconds and refresh — the Console reads the balance from chain and updates shortly after confirmation. If it persists, look up the transaction hash on https://chainscan.0g.ai and confirm it succeeded rather than reverted.
You see a balance in the Console but requests still fail with a payment error. Check which mode the Console is in. Router mode uses a single unified balance; the Advanced flow at the Console keeps a separate per-provider sub-account, and the two do not share funds. Everything in these docs assumes Router mode.
Your tokens do not appear in the wallet at all. Verify the selected network is 0G Mainnet with chain ID 16661, and that the receiving address matches the one you are signed in with.
Next steps
Section titled “Next steps”- Quickstart — create an API key and send your first request.