API Reference
Usage
Wallet balance and per-key usage breakdown.
GET /v1/usage/:wallet
Get wallet balance and per-key usage breakdown. Accepts API key or SIWE auth.
curl https://agent-router.gaib.ai/v1/usage/0xYourWallet \
-H "Authorization: Bearer sk-your-key"curl "https://agent-router.gaib.ai/v1/usage/0xYourWallet?message=<siwe>&signature=<sig>"{
"wallet": "0xabc...",
"balance_usdc": 4950000,
"locked_usdc": 0,
"available_usdc": 4950000,
"keys": [
{
"api_key_id": 1,
"label": "my-app",
"request_count": 3,
"total_prompt_tokens": 66,
"total_completion_tokens": 174,
"total_charged_usdc": 50000,
"total_platform_revenue_usd": 0.008
}
]
}| Field | Unit | Conversion |
|---|---|---|
balance_usdc | micro-USDC | / 1_000_000 = USD |
available_usdc | micro-USDC | balance_usdc − locked_usdc |
total_charged_usdc | micro-USDC | / 1_000_000 = USD |