Get Organization Usage
/enterprise/v1/usageUse 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.
group | Usage only: HOUR, DAY (default), MODEL |
page | 1–1000; default 1 |
limit | 1–200; default 50 |
subAccountId | Optional member identifier from the member API |
keyDisplay | Optional 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.