Get Cost By Dimension
GET/v1/organizations/analytics/cost
Get cost in USD across a date range, broken out by dimension.
Returns one row per combination of the requested group_by[]
dimensions (and time bucket, when time_bucket_width is set) that has
cost in the range, ranked by spend or ordered by time bucket; every
combination is returned across pages. With no group_by[] and no
time_bucket_width, a single row aggregates the whole range. Includes
all cost, whether or not it is attributable to a seat user. Requires an
API key with the read:analytics scope, or an Admin API key.
Query parameters
Headers
Returns
Get Cost By Dimension
curl https://api.anthropic.com/v1/organizations/analytics/cost \
-H 'anthropic-version: 2026-10-21' \
-H 'anthropic-beta: analytics-usage-cost-2026-08-24' \
-H "Authorization: Bearer $ANTHROPIC_API_KEY"Response 200
{
"data": [
{
"cost": {
"amount": "41280.000000",
"currency": "USD",
"list_amount": "51600.000000",
"requests": 128
},
"ending_at": "2026-10-01T00:00:00Z",
"group": {
"actor": {
"deleted": false,
"email_address": "user@emaildomain.com",
"name": "Jane Doe",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"actor_type": "user_actor",
"agent_id": "agent_01VHd3EAGJ6PLkP9LM7DDu3f",
"api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"cost_type": "tokens",
"deployment_id": "depl_01JFC6ihzZHtAuyHsaENdJhY",
"environment_id": "env_017oTjuGedHtjhJauVC5xGJD",
"inference_geo": "global",
"model": "claude-opus-5-5",
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"service_tier": "standard",
"session_id": "sesn_0187kPDyNCwibNNvfaPEApCJ",
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"token_type": "cache_creation.ephemeral_1h_input_tokens",
"user_profile_id": "uprof_01M33NeYUQK2WV9PpYcsPHLi",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
},
"starting_at": "2026-09-01T00:00:00Z"
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"cost": {
"amount": "41280.000000",
"currency": "USD",
"list_amount": "51600.000000",
"requests": 128
},
"ending_at": "2026-10-01T00:00:00Z",
"group": {
"actor": {
"deleted": false,
"email_address": "user@emaildomain.com",
"name": "Jane Doe",
"type": "user_actor",
"user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
},
"actor_type": "user_actor",
"agent_id": "agent_01VHd3EAGJ6PLkP9LM7DDu3f",
"api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
"claude_tag_category": "dm",
"claude_tag_user_id": "U0123ABCDEF",
"context_window": "0-200k",
"cost_type": "tokens",
"deployment_id": "depl_01JFC6ihzZHtAuyHsaENdJhY",
"environment_id": "env_017oTjuGedHtjhJauVC5xGJD",
"inference_geo": "global",
"model": "claude-opus-5-5",
"product": "chat",
"rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
"service_tier": "standard",
"session_id": "sesn_0187kPDyNCwibNNvfaPEApCJ",
"slack_channel_id": "C0123ABCDEF",
"speed": "fast",
"token_type": "cache_creation.ephemeral_1h_input_tokens",
"user_profile_id": "uprof_01M33NeYUQK2WV9PpYcsPHLi",
"workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
},
"starting_at": "2026-09-01T00:00:00Z"
}
],
"data_refreshed_at": "2019-12-27T18:11:19.117Z",
"has_more": true,
"next_page": "next_page"
}