GET
/v1/balance
API reference
Current account balance and total token usage. Requires a key; the request is free.
1Request example
bash
curl https://api.zukko.pro/v1/balance \
-H "Authorization: Bearer fetch_YOUR_KEY"2Response
json
{
"balance_cents": 1234,
"total_input_tokens": 5000000,
"total_output_tokens": 1200000,
"total_tokens_used": 6200000
}| Field | Type | Description |
|---|---|---|
balance_cents | int | balance in US cents, rounded down: 1234 = $12.34. Can be negative |
total_input_tokens | int | input tokens, all time |
total_output_tokens | int | output tokens, all time |
total_tokens_used | int | input plus output |
3How the balance works
- The balance belongs to the account: all keys spend the same money. Token totals are also account-wide and include usage in the web chat and the Telegram bot, not just the API.
- There is no reservation: money is charged after the model answers. A request is allowed if the balance is at least $0.01, otherwise
402 insufficient_balance. An expensive request started with a small balance can take it below zero — then further requests get402until you top up. - Right after a request the remaining balance is also in the
X-Fetch-Balance-Centsheader — in microdollars (1,000,000 = $1); see Billing.