Get Token Usage
Changed onGet token usage aggregated into time buckets (15 minutes by default) by user and model.
Returns usage broken down by:
- input_tokens: Total input tokens as the provider reported them
- cached_tokens: Cache read tokens
- cache_write_tokens: Cache write tokens
- new_input_tokens: Input tokens billed at the full input rate
- output_tokens: Total output tokens
- reasoning_tokens: Reasoning output tokens (subset of output_tokens)
- billable_tokens: Every charged token, comparable to a provider console
Defaults to the caller's own data. Admin users (with @quadrillion.io email) may opt into cross-user data by passing user_id (specific user) or all_users=true (everyone). Non-admin requests for other users' data are silently scoped to the caller.
Passing org_id scopes the response to that organization's members and takes precedence over user_id/all_users. It requires platform admin or org admin/owner access (403 otherwise) and includes member identity in buckets.
Workloads read aggregate usage without identity unless explicitly granted platform administration. Admin workloads can also filter by user or org and see account identity.
Request
- Base URLhttps://api.quadrillion.io (the document declares no server; this is the origin it was published from)
- URLhttps://api.quadrillion.io/api/token_usage
- Authnone declared
Query parameters
Filter by user ID (admin only)
Return data for all users (admin only opt-in)
Scope to an organization's members (org admin only)
Filter by model name
Filter by opt-in attribution tag. Normalized like the stored tag, so 'HSBC Demo' matches rows written as 'hsbc-demo'.
Start date (ISO 8601)
End date (ISO 8601)
Keep only tags starting with this, e.g. 'benchmark'. Normalized before matching, preserving trailing '/' or '-'.
Width of each time bucket
Response
Successful Response
Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info
- info
added the new optional
queryrequest parameterattribution_prefix - info
added the new optional
queryrequest parameterbin_minutes
- info