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
Response#
json
| Field | Meaning |
|---|---|
balance_eur | The credit left, in EUR, as a string so no client rounds it |
plan | Always null; the field stays so a client that reads it keeps working |
today.spend_eur | What the account spent since midnight UTC |
today.tokens | Tokens billed today, across the account's keys |
today.requests | Requests 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.