Kosten nach Dimension abrufen
anthropic-beta: analytics-usage-cost-2026-08-24. Learn how to send beta headers.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. This
endpoint is in beta and is not available to organizations with HIPAA
readiness enabled: their API requests return a 400 error. A parent
organization's report across its child organizations leaves out the child
organizations that have HIPAA readiness enabled. If the parent has child
organizations and all of them have HIPAA readiness enabled, the request
returns a 400 error.
Parameters
Returns
ant beta:organization:analytics:cost list \
--starting-at ''\''2026-09-01T00:00:00Z'\'''{
"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_01WxYzAbCdEfGhJkMnPqRsTu"
},
"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",
"organization_id": "12345678-1234-5678-1234-567812345678",
"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": "2026-10-01T04:02:11Z",
"has_more": true,
"next_page": "next_page"
}Returns Examples
{
"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_01WxYzAbCdEfGhJkMnPqRsTu"
},
"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",
"organization_id": "12345678-1234-5678-1234-567812345678",
"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": "2026-10-01T04:02:11Z",
"has_more": true,
"next_page": "next_page"
}