ClawBank provides two authentication methods: Session Auth for user-facing operations and API Key Auth for autonomous agent transactions.
Used by AI agents for autonomous transactions.
Authorization: Bearer cb_your_api_keySupabase session cookie — set automatically after login.
Cookie: sb-xxx-auth-token=.../api/agent/balanceAPI KeyGet real-time SOL balance for the authenticated agent's wallet.
{
"data": {
"wallet_address": "9xDm...",
"balance_sol": 1.2345,
"balance_lamports": 1234500000
}
}/api/agent/transactAPI KeySend SOL from the agent's wallet. Platform fee (0.5%) deducted automatically. Transaction is simulated before signing.
{
"to": "RECIPIENT_SOLANA_ADDRESS",
"amount_sol": 0.1,
"memo": "optional memo string"
}{
"data": {
"signature": "5eykt...",
"amount_sol": 0.0995,
"fee_sol": 0.0005,
"to": "RECIPIENT_ADDRESS",
"explorer_url": "https://explorer.solana.com/tx/..."
}
}/api/agent/withdrawSessionUser-initiated withdrawal from an agent wallet. Requires session auth + agent ownership.
{
"agent_id": "uuid",
"to": "RECIPIENT_SOLANA_ADDRESS",
"amount_sol": 0.5
}{
"data": {
"signature": "5eykt...",
"amount_sol": 0.4975,
"fee_sol": 0.0025,
"to": "RECIPIENT_ADDRESS",
"explorer_url": "https://explorer.solana.com/tx/..."
}
}/api/agentsSessionList all agents owned by the authenticated user.
{
"data": [
{
"id": "uuid",
"name": "Trading Bot",
"wallet_address": "9xDm...",
"status": "active",
"daily_limit": 10,
"max_tx_limit": 1
}
]
}/api/agentsSessionCreate a new agent. Generates a Solana keypair automatically. Returns the API key ONCE — store it securely.
{
"name": "My AI Agent",
"description": "Optional description"
}{
"data": {
"id": "uuid",
"name": "My AI Agent",
"wallet_address": "9xDm...",
"api_key": "cb_abc123...",
"status": "active"
}
}/api/agents/:idSessionUpdate agent settings including spending limits.
{
"daily_limit": 5,
"max_tx_limit": 0.5,
"status": "inactive"
}{ "data": { "id": "...", "daily_limit": 5 } }/api/agents/:id/balanceSessionGet real-time balance for a specific agent by ID.
{
"data": {
"address": "9xDm...",
"balance_sol": 1.23,
"balance_lamports": 1230000000
}
}/api/agents/:id/transactionsSessionPaginated transaction history for an agent. Query params: limit (max 100), offset.
{
"data": [
{
"id": "uuid",
"type": "agent_tx",
"amount": 0.1,
"fee_taken": 0.0005,
"signature": "5eykt...",
"status": "confirmed",
"created_at": "2026-01-01T00:00:00Z"
}
]
}/api/healthNonePlatform health check + Solana RPC status.
{
"status": "ok",
"timestamp": "2026-01-01T00:00:00Z",
"solana": { "online": true, "slot": 300000000, "latency_ms": 42 },
"network": "devnet"
}400Bad RequestInvalid JSON or failed validation401UnauthorizedMissing or invalid API key / session403ForbiddenSpending limit exceeded or agent inactive404Not FoundAgent not found or not owned by user500Server ErrorTransaction failed or internal error502Bad GatewaySolana RPC unavailable