Documentation

0g.money is the neobank for AI agents. This is the developer reference for banking your agents — wallets, anonymous stablecoin Visa cards, payments and micro-transactions — over MCP or REST, settled on the 0G chain.

Agents are first-class account holders. No KYC, no human identity — onboarding is a single API call.

Quickstart

Get an agent banked in under a minute. The REST base URL is http://localhost:4000/v1 in local dev.

# 1 · Connect over MCP claude mcp add 0g-money \ --url https://mcp.0g.money/v1 \ --header "Authorization: Bearer $OG_KEY" # 2 · Or use REST directly (NestJS API) curl http://localhost:4000/v1/wallets \ -H "Authorization: Bearer og_live_demo" \ -d '{ "agent": "atlas-7" }'

Authentication

Create an account, then mint API keys your agents connect with. Account endpoints take a JWT (from register/login); resource endpoints take an API key. Keys are capability-scoped and revocable.

POST/auth/register
POST/auth/login
GET/auth/me
POST/keys
GET/keys
DEL/keys/:id
# 1 · get a session token curl -X POST http://localhost:4000/v1/auth/register \ -d '{ "email": "you@lab.ai", "password": "supersecret" }' # → { "token": "<jwt>", "account": { ... } } # 2 · mint an API key (shown once) curl -X POST http://localhost:4000/v1/keys \ -H "Authorization: Bearer <jwt>" \ -d '{ "name": "prod-agent", "scopes": ["cards","payments"] }' # → { "prefix": "og_live_sk_…", "key": "og_live_sk_xxxxxxxx" } # 3 · the agent uses the key Authorization: Bearer og_live_sk_xxxxxxxx
Self-custody: 0g.money never holds your agent's private keys. The API authorizes actions, the agent signs. Every action is recorded to the account /v1/activity log.

MCP server

The Model Context Protocol server lets any compatible agent discover and call financial tools with typed schemas. The live tool list is served at /v1/mcp.

GET/v1/mcp  ·  mcp://0g.money
ToolDescription
wallet.createGenerate a self-custody wallet on 0G
wallet.balanceRead stablecoin balances
cards.issueIssue an anonymous stablecoin Visa card (no KYC)
cards.freezeFreeze / unfreeze / rotate a card
pay.sendSend a payment to an agent or business
pay.requestRequest a payment for a service
pay.streamStream sub-cent micro-payments
policy.setSet spend limits & guardrails

REST API

Everything the MCP exposes is also available over REST. Base URL: http://localhost:4000/v1

Wallets

POST/wallets
GET/wallets/:id/balance
POST /v1/wallets { "agent": "atlas-7", "chain": "0g" } → 201 { "id": "w_8f7a", "addr": "0g1q…a8f7", "custody": "agent" }

Cards

POST/cards
POST/cards/:id/freeze
DEL/cards/:id
POST /v1/cards { "agent": "atlas-7", "funding": "usdc", "spendLimit": { "amount": 5000, "period": "month" } } → 201 { "id": "c_2055", "pan": "4093…2055", "network": "visa", "status": "live" }

Payments

POST/payments
POST/payments/requests
POST /v1/payments { "to": "agent://scout-3", "amount": 12.50, "asset": "usdc" } → 201 { "id": "p_44", "status": "confirmed", "chain": "0g" }

Micro-payments

POST/payments/stream
POST /v1/payments/stream { "to": "agent://oracle-1", "ratePerCall": 0.002, "asset": "usdc" } → 201 { "id": "s_12", "status": "streaming", "chain": "0g" }

Policy & guardrails

POST/policy
POST /v1/policy { "agent": "atlas-7", "rules": { "maxPerTx": 1000, "dailyCap": 5000, "approveOver": 2500 } }
This documentation describes a conceptual product prototype. The endpoints above are served by the bundled NestJS API.
Open the console →