Get Organization Usage

GET/enterprise/v1/usage

Use a MANAGEMENT Admin API Key issued by the organization owner, with Authorization: Bearer <ADMIN_API_KEY> and tenant:billing:read. The owner must remain active and retain organization-owner privileges. Do not use an inference key or session JWT. Success uses {code:200,data:...}.

Query parameters are camelCase. startTime and endTime are UTC epoch seconds, not milliseconds: 0 <= startTime < endTime <= now, at most 31 days. Both boundaries must align to UTC hours. Defaults: end of the last completed UTC hour and the preceding 30 days.

groupUsage only: HOUR, DAY (default), MODEL
page1–1000; default 1
limit1–200; default 50
subAccountIdOptional member identifier from the member API
keyDisplayOptional key identifier from the member-key API; never the secret

When both filters are supplied, the key must belong to that member. data contains items, hasMore, and next. When hasMore is true, pass next as the next page, retaining the same filters and explicit time range. Stop when false. Concurrent rollup updates may change results; use a settled window for reconciliation.

Rows contain bucketStart, model, modelType, requests, inputTokens, outputTokens, cacheReadTokens, cacheCreation5mTokens, cacheCreation1hTokens, imageCount, videoSeconds, amount, walletAmount, voucherAmount. bucketStart is null for MODEL grouping. Amounts are USD. These are hourly usage rollups, not finalized invoices; recent billing may lag. No tenant selector is accepted.

Request

Shell
1curl "https://api.token360.ai/enterprise/v1/usage" \
2  -H "Authorization: Bearer $ADMIN_API_KEY"

Errors use serviceCode: API_KEY_SCOPE_DENIED for missing scope, INVALID_ADMIN_QUERY for invalid queries, INVALID_TIME_RANGE for invalid time windows. Do not automatically broaden key permissions.

HOUR / DAY groups retain model and model type, so a day/hour can have multiple rows. The time interval is half-open [startTime,endTime).

Empty-result example:

JSON
1{"code":200,"data":{"items":[],"hasMore":false,"next":null},"msg":"success"}
Was this page helpful?
Get Organization Usage · Token360