Get Token Usage Over Time
Get token usage over time across a date range.
Returns token usage bucketed by minute, hour, or day, optionally broken down by product, model, context window, inference region, or speed. Available to organizations on a Claude Enterprise plan. Requires an API key with the read:analytics scope.
Query parameters
Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
End of range, exclusive. When omitted, defaults to the earlier of now and starting_at + 31 days. The range may span at most 31 days.
End of range, exclusive. When omitted, defaults to the earlier of now and starting_at + 31 days. The range may span at most 31 days.
Time bucket granularity.
Time bucket granularity.
Product surfaces to include. Defaults to all products. Use group_by[]=product to break out per-product values.
Product surfaces to include. Defaults to all products. Use group_by[]=product to break out per-product values.
Models to include. Defaults to all models. Use group_by[]=model to break out per-model values.
Models to include. Defaults to all models. Use group_by[]=model to break out per-model values.
Filter to specific context-window pricing tiers. Use group_by[]=context_window to break out per-tier values.
Filter to specific context-window pricing tiers. Use group_by[]=context_window to break out per-tier values.
Filter to specific inference regions. not_available matches rows where the region is unset. Use group_by[]=inference_geo to break out per-region values.
Filter to specific inference regions. not_available matches rows where the region is unset. Use group_by[]=inference_geo to break out per-region values.
Filter to fast or standard inference mode. Use group_by[]=speed to break out per-mode values.
Filter to fast or standard inference mode. Use group_by[]=speed to break out per-mode values.
Filter to usage originating from specific Slack channels. Use group_by[]=slack_channel_id to break out per-channel values.
Filter to usage originating from specific Slack channels. Use group_by[]=slack_channel_id to break out per-channel values.
[ "C0123ABCDEF" ]
Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group IDs (rbac_group_...) or bare group UUIDs. A row matches when the user belonged to any of the listed groups on the (UTC) day the usage occurred; usage with no group attribution never matches.
Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group IDs (rbac_group_...) or bare group UUIDs. A row matches when the user belonged to any of the listed groups on the (UTC) day the usage occurred; usage with no group attribution never matches.
[ "rbac_group_012rppKaSVsmTo6NqRDXQXNF" ]
Filter to specific users by tagged user ID.
Filter to specific users by tagged user ID.
Maximum number of time buckets per page. Defaults and caps vary by bucket_width (1d: default 7, max 31; 1h: default 24, max 168; 1m: default 60, max 256).
Maximum number of time buckets per page. Defaults and caps vary by bucket_width (1d: default 7, max 31; 1h: default 24, max 168; 1m: default 60, max 256).
Opaque cursor from a previous response's next_page field.
Opaque cursor from a previous response's next_page field.
Dimensions to break each time bucket out by. Defaults to no grouping (one total per bucket). Each bucket reports at most its top 100 groups; a group beyond that cap has no row in that bucket (there is no remainder row), so grouped buckets are not exhaustive when a dimension has more than 100 distinct values.
Dimensions to break each time bucket out by. Defaults to no grouping (one total per bucket). Each bucket reports at most its top 100 groups; a group beyond that cap has no row in that bucket (there is no remainder row), so grouped buckets are not exhaustive when a dimension has more than 100 distinct values.
Headers
Your unique Admin API key for authentication.
This key is required in the header of all Admin API requests, to authenticate your account and access Anthropic's services. Get your Admin API key through the Console.
Response
Successful Response
Example response
{
"data": [
{
"results": [
{
"model": "claude-opus-5",
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"server_tool_use": {
"web_search_requests": 10
},
"slack_channel_id": "C0123ABCDEF",
"speed": "fast"
}
]
}
],
"organization_id": "org_013FP9SaFPBg7Kw7fetjn6cF"
}