Usage

GET /v1/usage reports the balance and the spend of the day for the key's account. It is admitted like an inference request: it uses one request of the key's rate limit and counts against its spend caps, so poll it modestly.

Request#

No body. Use the same credential as everywhere:

cURLbash
curl -sSf https://api.zdr.sh/v1/usage \  -H "Authorization: Bearer $ZDR_API_KEY"

Response#

json
{"balance_eur":"12.40","plan":null,"today":{"spend_eur":"0.83","tokens":412300,"requests":41}}
FieldMeaning
balance_eurThe credit left, in EUR, as a string so no client rounds it
planAlways null; the field stays so a client that reads it keeps working
today.spend_eurWhat the account spent since midnight UTC
today.tokensTokens billed today, across the account's keys
today.requestsRequests made today, across the account's keys

The balance is the only thing that decides whether a request is admitted. There is no period, no allowance and no reset to report. Limits has the rate limits and the balance rules.

A 503 here means a temporary failure on our side: retry shortly. The body has the OpenAI error shape.