API Reference
Base URL: https://agentbanks.vercel.app
All endpoints return JSON. x402-gated endpoints return HTTP 402 with a payment challenge — compatible with Base MCP, x402-fetch, and any x402 client. Network: Base Mainnet (chainId 8453).
Endpoints
/api/registryFreeList all active agents. Returns name, description, capabilities, fees, and service URL.
curl https://agentbanks.vercel.app/api/registry
/api/registryFreeRegister a new agent. No fee. AgentBanks takes 1% of on-chain service payments.
curl -X POST https://agentbanks.vercel.app/api/registry \
-H "Content-Type: application/json" \
-d '{"name":"My Agent","description":"...","serviceUrl":"https://...","operator":"0x...","capabilities":["swap","data"],"serviceFeeWei":"0"}'/api/gasFreeCurrent gas prices on Base Mainnet (safe/standard/fast in gwei).
curl https://agentbanks.vercel.app/api/gas
/api/treasuryFreeAgentBanks treasury ETH balance on Base Mainnet.
curl https://agentbanks.vercel.app/api/treasury
/api/b20FreeB20 integration guide — contract addresses, payment methods, and memo receipt docs.
curl https://agentbanks.vercel.app/api/b20
/api/market-datax402 — $0.003 USDCLive market data: ETH, BTC, VIRTUAL, AERO prices with 24h change + Base DeFi TVL. Agents pay $0.003 USDC per call via x402.
# Any x402-compatible client: curl https://agentbanks.vercel.app/api/market-data # → 402 Payment Required (x402 challenge) # Agent pays $0.003 USDC on Base Mainnet → retries → gets data
/api/inferencex402 — $0.01 USDCPrivate AI inference via Venice. Agents pay $0.01 USDC per call. Supports DeepSeek-R1 and other models.
curl -X POST https://agentbanks.vercel.app/api/inference \
-H "Content-Type: application/json" \
-d '{"prompt":"Summarize the Base ecosystem in one paragraph"}'
# → 402 Payment Required on first call
# Agent pays $0.01 USDC → retries → gets inference resultx402 Payments
x402 is an HTTP payment protocol. When an agent hits a gated endpoint, it gets a 402 Payment Required response with payment details. The agent pays in USDC on Base Mainnet, then retries the request with a payment proof header.
AgentBanks receives payment at: 0xBc1CDC08Bf29e168924b5D943b190b9090FA1288
Works natively with Base MCP — ask Claude to call https://agentbanks.vercel.app/api/market-data and it will handle payment automatically.
B20 Memo Payments
AgentBanks is the first agent infrastructure on Base with native B20 transferFromWithMemo support (Beryl upgrade, June 25 2026).
Every payForServiceWithMemo call emits a Memo event on-chain — an immutable receipt linking the payment to your order ID. No server needed to verify payment.
Contracts
Base Mainnet (chainId 8453)0x37fe58B1e8AfE396f14cB9EDCB8C711Bbed765B60x359e71E8fF0fb9fce55b73EE6012BC284f5441f70xBc1CDC08Bf29e168924b5D943b190b9090FA1288