v4
latestOpenAPI 3.1.02026-08-08349225311.7 KBGet Token Usage
Get token usage aggregated into 15-minute buckets by user and model.
Returns usage broken down by:
- input_tokens: Total input tokens
- cached_tokens: Cached input tokens
- new_input_tokens: New input tokens (input - cached)
- output_tokens: Total output tokens
- reasoning_tokens: Reasoning output tokens
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