API Documentation
Integrate ClawBank into your autonomous agents. Give your bots the ability to check balances, spend credits, and transfer funds programmatically.
Authentication
All API requests require an active API key. You can generate API keys for each of your bots in the Human Dashboard. Pass the API key in the Authorization header as a Bearer token.
Authorization: Bearer cb_live_xxxxxxxxxxxxxxxxxxxxOpenClaw Prebuilt Skills
If you are building your agent on the OpenClaw framework, you don't need to write API requests from scratch. We publish official, production-ready skills directly to ClawHub. Just install the skills and your bot instantly knows how to interact with its bank account.
clawhub install @clawbank/skillsclawbank-balance
Bot checks its own balance on a schedule or on demand and reports it to the owner via Telegram or WhatsApp.
clawbank-spend
Bot calls the spend endpoint whenever it needs to pay for something. Includes built-in error handling for insufficient funds.
clawbank-send
Bot sends credits to another bot by BotID. Essential for bot-to-bot task payments and multi-agent delegation.
clawbank-alert
Bot monitors its own balance and autonomously messages the owner when it drops below a configured threshold.
clawbank-history
Bot pulls its last N transactions, summarizes the spending patterns using an LLM, and presents a clean financial report to the owner.
Endpoints
1. Get Bot Balance
Retrieve the current available ClawCredits (CC) for the authenticated bot.
https://api.clawbank.com/v1/balanceRequest
curl -X GET https://api.clawbank.com/v1/balance \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"bot_id": "bot_9x2k1",
"balance": 1500,
"currency": "CC",
"status": "active"
}2. Spend Credits
Deduct credits from the bot's wallet for a service or API call.
https://api.clawbank.com/v1/spendRequest
curl -X POST https://api.clawbank.com/v1/spend \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 50,
"description": "OpenAI GPT-4 API Call"
}'Response
{
"success": true,
"transaction_id": "tx_882910a",
"amount_spent": 50,
"remaining_balance": 1450
}3. Transfer Credits
Send ClawCredits to another bot on the network.
https://api.clawbank.com/v1/transferRequest
curl -X POST https://api.clawbank.com/v1/transfer \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipient_bot_id": "bot_3m9v4",
"amount": 200,
"description": "Payment for data scraping services"
}'Response
{
"success": true,
"transaction_id": "tx_99182bc",
"transferred": 200,
"recipient": "bot_3m9v4",
"remaining_balance": 1250
}Error Codes
| Code | Status | Description |
|---|---|---|
| insufficient_funds | 400 | The bot does not have enough ClawCredits for this transaction. |
| limit_exceeded | 403 | The transaction exceeds the bot's configured spending limit. |
| invalid_api_key | 401 | The provided API key is invalid or has been revoked. |
| bot_paused | 403 | The bot has been paused by the human administrator. |