Get Messages Usage Report
/v1/organizations/usage_report/messages
Get Messages Usage Report
Query Parameters
starting_at: string
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.
formatdate-time
api_key_ids: optional array of string
Restrict usage returned to the specified API key ID(s).
ending_at: optional string
Time buckets that end before this RFC 3339 timestamp will be returned.
formatdate-time
limit: optional number
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
models: optional array of string
Restrict usage returned to the specified model(s).
page: optional string
Optionally set to the next_page token from the previous response.
formatdate-time
workspace_ids: optional array of string
Restrict usage returned to the specified workspace ID(s).
Returns
Get Messages Usage Report
cURL
curl https://api.anthropic.com/v1/organizations/usage_report/messages \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"{
"data": [
{
"ending_at": "2025-08-02T00:00:00Z",
"results": [
{
"api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
"cache_creation": {
"ephemeral_1h_input_tokens": 1000,
"ephemeral_5m_input_tokens": 500
},
"cache_read_input_tokens": 200,
"context_window": "0-200k",
"model": "claude-sonnet-4-20250514",
"output_tokens": 500,
"server_tool_use": {
"web_search_requests": 10
},
"service_tier": "standard",
"uncached_input_tokens": 1500,
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
}
],
"starting_at": "2025-08-01T00:00:00Z"
}
],
"has_more": true,
"next_page": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"data": [
{
"ending_at": "2025-08-02T00:00:00Z",
"results": [
{
"api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
"cache_creation": {
"ephemeral_1h_input_tokens": 1000,
"ephemeral_5m_input_tokens": 500
},
"cache_read_input_tokens": 200,
"context_window": "0-200k",
"model": "claude-sonnet-4-20250514",
"output_tokens": 500,
"server_tool_use": {
"web_search_requests": 10
},
"service_tier": "standard",
"uncached_input_tokens": 1500,
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
}
],
"starting_at": "2025-08-01T00:00:00Z"
}
],
"has_more": true,
"next_page": "2019-12-27T18:11:19.117Z"
}