ee473d0e84e0
Get Token Usage
Get token usage aggregated into 15-minute buckets 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.
Query parameters
Filter by user ID (admin only)
Filter by user ID (admin only)
Return data for all users (admin only opt-in)
Return data for all users (admin only opt-in)
Scope to an organization's members (org admin only)
Scope to an organization's members (org admin only)
Filter by model name
Filter by model name
Start date (ISO 8601)
Start date (ISO 8601)
End date (ISO 8601)
End date (ISO 8601)
Response
Successful Response