Usage API
GET /api/v1/usage returns your workspace’s usage, remaining balance and rate
limit as JSON. It is the same data as the Usage
dashboard, for tools and scripts to read.
curl https://api.resetdata.ai/api/v1/usage \ -H "Authorization: Bearer $RESETDATA_API_KEY"Authenticate with an API key (sk-rd-…), the same key as the inference API — not
a session token. There are no parameters. The endpoint is read-only and charges
nothing. It has its own rate limit, separate from the inference API, so
polling it does not use your inference quota (a 429 here is that separate limit).
What you get back
Section titled “What you get back”The figures are workspace-wide: every API key plus web-app traffic, which carries no key. They match the usage dashboard for the same window; the balance in the same response is workspace-wide too, so it moves with them.
{ "data": { "api_key_id": "7c9e…", "workspace_id": "3f1a…", "currency": "AUD", "generated_at": "2026-11-09T02:00:00Z", "balance": { "remaining_credits": 42.50, "locked_credits": 0 }, "rate_limits": { "requests_per_minute": 40, "window_seconds": 60 }, "usage": { "today": { "…": "…" }, "current_billing_period": { "…": "…" }, "rolling_30_days": { "start": "2026-10-10T02:00:00Z", "end": "2026-11-09T02:00:00Z", "requests": 8421, "input_tokens": 48210500, "output_tokens": 16873900, "estimated_cost": 73.64, "by_model": [{ "id": "a1b2…", "name": "GLM 5.3", "requests": 6120, "…": "…" }, "…"], "by_project": [{ "id": "no_project", "name": "No Project", "requests": 8415, "…": "…" }, "…"] } } }}| Field | Meaning |
|---|---|
api_key_id |
The key that authenticated this call. It is not a filter — the usage below is the whole workspace. |
balance.remaining_credits |
Spendable workspace balance, ex-GST. Shared across all keys. |
balance.locked_credits |
Credit held back and not yet spendable. Not part of remaining_credits. |
rate_limits.requests_per_minute |
The workspace’s per-minute request limit — the same tier the inference API uses. This endpoint enforces it on its own counter, so polling here does not consume inference quota. |
rate_limits.window_seconds |
The rate-limit window in seconds (currently 60). |
usage.{window} |
Usage for a time window (see below), with by_model and by_project breakdowns. |
requests |
Metered requests in the window, including errors. |
input_tokens / output_tokens |
Prompt and completion tokens. Not summed into a total: the model’s own total can include cached and reasoning tokens. |
estimated_cost |
Spend over the window, AUD ex-GST. |
by_model and by_project break the window down by model and by project (one
row each is shown above), capped at the top 1000 groups. A breakdown row is
{ id, name, requests, input_tokens, output_tokens, estimated_cost }. Usage not
tied to a project is one row with id no_project. There is no per-key breakdown.
The window totals above are exact (computed ungrouped), so they can exceed the
sum of a capped breakdown.
balance is null when the workspace has no billing account — usage is still
returned. A window with no usage returns zero totals and empty [] breakdowns,
not an error.
Time windows
Section titled “Time windows”| Window | Covers |
|---|---|
today |
From local midnight (the dashboard timezone, Australia/Sydney by default) to now. |
current_billing_period |
From the workspace’s billing anchor day to now, in the same timezone as today. |
rolling_30_days |
The last 30 × 24 hours, ending at generated_at. |
All three end at generated_at, so two calls minutes apart can differ by a few
requests near a window edge — that is time passing, not an inconsistency.
Errors
Section titled “Errors”| Code | Meaning |
|---|---|
| 401 | Missing, malformed, invalid, revoked or expired key. |
| 403 | Account email not verified. |
| 429 | Rate limit exceeded (this endpoint’s own limit). |
| 5xx | A server or auth-backend error — safe to retry. |
The response carries your balance, so it is sent with Cache-Control: no-store.
Handy queries
Section titled “Handy queries”Pipe the response through jq:
# credits leftcurl -s https://api.resetdata.ai/api/v1/usage \ -H "Authorization: Bearer $RESETDATA_API_KEY" | jq '.data.balance.remaining_credits'
# today's cost and requestscurl -s https://api.resetdata.ai/api/v1/usage \ -H "Authorization: Bearer $RESETDATA_API_KEY" | jq '.data.usage.today | {estimated_cost, requests}'
# spend per model over the billing periodcurl -s https://api.resetdata.ai/api/v1/usage \ -H "Authorization: Bearer $RESETDATA_API_KEY" \ | jq -r '.data.usage.current_billing_period.by_model[] | "\(.name): \(.estimated_cost)"'See Usage and costs for how spend is measured, and Billing for funding the wallet.