GET
GET /v1/organizations/usage_report/messages?beta=true — Claude API
Beta
Anthropic API key (required); https://api.anthropic.com
Claude APIGet Messages Usage Report
- Base URL
- https://api.anthropic.com
- Auth
- x-api-key: <ANTHROPIC_API_KEY>
- Last verified
- 2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 372 tokens · Vary: Accept
→ 372 tokens · Vary: Accept
Critical gotchas
Authentication uses the x-api-key header and requests also require an anthropic-version header.
The official OpenAPI URL is discovered from the SDK repository manifest and must remain under Anthropic's trusted Stainless storage prefix.
cURL
curl -X GET 'https://api.anthropic.com/v1/organizations/usage_report/messages?beta=true&limit=10&page=example-page&starting_at=example-starting-at&ending_at=example-ending-at&api_key_ids%5B%5D=example&workspace_ids%5B%5D=example&account_ids%5B%5D=example&service_account_ids%5B%5D=example&models%5B%5D=example&service_tiers%5B%5D=example&context_window%5B%5D=example&inference_geos%5B%5D=example&speeds%5B%5D=example&group_by%5B%5D=example&bucket_width=1d' \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H 'anthropic-version: 2023-06-01'
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| limit | query | integer | No | 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 |
| page | query | string | No | Optionally set to the `next_page` token from the previous response. |
| starting_at | query | string | Yes | 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. |
| ending_at | query | string | No | Time buckets that end before this RFC 3339 timestamp will be returned. |
| api_key_ids[] | query | string[] | No | Restrict usage returned to the specified API key ID(s). |
| workspace_ids[] | query | string[] | No | Restrict usage returned to the specified workspace ID(s). |
| account_ids[] | query | string[] | No | Restrict usage returned to the specified user account ID(s). |
| service_account_ids[] | query | string[] | No | Restrict usage returned to the specified service account ID(s). |
| models[] | query | string[] | No | Restrict usage returned to the specified model(s). |
| service_tiers[] | query | string[] | No | Restrict usage returned to the specified service tier(s). |
| context_window[] | query | string[] | No | Restrict usage returned to the specified context window(s). |
| inference_geos[] | query | string[] | No | Restrict usage returned to the specified inference geo(s). Use `not_available` for models that do not support specifying `inference_geo`. |
| speeds[] | query | string[] | No | Restrict usage returned to the specified speed(s) (Claude Code research preview). Requires the `fast-mode-2026-02-01` beta header. |
| group_by[] | query | string[] | No | Group by any subset of the available options. Grouping by `speed` requires the `fast-mode-2026-02-01` beta header. |
| bucket_width | query | string | No | Time granularity of the response data. |
Response 200 OK
{
"data": [
{
"starting_at": "2026-09-03T00:00:00Z",
"ending_at": "2026-09-03T00:00:00Z",
"results": [
{
"uncached_input_tokens": 0,
"cache_creation": {
"ephemeral_1h_input_tokens": "[recursive or deeply nested schema]",
"ephemeral_5m_input_tokens": "[recursive or deeply nested schema]"
},
"cache_read_input_tokens": 0,
"output_tokens": 0,
"server_tool_use": {
"web_search_requests": "[recursive or deeply nested schema]"
},
"api_key_id": "string",
"workspace_id": "string",
"account_id": "string",
"service_account_id": "string",
"model": "string",
"service_tier": "batch",
"context_window": "0-200k",
"inference_geo": "global"
}
]
}
],
"has_more": true,
"next_page": "string"
} Get a free Claude API key → sponsored Affiliate link - we may earn a commission, at no extra cost to you.