Usage
What a key can learn about its own balance and limits, and what null means.
GET /v1/usage answers three questions a client otherwise has to guess at: how
much credit is behind this key, what the key is held to per minute, and when it
stops working. It takes the same Authorization: Bearer header as every other
route and needs the usage:read scope — or a key with no scopes, which is
unrestricted.
{
"object": "usage",
"organisation_id": "9b1fb56e-…",
"api_key_id": "2c565c6a-…",
"balance": {
"currency": "EUR",
"booked_micro_eur": 12340000,
"reserved_micro_eur": 40000,
"available_micro_eur": 12300000
},
"limits": {
"key": { "requests_per_minute": 60, "tokens_per_minute": 100000 },
"organisation": { "requests_per_minute": null, "tokens_per_minute": 1000000 }
},
"expires_at": "2026-12-31T00:00:00Z"
}The balance is the organisation's
Every key of an organisation sees the same wallet. The balance is the number
that explains a 402 insufficient_balance, and a developer whose requests are
being refused is exactly who needs to see it coming. Amounts are integers in
micro-EUR — 1000000 is one euro — with the currency beside them, the same
shape the console reads.
available_micro_eur is booked minus reserved. It can be negative: a
settlement may exceed the reservation that preceded it, because the provider's
own usage counts are the only billing truth and a reservation is an estimate.
What limits reports
The numbers are what the rate limiter enforces, not what somebody typed. The
key pair is the key's own limits from the console. The organisation pair is
the organisation's own limits where it has them, and konduit's deployment-wide
default where it does not, one field at a time.
null means no ceiling. It is never 0, because 0 would read as zero per
minute. konduit's production deployment does set an organisation-wide default
for both fields, so an organisation that has configured nothing sees that
default here, not null, and is held to exactly it. null appears only where
neither the organisation nor the deployment sets the field. The number this
endpoint reports is the one to size a client against.
What it does not report
Spend over time, and how much of a rate limit is left right now. Both are deliberate omissions, for now: spend lives in a database this route does not read, and a remaining-per-minute number is stale before it is rendered. See Rate limits for how the buckets are charged.
Refusals
| Status | code | When |
|---|---|---|
| 401 | missing_api_key, invalid_api_key | See Authentication. |
| 403 | insufficient_scope | The key has scopes and usage:read is not among them. |
| 429 | rate_limit_exceeded | This route counts against the key's request and token buckets like any other; a key that has spent its tokens-per-minute is refused here too. |
| 503 | ledger_unavailable | konduit could not read the ledger, or this deployment has none configured. Where a ledger is configured, completions are failing for the same reason; retry shortly. |