BlockRun
Get started · Circle Gateway

Circle Gateway quickstart:
deposit USDC once. Then just call.

One USDC deposit into Circle Gateway funds every call after it — signed off-chain, no gas, no API key. Thirty seconds from install to first response.

01
Three steps

What happens, in order.

01
A wallet with USDC

Any self-custodial EVM wallet. Hold $5–20 USDC on one of the 11 chains below, plus a little native gas for the deposit transaction — except on Arc, where USDC is the gas.

02
Deposit once

client.deposit() sends one transaction into Circle Gateway (two the very first time — an approve, then the deposit). Circle's indexer sees it in ~10 seconds.

03
Call anything

Every request carries an EIP-712 signature the SDK produces. Chat, images, video, music, speech, search, markets, RPC — the same /v1 surface as blockrun.ai, 89 models.

02
The quickstart

The whole thing, in one file.

Runs as written. The deposit is the only on-chain transaction; every line after it is a signature.

quickstart.ts
import { NanoClient } from "@blockrun/nano-client";

const client = new NanoClient({
  chain: "polygon",                       // any chain below
  privateKey: process.env.PRIVATE_KEY as `0x${string}`,
});

// One-time: move USDC from your wallet into Circle Gateway
await client.deposit("5");                 // $5 covers thousands of calls

// From here, every call is an off-chain EIP-712 signature → zero gas
const r = await client.chat({
  model: "openai/gpt-5.5",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(r.data.choices[0].message.content);
console.log(r.payment.formattedAmount);   // e.g. "$0.0185"
03
Where to deposit — 11 chains

Any chain Circle Gateway supports.

Each chain holds its own Gateway balance. Deposit where you already hold USDC, or deposit once and move it with client.withdraw({ chain }) over CCTP. Polygon has the widest onramp coverage and the cheapest gas; on Arc, USDC is the gas token, so you need nothing else.

Polygon
gas · POL
Arbitrum
gas · ETH
OP Mainnet
gas · ETH
Unichain
gas · ETH
Avalanche
gas · AVAX
Sonic
gas · S
Sei
gas · SEI
World Chain
gas · ETH
HyperEVM
gas · HYPE
Ethereum
gas · ETH
Arc
gas · USDC

Base is not on this list on purpose. Buyers on Base pay blockrun.ai directly through native x402 — no Gateway deposit step. Arc appears in the 402 the moment Circle's facilitator lists it; the SDK already knows the chain.

04
If it stops

The four errors people hit.

insufficient funds for gas

The wallet has no native gas on that chain. Top it up, or deposit on Arc where USDC is the gas.

Gateway available 0

Indexer lag right after a deposit. Wait 10–15 seconds and retry.

payment verification failed: insufficient

Gateway balance is below the call's price. Deposit more.

Unsupported buyer network

Wrong chain. nano accepts the 11 chains listed here — not Base. Buyers on Base use blockrun.ai.

Where the money goes

Circle verifies. Circle batches.
You never wait for a block.

Every signature is checked by Circle's Gateway facilitator before the call runs. Settlement to BlockRun happens in Circle's batches afterwards — you can watch the intent move through Received → Batched → Confirmed with client.getPaymentStatus().

FAQ

Getting started on Circle Gateway,
question by question.

What do I need before the Circle Gateway quickstart?
A self-custodial EVM wallet holding $5–20 USDC on one of the 11 supported chains, plus a little native gas for the one deposit transaction — except on Arc, where USDC is the gas. Node 18 or newer for the SDK.
How do I deposit USDC into Circle Gateway from the SDK?
client.deposit("5") sends one transaction into Circle Gateway — two the very first time, an approve then the deposit. Circle's indexer sees the balance in about ten seconds, and every AI call after that is an off-chain signature.
Do I need an API key to call AI models with USDC?
No. The wallet that signs is the credential. There is no signup, no dashboard to create a key in and no key to rotate or leak — an agent can be funded and calling in one script.
Is the nano-client SDK OpenAI-compatible?
Yes. client.chat() takes the OpenAI messages shape and the model IDs are provider/model (openai/gpt-5.5, anthropic/claude-sonnet-4.6). The same /v1 surface as blockrun.ai serves chat, images, video, music, speech, search, markets and RPC; /v1/messages speaks Anthropic's format for Claude Code and other Anthropic-native clients.
How is this different from getting started on OpenRouter or Vercel AI Gateway?
There is no account to create and no card to add. OpenRouter and Vercel AI Gateway meter to an API key you fund by hand; here you fund a wallet with USDC, deposit once, and the SDK pays each call with a signature. Nothing to renew, nothing to top up on a schedule, and the price of every call is in the 402 before it runs.
Which chain should I deposit USDC on for AI calls?
Deposit where you already hold USDC. Polygon has the widest onramp coverage and the cheapest gas; Arc needs no gas token because USDC is the gas. Each chain holds its own Gateway balance, and client.withdraw({ chain }) moves funds between them over CCTP.
How much does each pay-per-call AI request cost, and how do I see it?
Provider cost plus a 5% margin and a flat $0.002 per call, quoted in dollars in the 402 before the call runs. The SDK returns it with every response as r.payment.formattedAmount — for example "$0.0185" for a short GPT-5.5 chat.
What happens after I sign — when does the USDC actually leave Gateway?
Circle's Gateway facilitator verifies the signature before the model runs; settlement to BlockRun happens later in Circle's batches. client.getPaymentStatus() shows each intent moving Received → Batched → Confirmed. You never wait for a block.
Can I get started on Base, or use a Solana wallet?
Not on this host. nano's 402 offers only Circle Gateway chains; buyers on Base pay blockrun.ai directly through native x402 with no deposit step, and Solana buyers use sol.blockrun.ai. Same catalog, same /v1 surface, different rail.