Get Messages Usage Report
Changed on[Legacy] Get a report of your organization's Messages API usage, aggregated into time buckets.
This endpoint is part of the legacy Usage and Cost API. For new integrations, use GET /v1/organizations/analytics/usage in the Usage and Cost Analytics API instead. To move an existing integration, see Migrate from the Usage and Cost API.
Request
- Base URLhttps://api.anthropic.com
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Maximum number of time buckets to return in the response.
The default and max limits depend on bucket_width: • "1d": Default of 7 days, maximum of 31 days • "1h": Default of 24 hours, maximum of 168 hours • "1m": Default of 60 minutes, maximum of 1440 minutes
Optionally set to the next_page token from the previous response.
Time buckets that start on or after this RFC 3339 timestamp will be returned. Each time bucket will be snapped to the start of the minute/hour/day in UTC.
Time buckets that end before this RFC 3339 timestamp will be returned.
Restrict usage returned to the specified API key ID(s).
Restrict usage returned to the specified workspace ID(s).
Restrict usage returned to the specified user account ID(s).
Restrict usage returned to the specified service account ID(s).
Restrict usage returned to the specified model(s).
Restrict usage returned to the specified service tier(s).
[ "standard" ]
Restrict usage returned to the specified context window(s). See the context_window response field for how a request is classified.
Restrict usage returned to the specified inference geo(s). Use not_available for models that do not support specifying inference_geo.
Restrict usage returned to the specified speed(s).
Group by any subset of the available options.
Time granularity of the response data.
Headers
The version of the Claude API you want to use.
Read more about versioning and our version history here.
Response
Successful Response
Example response
{
"data": [
{
"starting_at": "2025-08-01T00:00:00Z",
"ending_at": "2025-08-02T00:00:00Z",
"results": [
{
"uncached_input_tokens": 1500,
"cache_read_input_tokens": 200,
"output_tokens": 500,
"server_tool_use": {
"web_search_requests": 10
},
"api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
"account_id": "user_01WxYzAbCdEfGhJkMnPqRsTu",
"service_account_id": "svac_01Hk3R9TWxq7CfQak00OiVw4",
"model": "claude-opus-5-5",
"service_tier": "standard"
}
]
}
],
"next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}Changes
- info
added the enum value
admin-user-sign-out-2026-10-08to the propertyitems/anyOf[subschema #2]/of theheaderrequest parameteranthropic-beta
- info
- info
added the enum value
experimental-claude-tag-2026-10-21to the propertyitems/anyOf[subschema #2]/of theheaderrequest parameteranthropic-beta
- info