Follow Discord
Sweep 30 Oct 2026 · 01:02Z Build v2.1.314 532 read Stable v2.1.308 Latest v2.1.314 Next v2.1.314 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Analytics changedapi/beta/organization/analytics

Nearest release: v2.1.314, published 6 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+1,948added
Lines−30removed
From line 6 where the diff opens
First seen 10 Sep 2026 this site's first read of the page
Recorded edits12to this page, all time

### Beta Analytics Actor ### Beta Analytics Actor Type ### Beta Analytics API Actor ### Beta Analytics Federated Actor ### Beta Analytics Federated Actor AWS Provider ### Beta Analytics Federated Actor Azure Provider ### Beta Analytics Federated Actor GCP Provider ### Beta Analytics Federated Actor OIDC Provider ### Beta Analytics Federated Actor Provider ### Beta Analytics Grouped Cost Type ### Beta Analytics Report User Actor ### Beta Analytics Service Account Actor ### Beta Analytics Service Tier ### Beta Analytics Speed ### Beta Analytics Time Bucket Width ### Beta Analytics Usage Cost Inference Geo ### Beta Analytics Usage Cost Product Filter ### Beta Analytics Usage Cost Sort Order ## Analytics › Usage ### Get Token Usage By Dimension ## Analytics › Cost ### Get Cost By Dimension

The whole hunk

from line 6, old and new numbered
/
lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.

from line 6
66# Analytics
77 
88## Domain types
9 
10### Beta Analytics Actor
11 
12- `BetaAnalyticsActor = BetaAnalyticsReportUserActor or BetaAnalyticsServiceAccountActor or BetaAnalyticsFederatedActor or BetaAnalyticsAPIActor`
13 
14 - `BetaAnalyticsReportUserActor object`
15 
16 - `type: "user_actor"`
17 
18 Actor type. Always `"user_actor"`.
19 
20 - `deleted: boolean`
21 
22 True when the account has been deleted, or when the user is no longer a member of the organization or its associated organizations (for example, their membership was removed or they were deprovisioned via your identity provider). `email_address` stays populated for removed users and is null when the account has been deleted. `name` follows the rules described on that field. The `user_id` is still populated for reconciliation.
23 
24 - `email_address: string or null`
25 
26 The user's current email address, including for users who are no longer members of the organization. Null when the account has been deleted and for system-minted service accounts.
27 
28 - `name: string or null`
29 
30 The user's current full name. Null when the user has not set one. `"Deleted User"` when the account has been deleted, or when the user is no longer a member and the organization hides removed users' names.
31 
32 - `user_id: string`
33 
34 Tagged user ID.
35 
36 - `BetaAnalyticsServiceAccountActor object`
37 
38 - `type: "service_account_actor"`
39 
40 - `service_account_id: string`
41 
42 Tagged service account ID.
43 
44 - `BetaAnalyticsFederatedActor object`
45 
46 - `type: "federated_actor"`
47 
48 - `provider: BetaAnalyticsFederatedActorProvider`
49 
50 The trusted provider that asserted the caller's identity.
51 
52 - `BetaAnalyticsFederatedActorAWSProvider object`
53 
54 - `type: "aws"`
55 
56 - `account_id: string`
57 
58 The AWS account the organization is bound to.
59 
60 - `signed_principal: string`
61 
62 The AWS-signed ARN of the IAM principal that made the requests.
63 
64 - `BetaAnalyticsFederatedActorAzureProvider object`
65 
66 - `type: "azure"`
67 
68 - `subscription_id: string`
69 
70 The Azure subscription the organization is bound to.
71 
72 - `BetaAnalyticsFederatedActorGCPProvider object`
73 
74 - `type: "gcp"`
75 
76 - `project_number: string`
77 
78 The Google Cloud project the organization is bound to.
79 
80 - `BetaAnalyticsFederatedActorOIDCProvider object`
81 
82 - `type: "oidc"`
83 
84 - `issuer: string or null`
85 
86 The federation issuer's URL.
87 
88 - `subject: string or null`
89 
90 The provider's identifier for the caller: on `aws`, the IAM principal ARN (one role is one actor across its sessions); on `gcp`, the caller's IAM principal identifier as Google Cloud reports it, such as `serviceAccount:<email>`, `user:<email>`, or a `principal://...` URI.
91 
92 - `BetaAnalyticsAPIActor object`
93 
94 - `type: "api_actor"`
95 
96 - `api_key_id: string`
97 
98 Tagged API key ID.
99 
100### Beta Analytics Actor Type
101 
102- `BetaAnalyticsActorType = "api_actor" or "federated_actor" or "service_account_actor" or "user_actor"`
103 
104 Kind of identity a row's usage is attributed to.
105 
106 - `"api_actor"`
107 
108 - `"federated_actor"`
109 
110 - `"service_account_actor"`
111 
112 - `"user_actor"`
113 
114### Beta Analytics API Actor
115 
116- `BetaAnalyticsAPIActor object`
117 
118 - `type: "api_actor"`
119 
120 - `api_key_id: string`
121 
122 Tagged API key ID.
9123 
10124### Beta Analytics Artifact Activity
11125 
from line 1160
10461160 
10471161 Number of messages sent in Claude Design sessions
10481162 
1163### Beta Analytics Federated Actor
1164 
1165- `BetaAnalyticsFederatedActor object`
1166 
1167 - `type: "federated_actor"`
1168 
1169 - `provider: BetaAnalyticsFederatedActorProvider`
1170 
1171 The trusted provider that asserted the caller's identity.
1172 
1173 - `BetaAnalyticsFederatedActorAWSProvider object`
1174 
1175 - `type: "aws"`
1176 
1177 - `account_id: string`
1178 
1179 The AWS account the organization is bound to.
1180 
1181 - `signed_principal: string`
1182 
1183 The AWS-signed ARN of the IAM principal that made the requests.
1184 
1185 - `BetaAnalyticsFederatedActorAzureProvider object`
1186 
1187 - `type: "azure"`
1188 
1189 - `subscription_id: string`
1190 
1191 The Azure subscription the organization is bound to.
1192 
1193 - `BetaAnalyticsFederatedActorGCPProvider object`
1194 
1195 - `type: "gcp"`
1196 
1197 - `project_number: string`
1198 
1199 The Google Cloud project the organization is bound to.
1200 
1201 - `BetaAnalyticsFederatedActorOIDCProvider object`
1202 
1203 - `type: "oidc"`
1204 
1205 - `issuer: string or null`
1206 
1207 The federation issuer's URL.
1208 
1209 - `subject: string or null`
1210 
1211 The provider's identifier for the caller: on `aws`, the IAM principal ARN (one role is one actor across its sessions); on `gcp`, the caller's IAM principal identifier as Google Cloud reports it, such as `serviceAccount:<email>`, `user:<email>`, or a `principal://...` URI.
1212 
1213### Beta Analytics Federated Actor AWS Provider
1214 
1215- `BetaAnalyticsFederatedActorAWSProvider object`
1216 
1217 - `type: "aws"`
1218 
1219 - `account_id: string`
1220 
1221 The AWS account the organization is bound to.
1222 
1223 - `signed_principal: string`
1224 
1225 The AWS-signed ARN of the IAM principal that made the requests.
1226 
1227### Beta Analytics Federated Actor Azure Provider
1228 
1229- `BetaAnalyticsFederatedActorAzureProvider object`
1230 
1231 - `type: "azure"`
1232 
1233 - `subscription_id: string`
1234 
1235 The Azure subscription the organization is bound to.
1236 
1237### Beta Analytics Federated Actor GCP Provider
1238 
1239- `BetaAnalyticsFederatedActorGCPProvider object`
1240 
1241 - `type: "gcp"`
1242 
1243 - `project_number: string`
1244 
1245 The Google Cloud project the organization is bound to.
1246 
1247### Beta Analytics Federated Actor OIDC Provider
1248 
1249- `BetaAnalyticsFederatedActorOIDCProvider object`
1250 
1251 - `type: "oidc"`
1252 
1253 - `issuer: string or null`
1254 
1255 The federation issuer's URL.
1256 
1257### Beta Analytics Federated Actor Provider
1258 
1259- `BetaAnalyticsFederatedActorProvider = BetaAnalyticsFederatedActorAWSProvider or BetaAnalyticsFederatedActorAzureProvider or BetaAnalyticsFederatedActorGCPProvider or BetaAnalyticsFederatedActorOIDCProvider`
1260 
1261 - `BetaAnalyticsFederatedActorAWSProvider object`
1262 
1263 - `type: "aws"`
1264 
1265 - `account_id: string`
1266 
1267 The AWS account the organization is bound to.
1268 
1269 - `signed_principal: string`
1270 
1271 The AWS-signed ARN of the IAM principal that made the requests.
1272 
1273 - `BetaAnalyticsFederatedActorAzureProvider object`
1274 
1275 - `type: "azure"`
1276 
1277 - `subscription_id: string`
1278 
1279 The Azure subscription the organization is bound to.
1280 
1281 - `BetaAnalyticsFederatedActorGCPProvider object`
1282 
1283 - `type: "gcp"`
1284 
1285 - `project_number: string`
1286 
1287 The Google Cloud project the organization is bound to.
1288 
1289 - `BetaAnalyticsFederatedActorOIDCProvider object`
1290 
1291 - `type: "oidc"`
1292 
1293 - `issuer: string or null`
1294 
1295 The federation issuer's URL.
1296 
1297### Beta Analytics Grouped Cost Type
1298 
1299- `BetaAnalyticsGroupedCostType = "code_execution" or "session_usage" or "tokens" or "web_search"`
1300 
1301 - `"code_execution"`
1302 
1303 - `"session_usage"`
1304 
1305 - `"tokens"`
1306 
1307 - `"web_search"`
1308 
10491309### Beta Analytics Inference Geo Filter
10501310 
10511311- `BetaAnalyticsInferenceGeoFilter = "global" or "not_available" or "us"`
from line 1586
13261586 
13271587 Tagged user identifier (e.g. `user_...`). Present only when the request grouped by `user_id`.
13281588 
1589### Beta Analytics Report User Actor
1590 
1591- `BetaAnalyticsReportUserActor object`
1592 
1593 - `type: "user_actor"`
1594 
1595 Actor type. Always `"user_actor"`.
1596 
1597 - `deleted: boolean`
1598 
1599 True when the account has been deleted, or when the user is no longer a member of the organization or its associated organizations (for example, their membership was removed or they were deprovisioned via your identity provider). `email_address` stays populated for removed users and is null when the account has been deleted. `name` follows the rules described on that field. The `user_id` is still populated for reconciliation.
1600 
1601 - `email_address: string or null`
1602 
1603 The user's current email address, including for users who are no longer members of the organization. Null when the account has been deleted and for system-minted service accounts.
1604 
1605 - `name: string or null`
1606 
1607 The user's current full name. Null when the user has not set one. `"Deleted User"` when the account has been deleted, or when the user is no longer a member and the organization hides removed users' names.
1608 
1609 - `user_id: string`
1610 
1611 Tagged user ID.
1612 
13291613### Beta Analytics Science Metrics
13301614 
13311615- `BetaAnalyticsScienceMetrics object`
from line 1643
13591643 - `web_search_requests: number`
13601644 
13611645 The number of web search requests made.
1646 
1647### Beta Analytics Service Account Actor
1648 
1649- `BetaAnalyticsServiceAccountActor object`
1650 
1651 - `type: "service_account_actor"`
1652 
1653 - `service_account_id: string`
1654 
1655 Tagged service account ID.
1656 
1657### Beta Analytics Service Tier
1658 
1659- `BetaAnalyticsServiceTier = "batch" or "flex" or "flex_discount" or 3 more`
1660 
1661 - `"batch"`
1662 
1663 - `"flex"`
1664 
1665 - `"flex_discount"`
1666 
1667 - `"priority"`
1668 
1669 - `"priority_on_demand"`
1670 
1671 - `"standard"`
13621672 
13631673### Beta Analytics Single Day Activity Summary
13641674 
from line 2030
17202030 
17212031 Number of distinct Office Agent sessions in which the skill was used. A skill counts as used only when it is explicitly activated — the model (or the user, via the skill's slash command) invokes it, reading its instructions into context as part of that activation. Skills that are merely installed or listed as available, or whose content reaches the context without an activation (preloaded, hook-injected, or read as a plain file), are not counted. Approximate (HLL, typical error <2%) in date-range mode. Null on aggregated rows where a distinct count cannot be computed.
17222032 
2033### Beta Analytics Speed
2034 
2035- `BetaAnalyticsSpeed = "fast" or "standard"`
2036 
2037 - `"fast"`
2038 
2039 - `"standard"`
2040 
2041### Beta Analytics Time Bucket Width
2042 
2043- `BetaAnalyticsTimeBucketWidth = "1d" or "1h" or "1m"`
2044 
2045 - `"1d"`
2046 
2047 - `"1h"`
2048 
2049 - `"1m"`
2050 
17232051### Beta Analytics Token Type
17242052 
17252053- `BetaAnalyticsTokenType = "cache_creation.ephemeral_1h_input_tokens" or "cache_creation.ephemeral_5m_input_tokens" or "cache_read_input_tokens" or 2 more`
from line 2207
18792207 - `uncached_input_tokens: number`
18802208 
18812209 The number of uncached input tokens processed.
2210 
2211### Beta Analytics Usage Cost Inference Geo
2212 
2213- `BetaAnalyticsUsageCostInferenceGeo = "global" or "us"`
2214 
2215 - `"global"`
2216 
2217 - `"us"`
2218 
2219### Beta Analytics Usage Cost Product Filter
2220 
2221- `BetaAnalyticsUsageCostProductFilter = "chat" or "chat_cowork_unified" or "claude_code" or 9 more`
2222 
2223 Publicly documented product surfaces. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified.
2224 
2225 - `"chat"`
2226 
2227 - `"chat_cowork_unified"`
2228 
2229 - `"claude_code"`
2230 
2231 - `"claude_console"`
2232 
2233 - `"claude_design"`
2234 
2235 - `"claude_in_chrome"`
2236 
2237 - `"claude_tag"`
2238 
2239 - `"cowork"`
2240 
2241 - `"managed_agents_api"`
2242 
2243 - `"message_batches_api"`
2244 
2245 - `"messages_api"`
2246 
2247 - `"office_agent"`
2248 
2249### Beta Analytics Usage Cost Sort Order
2250 
2251- `BetaAnalyticsUsageCostSortOrder = "asc" or "desc"`
2252 
2253 - `"asc"`
2254 
2255 - `"desc"`
18822256 
18832257### Beta Analytics Usage Report Time Bucket
18842258 
from line 5031
46575031}
46585032```
46595033 
5034## Analytics › Usage
5035 
5036### Get Token Usage By Dimension
5037 
5038**GET** `/v1/organizations/analytics/usage`
5039 
5040Get token usage across a date range, broken out by dimension.
5041 
5042Returns one row per combination of the requested `group_by[]`
5043dimensions (and time bucket, when `time_bucket_width` is set) that has
5044usage in the range, ranked by the `order_by` metric or ordered by time
5045bucket; every combination is returned across pages. With no `group_by[]`
5046and no `time_bucket_width`, a single row aggregates the whole range.
5047Includes all usage, whether or not it is attributable to a seat user.
5048Requires an API key with the `read:analytics` scope, or an Admin API key.
5049 
5050#### Query parameters
5051 
5052- `starting_at: string`
5053 
5054 Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
5055 
5056 format: date-time
5057 
5058- `actor_ids: optional array of string`
5059 
5060 Filter to usage attributed to specific identities, by tagged ID: a `user_...`, `svac_...` (service account), or `apikey_...` ID. An `apikey_` entry matches only usage attributed to the key itself, not usage on that key attributed to a user or service account (use `api_key_ids[]` for every request a key authenticated). Federated identities have no tagged ID; select them with `actor_types[]`. Use `group_by[]=actor` to break out per-identity values.
5061 
5062 maxItems: 100
5063 
5064- `actor_types: optional array of BetaAnalyticsActorType`
5065 
5066 Filter to usage attributed to specific kinds of identity. Use `group_by[]=actor_type` to break out per-kind values.
5067 
5068 maxItems: 100
5069 
5070 - `"api_actor"`
5071 
5072 - `"federated_actor"`
5073 
5074 - `"service_account_actor"`
5075 
5076 - `"user_actor"`
5077 
5078- `agent_ids: optional array of string`
5079 
5080 Filter to usage incurred by sessions of specific Claude Managed Agents agents. Use `group_by[]=agent_id` to break out per-agent values. Claude Developer Platform organizations only.
5081 
5082 maxItems: 100
5083 
5084- `api_key_ids: optional array of string`
5085 
5086 Filter to usage authenticated by specific API keys, by tagged API key ID (`apikey_...`), whichever identity the usage is attributed to. Include an empty entry (`api_key_ids[]=`) to also match usage that no API key authenticated. Use `group_by[]=api_key_id` to break out per-key values; usage without a key has a null `api_key_id`. Claude Developer Platform organizations only.
5087 
5088 maxItems: 100
5089 
5090- `claude_tag_categories: optional array of BetaAnalyticsClaudeTagCategory`
5091 
5092 Filter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage with no category never matches. `dm` usage is reported under the user's product rather than `claude_tag`, so combining this filter with `products[]=claude_tag` excludes it. Use `group_by[]=claude_tag_category` to break out per-category values.
5093 
5094 maxItems: 100
5095 
5096 - `"dm"`
5097 
5098 - `"engaged"`
5099 
5100 - `"monitoring"`
5101 
5102 - `"proactive"`
5103 
5104 - `"scheduled"`
5105 
5106- `claude_tag_user_ids: optional array of string`
5107 
5108 Filter to Claude Tag (Claude in Slack) usage attributed to specific Slack users, by Slack user ID (for example `U0123ABCDEF`), not claude.ai user ID. Usage that is not Claude Tag, and Claude Tag usage not attributed to a single user, never matches. Use `group_by[]=claude_tag_user_id` to break out per-user values.
5109 
5110 maxItems: 100
5111 
5112- `context_windows: optional array of BetaAnalyticsContextWindow`
5113 
5114 Filter to specific context-window pricing tiers. Use `group_by[]=context_window` to break out per-tier values.
5115 
5116 maxItems: 100
5117 
5118 - `"0-200k"`
5119 
5120 - `"200k-1M"`
5121 
5122- `deployment_ids: optional array of string`
5123 
5124 Filter to usage incurred by Claude Managed Agents sessions that specific deployments started. Use `group_by[]=deployment_id` to break out per-deployment values. Claude Developer Platform organizations only.
5125 
5126 maxItems: 100
5127 
5128- `ending_at: optional string`
5129 
5130 End of range, exclusive. Required when `time_bucket_width` is set. Without `time_bucket_width`, defaults to the earlier of now and `starting_at` + 31 days. The range may span at most 31 days.
5131 
5132 format: date-time
5133 
5134- `environment_ids: optional array of string`
5135 
5136 Filter to usage incurred by Claude Managed Agents sessions that ran in specific environments. Use `group_by[]=environment_id` to break out per-environment values. Claude Developer Platform organizations only.
5137 
5138 maxItems: 100
5139 
5140- `exclude_deleted_users: optional boolean`
5141 
5142 If true, omit rows whose `actor` is a `user_actor` with `deleted: true`. Requires `group_by[]=actor`. Rows for other actor types, and rows whose `actor` is null, are always kept. A page may contain fewer than `limit` rows; use `has_more` and `next_page` to paginate as usual.
5143 
5144 default: false
5145 
5146- `group_by: optional array of BetaAnalyticsUsageGroupBy`
5147 
5148 Dimensions to break usage out by (at most 5): one row per combination of their values with usage in the range (and per time bucket, when `time_bucket_width` is set), every combination returned across pages rather than a capped top set. When omitted, a single row aggregates the whole range.
5149 
5150 maxItems: 100
5151 
5152 - `"actor"`
5153 
5154 - `"actor_type"`
5155 
5156 - `"agent_id"`
5157 
5158 - `"api_key_id"`
5159 
5160 - `"claude_tag_category"`
5161 
5162 - `"claude_tag_user_id"`
5163 
5164 - `"context_window"`
5165 
5166 - `"deployment_id"`
5167 
5168 - `"environment_id"`
5169 
5170 - `"inference_geo"`
5171 
5172 - `"model"`
5173 
5174 - `"product"`
5175 
5176 - `"rbac_group_id"`
5177 
5178 - `"service_tier"`
5179 
5180 - `"session_id"`
5181 
5182 - `"slack_channel_id"`
5183 
5184 - `"speed"`
5185 
5186 - `"user_profile_id"`
5187 
5188 - `"workspace_id"`
5189 
5190- `inference_geos: optional array of BetaAnalyticsInferenceGeoFilter`
5191 
5192 Filter to specific inference regions. `not_available` matches rows where the region is unset. Use `group_by[]=inference_geo` to break out per-region values.
5193 
5194 maxItems: 100
5195 
5196 - `"global"`
5197 
5198 - `"not_available"`
5199 
5200 - `"us"`
5201 
5202- `limit: optional number`
5203 
5204 Number of rows per page (1-1000, default 20). `cost_type`/`token_type` fan-out rows (cost endpoint only) do not count toward this limit, so `data` can exceed it.
5205 
5206 default: 20, minimum: 1, maximum: 1000
5207 
5208- `models: optional array of string`
5209 
5210 Models to include. Defaults to all models. Use `group_by[]=model` to break out per-model values.
5211 
5212 maxItems: 100
5213 
5214- `order: optional BetaAnalyticsUsageCostSortOrder`
5215 
5216 Sort direction of the `order_by` metric, or of the time buckets when `order_by` is `time` and `time_bucket_width` is set. Defaults to `desc`.
5217 
5218 - `"asc"`
5219 
5220 - `"desc"`
5221 
5222- `order_by: optional BetaAnalyticsUsageOrderBy`
5223 
5224 Row order. A metric ranks rows by that metric in the `order` direction. `time` orders rows by time bucket in the `order` direction (newest first by default) and, within a bucket, by `total_tokens`, highest first. `time` takes effect only with `time_bucket_width`; without it, `time` is the same as `total_tokens`. Defaults to `total_tokens`.
5225 
5226 - `"output_tokens"`
5227 
5228 - `"requests"`
5229 
5230 - `"time"`
5231 
5232 - `"total_tokens"`
5233 
5234 - `"uncached_input_tokens"`
5235 
5236- `page: optional string`
5237 
5238 Opaque cursor from a previous response's `next_page` field.
5239 
5240- `products: optional array of BetaAnalyticsUsageCostProductFilter`
5241 
5242 Product surfaces to include. Defaults to all products.
5243 
5244 maxItems: 100
5245 
5246 - `"chat"`
5247 
5248 - `"chat_cowork_unified"`
5249 
5250 - `"claude_code"`
5251 
5252 - `"claude_console"`
5253 
5254 - `"claude_design"`
5255 
5256 - `"claude_in_chrome"`
5257 
5258 - `"claude_tag"`
5259 
5260 - `"cowork"`
5261 
5262 - `"managed_agents_api"`
5263 
5264 - `"message_batches_api"`
5265 
5266 - `"messages_api"`
5267 
5268 - `"office_agent"`
5269 
5270- `rbac_group_ids: optional array of string`
5271 
5272 Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group IDs (`rbac_group_...`) or bare group UUIDs. A row matches when the user belonged to any of the listed groups on the (UTC) day the usage occurred; usage with no group attribution never matches.
5273 
5274 maxItems: 100
5275 
5276- `service_tiers: optional array of BetaAnalyticsServiceTier`
5277 
5278 Filter to specific service tiers. Use `group_by[]=service_tier` to break out per-tier values. Claude Developer Platform organizations only; matches nothing for a Claude Enterprise organization.
5279 
5280 maxItems: 100
5281 
5282 - `"batch"`
5283 
5284 - `"flex"`
5285 
5286 - `"flex_discount"`
5287 
5288 - `"priority"`
5289 
5290 - `"priority_on_demand"`
5291 
5292 - `"standard"`
5293 
5294- `session_ids: optional array of string`
5295 
5296 Filter to usage incurred by specific Claude Managed Agents sessions, by tagged session ID (`sesn_...`). Use `group_by[]=session_id` to break out per-session values. Claude Developer Platform organizations only.
5297 
5298 maxItems: 100
5299 
5300- `slack_channel_ids: optional array of string`
5301 
5302 Filter to usage originating from specific Slack channels. Use `group_by[]=slack_channel_id` to break out per-channel values.
5303 
5304 maxItems: 100
5305 
5306- `speeds: optional array of BetaAnalyticsSpeed`
5307 
5308 Filter to fast or standard inference mode. Use `group_by[]=speed` to break out per-mode values.
5309 
5310 maxItems: 100
5311 
5312 - `"fast"`
5313 
5314 - `"standard"`
5315 
5316- `time_bucket_width: optional BetaAnalyticsTimeBucketWidth`
5317 
5318 Time-bucket granularity. When set, rows are returned per time bucket (one per bucket and dimension combination with usage) and each row's `starting_at` and `ending_at` are that bucket's bounds; the time bucket counts toward `limit`. `ending_at` is required when `time_bucket_width` is set, and with `time_bucket_width="1m"` the range may span at most 24 hours. When omitted, each row aggregates the requested range with `starting_at` and `ending_at` each rounded down to the hour.
5319 
5320 - `"1d"`
5321 
5322 - `"1h"`
5323 
5324 - `"1m"`
5325 
5326- `user_profile_ids: optional array of string`
5327 
5328 Filter to usage attributed to specific user profiles, by tagged user profile ID (`uprof_...`). Use `group_by[]=user_profile_id` to break out per-profile values. Claude Developer Platform organizations only.
5329 
5330 maxItems: 100
5331 
5332- `workspace_ids: optional array of string`
5333 
5334 Filter to usage in specific workspaces, by tagged workspace ID (`wrkspc_...`). Use `group_by[]=workspace_id` to break out per-workspace values. Claude Developer Platform organizations only; matches nothing for a Claude Enterprise organization.
5335 
5336 maxItems: 100
5337 
5338#### Headers
5339 
5340- `"anthropic-version": optional string`
5341 
5342 The version of the Claude API you want to use.
5343 
5344 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
5345 
5346- `"anthropic-beta": optional array of AnthropicBeta`
5347 
5348 This endpoint is in beta: requests must send `analytics-usage-cost-2026-08-24` in this header.
5349 
5350 - `string`
5351 
5352 - `"message-batches-2024-09-24"`
5353 
5354 - `"prompt-caching-2024-07-31"`
5355 
5356 - `"computer-use-2024-10-22"`
5357 
5358 - `"computer-use-2025-01-24"`
5359 
5360 - `"pdfs-2024-09-25"`
5361 
5362 - `"token-counting-2024-11-01"`
5363 
5364 - `"token-efficient-tools-2025-02-19"`
5365 
5366 - `"output-128k-2025-02-19"`
5367 
5368 - `"files-api-2025-04-14"`
5369 
5370 - `"mcp-client-2025-04-04"`
5371 
5372 - `"mcp-client-2025-11-20"`
5373 
5374 - `"dev-full-thinking-2025-05-14"`
5375 
5376 - `"interleaved-thinking-2025-05-14"`
5377 
5378 - `"code-execution-2025-05-22"`
5379 
5380 - `"extended-cache-ttl-2025-04-11"`
5381 
5382 - `"context-1m-2025-08-07"`
5383 
5384 - `"context-management-2025-06-27"`
5385 
5386 - `"model-context-window-exceeded-2025-08-26"`
5387 
5388 - `"skills-2025-10-02"`
5389 
5390 - `"fast-mode-2026-02-01"`
5391 
5392 - `"output-300k-2026-03-24"`
5393 
5394 - `"user-profiles-2026-03-24"`
5395 
5396 - `"user-profiles-2026-08-18"`
5397 
5398 - `"user-profiles-2026-09-04"`
5399 
5400 - `"advisor-tool-2026-03-01"`
5401 
5402 - `"managed-agents-2026-04-01"`
5403 
5404 - `"cache-diagnosis-2026-04-07"`
5405 
5406 - `"dreaming-2026-04-21"`
5407 
5408 - `"thinking-token-count-2026-05-13"`
5409 
5410 - `"server-side-fallback-2026-06-01"`
5411 
5412 - `"server-side-fallback-2026-07-01"`
5413 
5414 - `"fallback-credit-2026-06-01"`
5415 
5416 - `"fallback-credit-2026-07-01"`
5417 
5418 - `"agent-memory-2026-07-22"`
5419 
5420 - `"mid-conversation-tool-changes-2026-07-01"`
5421 
5422 - `"compact-2026-01-12"`
5423 
5424 - `"computer-use-2025-11-24"`
5425 
5426 - `"mcp-tunnels-2026-06-22"`
5427 
5428 - `"structured-outputs-2025-11-13"`
5429 
5430 - `"task-budgets-2026-03-13"`
5431 
5432 - `"thinking-display-updates-2026-08-18"`
5433 
5434 - `"ce-user-management-2026-07-13"`
5435 
5436 - `"mid-conversation-output-config-2026-07-01"`
5437 
5438 - `"thinking-binding-controls-2026-08-01"`
5439 
5440 - `"mid-conversation-system-clear-at-2026-08-21"`
5441 
5442 - `"compact-2026-09-04"`
5443 
5444 - `"inline-tools-2026-09-15"`
5445 
5446 - `"mcp-client-2026-09-15"`
5447 
5448 - `"ce-plugins-2026-09-01"`
5449 
5450 - `"spend-limit-reads-2026-09-26"`
5451 
5452 - `"telemetry-destinations-2026-08-11"`
5453 
5454 - `"webhooks-2026-10-07"`
5455 
5456 - `"message-threads-2026-08-12"`
5457 
5458 - `"analytics-usage-cost-2026-08-24"`
5459 
5460#### Returns
5461 
5462- `data: array of BetaAnalyticsUsageItem`
5463 
5464 Rows for this page, in the order set by `order_by` and `order`: one per combination of the `group_by[]` dimensions (and per time bucket, when `time_bucket_width` is set) with usage or cost in the range, or a single row when neither is set. Rows split out by `cost_type` or `token_type` (cost endpoint only) stay adjacent and are ranked as one unit.
5465 
5466 - `ending_at: string`
5467 
5468 End of the period this row covers (exclusive), as an RFC 3339 UTC timestamp: the end of the row's time bucket when a time-bucket width is set; otherwise the requested `ending_at` (or, when omitted, the earlier of now and `starting_at` plus 31 days) rounded down to the hour, because without a time bucket the report covers whole hours.
5469 
5470 format: date-time
5471 
5472 - `group: BetaAnalyticsUsageGroup`
5473 
5474 The dimension values this row's usage is broken out by.
5475 
5476 - `actor: BetaAnalyticsActor or null`
5477 
5478 The identity the usage is attributed to: the user if one is attributed, else the service account, else the federated (cloud-platform) identity, else the API key. Populated only when `actor` is in `group_by[]`; null for usage with no attributable identity, and for users' and federated identities' usage when the reader is a member who can see only some workspaces. Distinct identities the server cannot render also read null, each as its own row.
5479 
5480 - `BetaAnalyticsReportUserActor object`
5481 
5482 - `type: "user_actor"`
5483 
5484 Actor type. Always `"user_actor"`.
5485 
5486 - `deleted: boolean`
5487 
5488 True when the account has been deleted, or when the user is no longer a member of the organization or its associated organizations (for example, their membership was removed or they were deprovisioned via your identity provider). `email_address` stays populated for removed users and is null when the account has been deleted. `name` follows the rules described on that field. The `user_id` is still populated for reconciliation.
5489 
5490 - `email_address: string or null`
5491 
5492 The user's current email address, including for users who are no longer members of the organization. Null when the account has been deleted and for system-minted service accounts.
5493 
5494 - `name: string or null`
5495 
5496 The user's current full name. Null when the user has not set one. `"Deleted User"` when the account has been deleted, or when the user is no longer a member and the organization hides removed users' names.
5497 
5498 - `user_id: string`
5499 
5500 Tagged user ID.
5501 
5502 - `BetaAnalyticsServiceAccountActor object`
5503 
5504 - `type: "service_account_actor"`
5505 
5506 - `service_account_id: string`
5507 
5508 Tagged service account ID.
5509 
5510 - `BetaAnalyticsFederatedActor object`
5511 
5512 - `type: "federated_actor"`
5513 
5514 - `provider: BetaAnalyticsFederatedActorProvider`
5515 
5516 The trusted provider that asserted the caller's identity.
5517 
5518 - `BetaAnalyticsFederatedActorAWSProvider object`
5519 
5520 - `type: "aws"`
5521 
5522 - `account_id: string`
5523 
5524 The AWS account the organization is bound to.
5525 
5526 - `signed_principal: string`
5527 
5528 The AWS-signed ARN of the IAM principal that made the requests.
5529 
5530 - `BetaAnalyticsFederatedActorAzureProvider object`
5531 
5532 - `type: "azure"`
5533 
5534 - `subscription_id: string`
5535 
5536 The Azure subscription the organization is bound to.
5537 
5538 - `BetaAnalyticsFederatedActorGCPProvider object`
5539 
5540 - `type: "gcp"`
5541 
5542 - `project_number: string`
5543 
5544 The Google Cloud project the organization is bound to.
5545 
5546 - `BetaAnalyticsFederatedActorOIDCProvider object`
5547 
5548 - `type: "oidc"`
5549 
5550 - `issuer: string or null`
5551 
5552 The federation issuer's URL.
5553 
5554 - `subject: string or null`
5555 
5556 The provider's identifier for the caller: on `aws`, the IAM principal ARN (one role is one actor across its sessions); on `gcp`, the caller's IAM principal identifier as Google Cloud reports it, such as `serviceAccount:<email>`, `user:<email>`, or a `principal://...` URI.
5557 
5558 - `BetaAnalyticsAPIActor object`
5559 
5560 - `type: "api_actor"`
5561 
5562 - `api_key_id: string`
5563 
5564 Tagged API key ID.
5565 
5566 - `actor_type: BetaAnalyticsActorType or null`
5567 
5568 Kind of identity the usage is attributed to; matches `actor.type` when `actor` is set. Populated only when `actor_type` is in `group_by[]`.
5569 
5570 - `"api_actor"`
5571 
5572 - `"federated_actor"`
5573 
5574 - `"service_account_actor"`
5575 
5576 - `"user_actor"`
5577 
5578 - `agent_id: string or null`
5579 
5580 Claude Managed Agents agent whose session incurred the usage. Populated only when `agent_id` is in `group_by[]`; null for usage outside a managed session.
5581 
5582 - `api_key_id: string or null`
5583 
5584 API key that authenticated the requests, as a tagged API key ID, whichever identity `actor` resolves to. Populated only when `api_key_id` is in `group_by[]`; null for usage not authenticated by an API key.
5585 
5586 - `claude_tag_category: BetaAnalyticsClaudeTagCategory or null`
5587 
5588 Claude Tag (Claude in Slack) spend category: `engaged` (a person addressed Claude in a channel or thread), `proactive` (Claude responded without being addressed), `scheduled` (a scheduled routine ran), `monitoring` (Claude watching a channel it was asked to monitor), or `dm` (direct messages with Claude). Populated only when `claude_tag_category` is in `group_by[]`; null for usage that is not Claude Tag. Direct-message usage is billed to the individual user and is reported under that user's product, not under `claude_tag`. New categories may be added over time.
5589 
5590 - `"dm"`
5591 
5592 - `"engaged"`
5593 
5594 - `"monitoring"`
5595 
5596 - `"proactive"`
5597 
5598 - `"scheduled"`
5599 
5600 - `claude_tag_user_id: string or null`
5601 
5602 Slack user ID (for example `U0123ABCDEF`) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID. Populated only when `claude_tag_user_id` is in `group_by[]`; null for usage that is not Claude Tag and for Claude Tag usage that is not attributed to a single user (for example `monitoring`, and `proactive` usage Claude initiated), so per-user rows can sum to less than the Claude Tag total. Cannot be combined with `group_by[]=rbac_group_id` or the `rbac_group_ids[]` filter.
5603 
5604 - `context_window: BetaAnalyticsContextWindow or null`
5605 
5606 Context-window pricing tier of the usage or cost. Null unless `context_window` is in `group_by[]`; it can also be null on grouped rows with no context-window tier, such as code execution.
5607 
5608 - `"0-200k"`
5609 
5610 - `"200k-1M"`
5611 
5612 - `deployment_id: string or null`
5613 
5614 Deployment that started the Claude Managed Agents session. Populated only when `deployment_id` is in `group_by[]`; null for usage outside a managed session and for sessions no deployment started.
5615 
5616 - `environment_id: string or null`
5617 
5618 Claude Managed Agents environment the session ran in. Populated only when `environment_id` is in `group_by[]`; null for usage outside a managed session.
5619 
5620 - `inference_geo: BetaAnalyticsUsageCostInferenceGeo or null`
5621 
5622 Inference region of the usage or cost. Null unless `inference_geo` is in `group_by[]`; it can also be null on grouped rows where the region is not set (the rows that `inference_geos[]=not_available` matches).
5623 
5624 - `"global"`
5625 
5626 - `"us"`
5627 
5628 - `model: string or null`
5629 
5630 Model that produced the usage or cost, as a model name in the form the `models[]` filter accepts (for example, `claude-opus-5-5`). Null unless `model` is in `group_by[]`; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution.
5631 
5632 - `product: string or null`
5633 
5634 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude_tag`, and `chat_cowork_unified`. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
5635 
5636 - `rbac_group_id: string or null`
5637 
5638 RBAC group (team) the usage is attributed to, in the public tagged `rbac_group_...` spelling — the same spelling the activity resources use for this key, so the same team has one id across resources and it round-trips as an `rbac_group_ids[]` filter value. Populated only when `rbac_group_id` is in `group_by[]`. Any-membership semantics: a user in several groups contributes their full usage to each of those groups' rows, so the named-group rows overlap and their sum can exceed the org total. A null value is the single unassigned row: users in no group on that (UTC) day. For the true org total, run the same query without `group_by[]`.
5639 
5640 - `service_tier: BetaAnalyticsServiceTier or null`
5641 
5642 Service tier the usage was served at. Populated only when `service_tier` is in `group_by[]`; null for usage with no service tier (for example, code execution) and for Claude Enterprise usage.
5643 
5644 - `"batch"`
5645 
5646 - `"flex"`
5647 
5648 - `"flex_discount"`
5649 
5650 - `"priority"`
5651 
5652 - `"priority_on_demand"`
5653 
5654 - `"standard"`
5655 
5656 - `session_id: string or null`
5657 
5658 Claude Managed Agents session that incurred the usage. Populated only when `session_id` is in `group_by[]`; null for usage outside a managed session.
5659 
5660 - `slack_channel_id: string or null`
5661 
5662 Slack channel the usage originated from. Populated only when `slack_channel_id` is in `group_by[]`; null for usage outside Slack (and for rows recorded before channel attribution was enabled).
5663 
5664 - `speed: BetaAnalyticsSpeed or null`
5665 
5666 Inference speed mode of the usage or cost: `fast` or `standard`. Null unless `speed` is in `group_by[]`.
5667 
5668 - `"fast"`
5669 
5670 - `"standard"`
5671 
5672 - `user_profile_id: string or null`
5673 
5674 User profile the usage was attributed to, as a tagged `uprof_` ID. Populated only when `user_profile_id` is in `group_by[]`; null for usage that named no profile and for Claude Enterprise usage.
5675 
5676 - `workspace_id: string or null`
5677 
5678 Workspace the usage occurred in, as a tagged workspace ID, including the organization's default workspace. Populated only when `workspace_id` is in `group_by[]`; null for Claude Enterprise usage.
5679 
5680 - `starting_at: string`
5681 
5682 Start of the period this row covers (inclusive), as an RFC 3339 UTC timestamp: the start of the row's time bucket when a time-bucket width is set, otherwise the requested `starting_at` rounded down to the hour.
5683 
5684 format: date-time
5685 
5686 - `usage: BetaAnalyticsUsageMetrics`
5687 
5688 Token usage for this row.
5689 
5690 - `cache_creation: BetaCacheCreation`
5691 
5692 The number of input tokens for cache creation.
5693 
5694 - `ephemeral_1h_input_tokens: number`
5695 
5696 The number of input tokens used to create the 1 hour cache entry.
5697 
5698 default: 0, minimum: 0
5699 
5700 - `ephemeral_5m_input_tokens: number`
5701 
5702 The number of input tokens used to create the 5 minute cache entry.
5703 
5704 default: 0, minimum: 0
5705 
5706 - `cache_read_input_tokens: number`
5707 
5708 The number of input tokens read from the cache.
5709 
5710 - `output_tokens: number`
5711 
5712 The number of output tokens generated.
5713 
5714 - `requests: number or null`
5715 
5716 Number of API requests in this row's scope. For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with `product: null`).
5717 
5718 - `server_tool_use: BetaAnalyticsServerToolUse`
5719 
5720 Server-side tool usage metrics.
5721 
5722 - `web_search_requests: number`
5723 
5724 The number of web search requests made.
5725 
5726 - `total_tokens: number`
5727 
5728 Total token count across all token types. This is the value the default `order_by` (`total_tokens`) sorts on.
5729 
5730 - `uncached_input_tokens: number`
5731 
5732 The number of uncached input tokens processed.
5733 
5734- `data_refreshed_at: string or null`
5735 
5736 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case `data` is empty. Data beyond this watermark is incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours. Values can be revised as late events arrive and reconciliation runs, until about 7 days after the end of the calendar month the usage falls in; for example, values for October 1 can change until about November 7.
5737 
5738 format: date-time
5739 
5740- `has_more: boolean`
5741 
5742 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
5743 
5744- `next_page: string or null`
5745 
5746 Opaque cursor for the next page, or null when `has_more` is false. Pass it as the `page` parameter, keeping the other parameters unchanged. A cursor can expire after the underlying data refreshes; the request then returns HTTP 410 and pagination must restart from the first page.
5747 
5748#### Example
5749 
5750```bash
5751curl https://api.anthropic.com/v1/organizations/analytics/usage \
5752 -H 'anthropic-version: 2026-10-21' \
5753 -H 'anthropic-beta: analytics-usage-cost-2026-08-24' \
5754 -H "Authorization: Bearer $ANTHROPIC_API_KEY"
5755```
5756 
5757##### Response (200)
5758 
5759```json
5760{
5761 "data": [
5762 {
5763 "ending_at": "2026-10-01T00:00:00Z",
5764 "group": {
5765 "actor": {
5766 "deleted": false,
5767 "email_address": "[email protected]",
5768 "name": "Jane Doe",
5769 "type": "user_actor",
5770 "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
5771 },
5772 "actor_type": "user_actor",
5773 "agent_id": "agent_01VHd3EAGJ6PLkP9LM7DDu3f",
5774 "api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
5775 "claude_tag_category": "dm",
5776 "claude_tag_user_id": "U0123ABCDEF",
5777 "context_window": "0-200k",
5778 "deployment_id": "depl_01JFC6ihzZHtAuyHsaENdJhY",
5779 "environment_id": "env_017oTjuGedHtjhJauVC5xGJD",
5780 "inference_geo": "global",
5781 "model": "claude-opus-5-5",
5782 "product": "chat",
5783 "rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
5784 "service_tier": "standard",
5785 "session_id": "sesn_0187kPDyNCwibNNvfaPEApCJ",
5786 "slack_channel_id": "C0123ABCDEF",
5787 "speed": "fast",
5788 "user_profile_id": "uprof_01M33NeYUQK2WV9PpYcsPHLi",
5789 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
5790 },
5791 "starting_at": "2026-09-01T00:00:00Z",
5792 "usage": {
5793 "cache_creation": {
5794 "ephemeral_1h_input_tokens": 0,
5795 "ephemeral_5m_input_tokens": 0
5796 },
5797 "cache_read_input_tokens": 3200000,
5798 "output_tokens": 891000,
5799 "requests": 128,
5800 "server_tool_use": {
5801 "web_search_requests": 10
5802 },
5803 "total_tokens": 5377000,
5804 "uncached_input_tokens": 1284500
5805 }
5806 }
5807 ],
5808 "data_refreshed_at": "2019-12-27T18:11:19.117Z",
5809 "has_more": true,
5810 "next_page": "next_page"
5811}
5812```
5813 
5814## Analytics › Cost
5815 
5816### Get Cost By Dimension
5817 
5818**GET** `/v1/organizations/analytics/cost`
5819 
5820Get cost in USD across a date range, broken out by dimension.
5821 
5822Returns one row per combination of the requested `group_by[]`
5823dimensions (and time bucket, when `time_bucket_width` is set) that has
5824cost in the range, ranked by spend or ordered by time bucket; every
5825combination is returned across pages. With no `group_by[]` and no
5826`time_bucket_width`, a single row aggregates the whole range. Includes
5827all cost, whether or not it is attributable to a seat user. Requires an
5828API key with the `read:analytics` scope, or an Admin API key.
5829 
5830#### Query parameters
5831 
5832- `starting_at: string`
5833 
5834 Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
5835 
5836 format: date-time
5837 
5838- `actor_ids: optional array of string`
5839 
5840 Filter to usage attributed to specific identities, by tagged ID: a `user_...`, `svac_...` (service account), or `apikey_...` ID. An `apikey_` entry matches only usage attributed to the key itself, not usage on that key attributed to a user or service account (use `api_key_ids[]` for every request a key authenticated). Federated identities have no tagged ID; select them with `actor_types[]`. Use `group_by[]=actor` to break out per-identity values.
5841 
5842 maxItems: 100
5843 
5844- `actor_types: optional array of BetaAnalyticsActorType`
5845 
5846 Filter to usage attributed to specific kinds of identity. Use `group_by[]=actor_type` to break out per-kind values.
5847 
5848 maxItems: 100
5849 
5850 - `"api_actor"`
5851 
5852 - `"federated_actor"`
5853 
5854 - `"service_account_actor"`
5855 
5856 - `"user_actor"`
5857 
5858- `agent_ids: optional array of string`
5859 
5860 Filter to usage incurred by sessions of specific Claude Managed Agents agents. Use `group_by[]=agent_id` to break out per-agent values. Claude Developer Platform organizations only.
5861 
5862 maxItems: 100
5863 
5864- `api_key_ids: optional array of string`
5865 
5866 Filter to usage authenticated by specific API keys, by tagged API key ID (`apikey_...`), whichever identity the usage is attributed to. Include an empty entry (`api_key_ids[]=`) to also match usage that no API key authenticated. Use `group_by[]=api_key_id` to break out per-key values; usage without a key has a null `api_key_id`. Claude Developer Platform organizations only.
5867 
5868 maxItems: 100
5869 
5870- `claude_tag_categories: optional array of BetaAnalyticsClaudeTagCategory`
5871 
5872 Filter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage with no category never matches. `dm` usage is reported under the user's product rather than `claude_tag`, so combining this filter with `products[]=claude_tag` excludes it. Use `group_by[]=claude_tag_category` to break out per-category values.
5873 
5874 maxItems: 100
5875 
5876 - `"dm"`
5877 
5878 - `"engaged"`
5879 
5880 - `"monitoring"`
5881 
5882 - `"proactive"`
5883 
5884 - `"scheduled"`
5885 
5886- `claude_tag_user_ids: optional array of string`
5887 
5888 Filter to Claude Tag (Claude in Slack) usage attributed to specific Slack users, by Slack user ID (for example `U0123ABCDEF`), not claude.ai user ID. Usage that is not Claude Tag, and Claude Tag usage not attributed to a single user, never matches. Use `group_by[]=claude_tag_user_id` to break out per-user values.
5889 
5890 maxItems: 100
5891 
5892- `context_windows: optional array of BetaAnalyticsContextWindow`
5893 
5894 Filter to specific context-window pricing tiers. Use `group_by[]=context_window` to break out per-tier values.
5895 
5896 maxItems: 100
5897 
5898 - `"0-200k"`
5899 
5900 - `"200k-1M"`
5901 
5902- `deployment_ids: optional array of string`
5903 
5904 Filter to usage incurred by Claude Managed Agents sessions that specific deployments started. Use `group_by[]=deployment_id` to break out per-deployment values. Claude Developer Platform organizations only.
5905 
5906 maxItems: 100
5907 
5908- `ending_at: optional string`
5909 
5910 End of range, exclusive. Required when `time_bucket_width` is set. Without `time_bucket_width`, defaults to the earlier of now and `starting_at` + 31 days. The range may span at most 31 days.
5911 
5912 format: date-time
5913 
5914- `environment_ids: optional array of string`
5915 
5916 Filter to usage incurred by Claude Managed Agents sessions that ran in specific environments. Use `group_by[]=environment_id` to break out per-environment values. Claude Developer Platform organizations only.
5917 
5918 maxItems: 100
5919 
5920- `exclude_deleted_users: optional boolean`
5921 
5922 If true, omit rows whose `actor` is a `user_actor` with `deleted: true`. Requires `group_by[]=actor`. Rows for other actor types, and rows whose `actor` is null, are always kept. A page may contain fewer than `limit` rows; use `has_more` and `next_page` to paginate as usual.
5923 
5924 default: false
5925 
5926- `group_by: optional array of BetaAnalyticsCostGroupBy`
5927 
5928 Dimensions to break cost out by (at most 5, not counting `cost_type` and `token_type`): one row per combination of their values with cost in the range (and per time bucket, when `time_bucket_width` is set), every combination returned across pages rather than a capped top set. `cost_type` and `token_type` do not count toward `limit`: `cost_type` returns one row per cost component (tokens, web search, code execution, and `session_usage`, Claude Managed Agents session time); `token_type` returns one row per token type, each with `cost_type: "tokens"`; combining both returns the per-token-type rows plus the web-search, code-execution and session-usage rows. When omitted, a single row aggregates the whole range.
5929 
5930 maxItems: 100
5931 
5932 - `"actor"`
5933 
5934 - `"actor_type"`
5935 
5936 - `"agent_id"`
5937 
5938 - `"api_key_id"`
5939 
5940 - `"claude_tag_category"`
5941 
5942 - `"claude_tag_user_id"`
5943 
5944 - `"context_window"`
5945 
5946 - `"cost_type"`
5947 
5948 - `"deployment_id"`
5949 
5950 - `"environment_id"`
5951 
5952 - `"inference_geo"`
5953 
5954 - `"model"`
5955 
5956 - `"product"`
5957 
5958 - `"rbac_group_id"`
5959 
5960 - `"service_tier"`
5961 
5962 - `"session_id"`
5963 
5964 - `"slack_channel_id"`
5965 
5966 - `"speed"`
5967 
5968 - `"token_type"`
5969 
5970 - `"user_profile_id"`
5971 
5972 - `"workspace_id"`
5973 
5974- `inference_geos: optional array of BetaAnalyticsInferenceGeoFilter`
5975 
5976 Filter to specific inference regions. `not_available` matches rows where the region is unset. Use `group_by[]=inference_geo` to break out per-region values.
5977 
5978 maxItems: 100
5979 
5980 - `"global"`
5981 
5982 - `"not_available"`
5983 
5984 - `"us"`
5985 
5986- `limit: optional number`
5987 
5988 Number of rows per page (1-1000, default 20). `cost_type`/`token_type` fan-out rows (cost endpoint only) do not count toward this limit, so `data` can exceed it.
5989 
5990 default: 20, minimum: 1, maximum: 1000
5991 
5992- `models: optional array of string`
5993 
5994 Models to include. Defaults to all models. Use `group_by[]=model` to break out per-model values.
5995 
5996 maxItems: 100
5997 
5998- `order: optional BetaAnalyticsUsageCostSortOrder`
5999 
6000 Sort direction of the `order_by` metric, or of the time buckets when `order_by` is `time` and `time_bucket_width` is set. Defaults to `desc`.
6001 
6002 - `"asc"`
6003 
6004 - `"desc"`
6005 
6006- `order_by: optional BetaAnalyticsCostOrderBy`
6007 
6008 Row order. A metric ranks rows by that metric in the `order` direction. `time` orders rows by time bucket in the `order` direction (newest first by default) and, within a bucket, by `amount`, highest first. `time` takes effect only with `time_bucket_width`; without it, `time` is the same as `amount`. Defaults to `amount`.
6009 
6010 - `"amount"`
6011 
6012 - `"list_amount"`
6013 
6014 - `"time"`
6015 
6016- `page: optional string`
6017 
6018 Opaque cursor from a previous response's `next_page` field.
6019 
6020- `products: optional array of BetaAnalyticsUsageCostProductFilter`
6021 
6022 Product surfaces to include. Defaults to all products.
6023 
6024 maxItems: 100
6025 
6026 - `"chat"`
6027 
6028 - `"chat_cowork_unified"`
6029 
6030 - `"claude_code"`
6031 
6032 - `"claude_console"`
6033 
6034 - `"claude_design"`
6035 
6036 - `"claude_in_chrome"`
6037 
6038 - `"claude_tag"`
6039 
6040 - `"cowork"`
6041 
6042 - `"managed_agents_api"`
6043 
6044 - `"message_batches_api"`
6045 
6046 - `"messages_api"`
6047 
6048 - `"office_agent"`
6049 
6050- `rbac_group_ids: optional array of string`
6051 
6052 Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group IDs (`rbac_group_...`) or bare group UUIDs. A row matches when the user belonged to any of the listed groups on the (UTC) day the usage occurred; usage with no group attribution never matches.
6053 
6054 maxItems: 100
6055 
6056- `service_tiers: optional array of BetaAnalyticsServiceTier`
6057 
6058 Filter to specific service tiers. Use `group_by[]=service_tier` to break out per-tier values. Claude Developer Platform organizations only; matches nothing for a Claude Enterprise organization.
6059 
6060 maxItems: 100
6061 
6062 - `"batch"`
6063 
6064 - `"flex"`
6065 
6066 - `"flex_discount"`
6067 
6068 - `"priority"`
6069 
6070 - `"priority_on_demand"`
6071 
6072 - `"standard"`
6073 
6074- `session_ids: optional array of string`
6075 
6076 Filter to usage incurred by specific Claude Managed Agents sessions, by tagged session ID (`sesn_...`). Use `group_by[]=session_id` to break out per-session values. Claude Developer Platform organizations only.
6077 
6078 maxItems: 100
6079 
6080- `slack_channel_ids: optional array of string`
6081 
6082 Filter to usage originating from specific Slack channels. Use `group_by[]=slack_channel_id` to break out per-channel values.
6083 
6084 maxItems: 100
6085 
6086- `speeds: optional array of BetaAnalyticsSpeed`
6087 
6088 Filter to fast or standard inference mode. Use `group_by[]=speed` to break out per-mode values.
6089 
6090 maxItems: 100
6091 
6092 - `"fast"`
6093 
6094 - `"standard"`
6095 
6096- `time_bucket_width: optional BetaAnalyticsTimeBucketWidth`
6097 
6098 Time-bucket granularity. When set, rows are returned per time bucket (one per bucket and dimension combination with usage) and each row's `starting_at` and `ending_at` are that bucket's bounds; the time bucket counts toward `limit`. `ending_at` is required when `time_bucket_width` is set, and with `time_bucket_width="1m"` the range may span at most 24 hours. When omitted, each row aggregates the requested range with `starting_at` and `ending_at` each rounded down to the hour.
6099 
6100 - `"1d"`
6101 
6102 - `"1h"`
6103 
6104 - `"1m"`
6105 
6106- `user_profile_ids: optional array of string`
6107 
6108 Filter to usage attributed to specific user profiles, by tagged user profile ID (`uprof_...`). Use `group_by[]=user_profile_id` to break out per-profile values. Claude Developer Platform organizations only.
6109 
6110 maxItems: 100
6111 
6112- `workspace_ids: optional array of string`
6113 
6114 Filter to usage in specific workspaces, by tagged workspace ID (`wrkspc_...`). Use `group_by[]=workspace_id` to break out per-workspace values. Claude Developer Platform organizations only; matches nothing for a Claude Enterprise organization.
6115 
6116 maxItems: 100
6117 
6118#### Headers
6119 
6120- `"anthropic-version": optional string`
6121 
6122 The version of the Claude API you want to use.
6123 
6124 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
6125 
6126- `"anthropic-beta": optional array of AnthropicBeta`
6127 
6128 This endpoint is in beta: requests must send `analytics-usage-cost-2026-08-24` in this header.
6129 
6130 - `string`
6131 
6132 - `"message-batches-2024-09-24"`
6133 
6134 - `"prompt-caching-2024-07-31"`
6135 
6136 - `"computer-use-2024-10-22"`
6137 
6138 - `"computer-use-2025-01-24"`
6139 
6140 - `"pdfs-2024-09-25"`
6141 
6142 - `"token-counting-2024-11-01"`
6143 
6144 - `"token-efficient-tools-2025-02-19"`
6145 
6146 - `"output-128k-2025-02-19"`
6147 
6148 - `"files-api-2025-04-14"`
6149 
6150 - `"mcp-client-2025-04-04"`
6151 
6152 - `"mcp-client-2025-11-20"`
6153 
6154 - `"dev-full-thinking-2025-05-14"`
6155 
6156 - `"interleaved-thinking-2025-05-14"`
6157 
6158 - `"code-execution-2025-05-22"`
6159 
6160 - `"extended-cache-ttl-2025-04-11"`
6161 
6162 - `"context-1m-2025-08-07"`
6163 
6164 - `"context-management-2025-06-27"`
6165 
6166 - `"model-context-window-exceeded-2025-08-26"`
6167 
6168 - `"skills-2025-10-02"`
6169 
6170 - `"fast-mode-2026-02-01"`
6171 
6172 - `"output-300k-2026-03-24"`
6173 
6174 - `"user-profiles-2026-03-24"`
6175 
6176 - `"user-profiles-2026-08-18"`
6177 
6178 - `"user-profiles-2026-09-04"`
6179 
6180 - `"advisor-tool-2026-03-01"`
6181 
6182 - `"managed-agents-2026-04-01"`
6183 
6184 - `"cache-diagnosis-2026-04-07"`
6185 
6186 - `"dreaming-2026-04-21"`
6187 
6188 - `"thinking-token-count-2026-05-13"`
6189 
6190 - `"server-side-fallback-2026-06-01"`
6191 
6192 - `"server-side-fallback-2026-07-01"`
6193 
6194 - `"fallback-credit-2026-06-01"`
6195 
6196 - `"fallback-credit-2026-07-01"`
6197 
6198 - `"agent-memory-2026-07-22"`
6199 
6200 - `"mid-conversation-tool-changes-2026-07-01"`
6201 
6202 - `"compact-2026-01-12"`
6203 
6204 - `"computer-use-2025-11-24"`
6205 
6206 - `"mcp-tunnels-2026-06-22"`
6207 
6208 - `"structured-outputs-2025-11-13"`
6209 
6210 - `"task-budgets-2026-03-13"`
6211 
6212 - `"thinking-display-updates-2026-08-18"`
6213 
6214 - `"ce-user-management-2026-07-13"`
6215 
6216 - `"mid-conversation-output-config-2026-07-01"`
6217 
6218 - `"thinking-binding-controls-2026-08-01"`
6219 
6220 - `"mid-conversation-system-clear-at-2026-08-21"`
6221 
6222 - `"compact-2026-09-04"`
6223 
6224 - `"inline-tools-2026-09-15"`
6225 
6226 - `"mcp-client-2026-09-15"`
6227 
6228 - `"ce-plugins-2026-09-01"`
6229 
6230 - `"spend-limit-reads-2026-09-26"`
6231 
6232 - `"telemetry-destinations-2026-08-11"`
6233 
6234 - `"webhooks-2026-10-07"`
6235 
6236 - `"message-threads-2026-08-12"`
6237 
6238 - `"analytics-usage-cost-2026-08-24"`
6239 
6240#### Returns
6241 
6242- `data: array of BetaAnalyticsCostItem`
6243 
6244 Rows for this page, in the order set by `order_by` and `order`: one per combination of the `group_by[]` dimensions (and per time bucket, when `time_bucket_width` is set) with usage or cost in the range, or a single row when neither is set. Rows split out by `cost_type` or `token_type` (cost endpoint only) stay adjacent and are ranked as one unit.
6245 
6246 - `cost: BetaAnalyticsCostMetrics`
6247 
6248 Cost for this row.
6249 
6250 - `amount: string`
6251 
6252 Amount (post-discount, pre-credit) in fractional cents (minor units).
6253 
6254 - `currency: string`
6255 
6256 Currency code for the cost amount. Currently always `"USD"`.
6257 
6258 default: USD
6259 
6260 - `list_amount: string`
6261 
6262 List-price amount (pre-discount) in fractional cents.
6263 
6264 - `requests: number or null`
6265 
6266 Number of API requests in this row's scope. Null when `group_by` includes `cost_type` or `token_type` (the count has no per-component attribution; read it from the ungrouped response). For sandbox / code-execution events, this counts execution spans rather than HTTP requests (these rows surface with `product: null`).
6267 
6268 - `ending_at: string`
6269 
6270 End of the period this row covers (exclusive), as an RFC 3339 UTC timestamp: the end of the row's time bucket when a time-bucket width is set; otherwise the requested `ending_at` (or, when omitted, the earlier of now and `starting_at` plus 31 days) rounded down to the hour, because without a time bucket the report covers whole hours.
6271 
6272 format: date-time
6273 
6274 - `group: BetaAnalyticsCostGroup`
6275 
6276 The dimension values this row's cost is broken out by.
6277 
6278 - `actor: BetaAnalyticsActor or null`
6279 
6280 The identity the usage is attributed to: the user if one is attributed, else the service account, else the federated (cloud-platform) identity, else the API key. Populated only when `actor` is in `group_by[]`; null for usage with no attributable identity, and for users' and federated identities' usage when the reader is a member who can see only some workspaces. Distinct identities the server cannot render also read null, each as its own row.
6281 
6282 - `BetaAnalyticsReportUserActor object`
6283 
6284 - `type: "user_actor"`
6285 
6286 Actor type. Always `"user_actor"`.
6287 
6288 - `deleted: boolean`
6289 
6290 True when the account has been deleted, or when the user is no longer a member of the organization or its associated organizations (for example, their membership was removed or they were deprovisioned via your identity provider). `email_address` stays populated for removed users and is null when the account has been deleted. `name` follows the rules described on that field. The `user_id` is still populated for reconciliation.
6291 
6292 - `email_address: string or null`
6293 
6294 The user's current email address, including for users who are no longer members of the organization. Null when the account has been deleted and for system-minted service accounts.
6295 
6296 - `name: string or null`
6297 
6298 The user's current full name. Null when the user has not set one. `"Deleted User"` when the account has been deleted, or when the user is no longer a member and the organization hides removed users' names.
6299 
6300 - `user_id: string`
6301 
6302 Tagged user ID.
6303 
6304 - `BetaAnalyticsServiceAccountActor object`
6305 
6306 - `type: "service_account_actor"`
6307 
6308 - `service_account_id: string`
6309 
6310 Tagged service account ID.
6311 
6312 - `BetaAnalyticsFederatedActor object`
6313 
6314 - `type: "federated_actor"`
6315 
6316 - `provider: BetaAnalyticsFederatedActorProvider`
6317 
6318 The trusted provider that asserted the caller's identity.
6319 
6320 - `BetaAnalyticsFederatedActorAWSProvider object`
6321 
6322 - `type: "aws"`
6323 
6324 - `account_id: string`
6325 
6326 The AWS account the organization is bound to.
6327 
6328 - `signed_principal: string`
6329 
6330 The AWS-signed ARN of the IAM principal that made the requests.
6331 
6332 - `BetaAnalyticsFederatedActorAzureProvider object`
6333 
6334 - `type: "azure"`
6335 
6336 - `subscription_id: string`
6337 
6338 The Azure subscription the organization is bound to.
6339 
6340 - `BetaAnalyticsFederatedActorGCPProvider object`
6341 
6342 - `type: "gcp"`
6343 
6344 - `project_number: string`
6345 
6346 The Google Cloud project the organization is bound to.
6347 
6348 - `BetaAnalyticsFederatedActorOIDCProvider object`
6349 
6350 - `type: "oidc"`
6351 
6352 - `issuer: string or null`
6353 
6354 The federation issuer's URL.
6355 
6356 - `subject: string or null`
6357 
6358 The provider's identifier for the caller: on `aws`, the IAM principal ARN (one role is one actor across its sessions); on `gcp`, the caller's IAM principal identifier as Google Cloud reports it, such as `serviceAccount:<email>`, `user:<email>`, or a `principal://...` URI.
6359 
6360 - `BetaAnalyticsAPIActor object`
6361 
6362 - `type: "api_actor"`
6363 
6364 - `api_key_id: string`
6365 
6366 Tagged API key ID.
6367 
6368 - `actor_type: BetaAnalyticsActorType or null`
6369 
6370 Kind of identity the usage is attributed to; matches `actor.type` when `actor` is set. Populated only when `actor_type` is in `group_by[]`.
6371 
6372 - `"api_actor"`
6373 
6374 - `"federated_actor"`
6375 
6376 - `"service_account_actor"`
6377 
6378 - `"user_actor"`
6379 
6380 - `agent_id: string or null`
6381 
6382 Claude Managed Agents agent whose session incurred the usage. Populated only when `agent_id` is in `group_by[]`; null for usage outside a managed session.
6383 
6384 - `api_key_id: string or null`
6385 
6386 API key that authenticated the requests, as a tagged API key ID, whichever identity `actor` resolves to. Populated only when `api_key_id` is in `group_by[]`; null for usage not authenticated by an API key.
6387 
6388 - `claude_tag_category: BetaAnalyticsClaudeTagCategory or null`
6389 
6390 Claude Tag (Claude in Slack) spend category: `engaged` (a person addressed Claude in a channel or thread), `proactive` (Claude responded without being addressed), `scheduled` (a scheduled routine ran), `monitoring` (Claude watching a channel it was asked to monitor), or `dm` (direct messages with Claude). Populated only when `claude_tag_category` is in `group_by[]`; null for usage that is not Claude Tag. Direct-message usage is billed to the individual user and is reported under that user's product, not under `claude_tag`. New categories may be added over time.
6391 
6392 - `"dm"`
6393 
6394 - `"engaged"`
6395 
6396 - `"monitoring"`
6397 
6398 - `"proactive"`
6399 
6400 - `"scheduled"`
6401 
6402 - `claude_tag_user_id: string or null`
6403 
6404 Slack user ID (for example `U0123ABCDEF`) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID. Populated only when `claude_tag_user_id` is in `group_by[]`; null for usage that is not Claude Tag and for Claude Tag usage that is not attributed to a single user (for example `monitoring`, and `proactive` usage Claude initiated), so per-user rows can sum to less than the Claude Tag total. Cannot be combined with `group_by[]=rbac_group_id` or the `rbac_group_ids[]` filter.
6405 
6406 - `context_window: BetaAnalyticsContextWindow or null`
6407 
6408 Context-window pricing tier of the usage or cost. Null unless `context_window` is in `group_by[]`; it can also be null on grouped rows with no context-window tier, such as code execution.
6409 
6410 - `"0-200k"`
6411 
6412 - `"200k-1M"`
6413 
6414 - `cost_type: BetaAnalyticsGroupedCostType or null`
6415 
6416 Cost component breakdown; null when returning the combined total.
6417 
6418 - `"code_execution"`
6419 
6420 - `"session_usage"`
6421 
6422 - `"tokens"`
6423 
6424 - `"web_search"`
6425 
6426 - `deployment_id: string or null`
6427 
6428 Deployment that started the Claude Managed Agents session. Populated only when `deployment_id` is in `group_by[]`; null for usage outside a managed session and for sessions no deployment started.
6429 
6430 - `environment_id: string or null`
6431 
6432 Claude Managed Agents environment the session ran in. Populated only when `environment_id` is in `group_by[]`; null for usage outside a managed session.
6433 
6434 - `inference_geo: BetaAnalyticsUsageCostInferenceGeo or null`
6435 
6436 Inference region of the usage or cost. Null unless `inference_geo` is in `group_by[]`; it can also be null on grouped rows where the region is not set (the rows that `inference_geos[]=not_available` matches).
6437 
6438 - `"global"`
6439 
6440 - `"us"`
6441 
6442 - `model: string or null`
6443 
6444 Model that produced the usage or cost, as a model name in the form the `models[]` filter accepts (for example, `claude-opus-5-5`). Null unless `model` is in `group_by[]`; it can also be null on grouped rows whose usage or cost is not attributed to a specific model, such as code execution.
6445 
6446 - `product: string or null`
6447 
6448 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude_tag`, and `chat_cowork_unified`. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
6449 
6450 - `rbac_group_id: string or null`
6451 
6452 RBAC group (team) the usage is attributed to, in the public tagged `rbac_group_...` spelling — the same spelling the activity resources use for this key, so the same team has one id across resources and it round-trips as an `rbac_group_ids[]` filter value. Populated only when `rbac_group_id` is in `group_by[]`. Any-membership semantics: a user in several groups contributes their full usage to each of those groups' rows, so the named-group rows overlap and their sum can exceed the org total. A null value is the single unassigned row: users in no group on that (UTC) day. For the true org total, run the same query without `group_by[]`.
6453 
6454 - `service_tier: BetaAnalyticsServiceTier or null`
6455 
6456 Service tier the usage was served at. Populated only when `service_tier` is in `group_by[]`; null for usage with no service tier (for example, code execution) and for Claude Enterprise usage.
6457 
6458 - `"batch"`
6459 
6460 - `"flex"`
6461 
6462 - `"flex_discount"`
6463 
6464 - `"priority"`
6465 
6466 - `"priority_on_demand"`
6467 
6468 - `"standard"`
6469 
6470 - `session_id: string or null`
6471 
6472 Claude Managed Agents session that incurred the usage. Populated only when `session_id` is in `group_by[]`; null for usage outside a managed session.
6473 
6474 - `slack_channel_id: string or null`
6475 
6476 Slack channel the usage originated from. Populated only when `slack_channel_id` is in `group_by[]`; null for usage outside Slack (and for rows recorded before channel attribution was enabled).
6477 
6478 - `speed: BetaAnalyticsSpeed or null`
6479 
6480 Inference speed mode of the usage or cost: `fast` or `standard`. Null unless `speed` is in `group_by[]`.
6481 
6482 - `"fast"`
6483 
6484 - `"standard"`
6485 
6486 - `token_type: BetaAnalyticsTokenType or null`
6487 
6488 Token type when `cost_type` is `tokens`; null otherwise.
6489 
6490 - `"cache_creation.ephemeral_1h_input_tokens"`
6491 
6492 - `"cache_creation.ephemeral_5m_input_tokens"`
6493 
6494 - `"cache_read_input_tokens"`
6495 
6496 - `"output_tokens"`
6497 
6498 - `"uncached_input_tokens"`
6499 
6500 - `user_profile_id: string or null`
6501 
6502 User profile the usage was attributed to, as a tagged `uprof_` ID. Populated only when `user_profile_id` is in `group_by[]`; null for usage that named no profile and for Claude Enterprise usage.
6503 
6504 - `workspace_id: string or null`
6505 
6506 Workspace the usage occurred in, as a tagged workspace ID, including the organization's default workspace. Populated only when `workspace_id` is in `group_by[]`; null for Claude Enterprise usage.
6507 
6508 - `starting_at: string`
6509 
6510 Start of the period this row covers (inclusive), as an RFC 3339 UTC timestamp: the start of the row's time bucket when a time-bucket width is set, otherwise the requested `starting_at` rounded down to the hour.
6511 
6512 format: date-time
6513 
6514- `data_refreshed_at: string or null`
6515 
6516 RFC 3339 timestamp of the export this response was served from. Null when no export yet covers any part of the requested range, in which case `data` is empty. Data beyond this watermark is incomplete; for stable results, set `ending_at` to this value or earlier. Data is typically refreshed every 4 hours. Values can be revised as late events arrive and reconciliation runs, until about 7 days after the end of the calendar month the usage falls in; for example, values for October 1 can change until about November 7.
6517 
6518 format: date-time
6519 
6520- `has_more: boolean`
6521 
6522 Whether another page is available. When true, pass `next_page` as the `page` parameter to fetch it.
6523 
6524- `next_page: string or null`
6525 
6526 Opaque cursor for the next page, or null when `has_more` is false. Pass it as the `page` parameter, keeping the other parameters unchanged. A cursor can expire after the underlying data refreshes; the request then returns HTTP 410 and pagination must restart from the first page.
6527 
6528#### Example
6529 
6530```bash
6531curl https://api.anthropic.com/v1/organizations/analytics/cost \
6532 -H 'anthropic-version: 2026-10-21' \
6533 -H 'anthropic-beta: analytics-usage-cost-2026-08-24' \
6534 -H "Authorization: Bearer $ANTHROPIC_API_KEY"
6535```
6536 
6537##### Response (200)
6538 
6539```json
6540{
6541 "data": [
6542 {
6543 "cost": {
6544 "amount": "41280.000000",
6545 "currency": "USD",
6546 "list_amount": "51600.000000",
6547 "requests": 128
6548 },
6549 "ending_at": "2026-10-01T00:00:00Z",
6550 "group": {
6551 "actor": {
6552 "deleted": false,
6553 "email_address": "[email protected]",
6554 "name": "Jane Doe",
6555 "type": "user_actor",
6556 "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
6557 },
6558 "actor_type": "user_actor",
6559 "agent_id": "agent_01VHd3EAGJ6PLkP9LM7DDu3f",
6560 "api_key_id": "apikey_01Rj2N8SVvo6BePZj99NhmiT",
6561 "claude_tag_category": "dm",
6562 "claude_tag_user_id": "U0123ABCDEF",
6563 "context_window": "0-200k",
6564 "cost_type": "tokens",
6565 "deployment_id": "depl_01JFC6ihzZHtAuyHsaENdJhY",
6566 "environment_id": "env_017oTjuGedHtjhJauVC5xGJD",
6567 "inference_geo": "global",
6568 "model": "claude-opus-5-5",
6569 "product": "chat",
6570 "rbac_group_id": "rbac_group_012rppKaSVsmTo6NqRDXQXNF",
6571 "service_tier": "standard",
6572 "session_id": "sesn_0187kPDyNCwibNNvfaPEApCJ",
6573 "slack_channel_id": "C0123ABCDEF",
6574 "speed": "fast",
6575 "token_type": "cache_creation.ephemeral_1h_input_tokens",
6576 "user_profile_id": "uprof_01M33NeYUQK2WV9PpYcsPHLi",
6577 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
6578 },
6579 "starting_at": "2026-09-01T00:00:00Z"
6580 }
6581 ],
6582 "data_refreshed_at": "2019-12-27T18:11:19.117Z",
6583 "has_more": true,
6584 "next_page": "next_page"
6585}
6586```
6587 
46606588## Analytics › Usage Report
46616589 
46626590### Get Token Usage Over Time
46636591 
46646592**GET** `/v1/organizations/analytics/usage_report`
46656593 
4666Get token usage over time across a date range.
4667 
4668Returns token usage bucketed by minute, hour, or day, optionally broken
4669down by product, model, context window, inference region, or speed.
4670Available to organizations on a Claude Enterprise plan. Requires an API
4671key with the `read:analytics` scope.
6594[Legacy] Get token usage over time across a date range.
6595 
6596Returns token usage bucketed by minute, hour, or day, optionally broken down by one or more `group_by[]` dimensions, such as product or model. Available to organizations on a Claude Enterprise plan. Requires an API key with the `read:analytics` scope.
6597 
6598This endpoint is one of the legacy Claude Enterprise usage and cost reports. For new integrations, use [`GET /v1/organizations/analytics/usage`](https://platform.claude.com/docs/en/api/beta/organization/analytics/usage/list?sdk_languages=http) in the Usage and Cost Analytics API instead. To move an existing integration, see [Migrate from the Claude Enterprise usage and cost reports](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api?sdk_languages=http#migrate-from-enterprise-analytics-reports).
46726599 
46736600#### Query parameters
46746601 
from line 6958
50316958 
50326959**GET** `/v1/organizations/analytics/user_usage_report`
50336960 
5034Get per-user token usage across a date range.
5035 
5036Returns one row per user, ranked by the chosen token metric. Use this to
5037see which users consume the most tokens. Only usage attributable to a
5038seat user is included; for organization-wide totals including direct
5039API-key and automation traffic, use the bucketed
5040`/v1/organizations/analytics/usage_report` endpoint. Available to
5041organizations on a Claude Enterprise plan. Requires an API key with the
5042`read:analytics` scope.
6961[Legacy] Get per-user token usage across a date range.
6962 
6963Returns usage per user, ranked by the chosen token metric; `group_by[]` or `bucket_width` splits a user across several rows. Use this to see which users consume the most tokens. Only usage attributed to a user account is included; usage with no user attributed to it, such as requests attributed only to an API key, is left out. Available to organizations on a Claude Enterprise plan. Requires an API key with the `read:analytics` scope.
6964 
6965This endpoint is one of the legacy Claude Enterprise usage and cost reports. For new integrations, use [`GET /v1/organizations/analytics/usage`](https://platform.claude.com/docs/en/api/beta/organization/analytics/usage/list?sdk_languages=http) in the Usage and Cost Analytics API instead. To move an existing integration, see [Migrate from the Claude Enterprise usage and cost reports](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api?sdk_languages=http#migrate-from-enterprise-analytics-reports).
50436966 
50446967#### Query parameters
50456968 
from line 7381
54587381 
54597382**GET** `/v1/organizations/analytics/cost_report`
54607383 
5461Get cost in USD over time across a date range.
5462 
5463Returns cost bucketed by minute, hour, or day, optionally broken down by
5464product, model, context window, inference region, speed, cost type, or
5465token type. Available to organizations on a Claude Enterprise plan.
5466Requires an API key with the `read:analytics` scope.
7384[Legacy] Get cost in USD over time across a date range.
7385 
7386Returns cost bucketed by minute, hour, or day, optionally broken down by one or more `group_by[]` dimensions, such as model or cost type. Available to organizations on a Claude Enterprise plan. Requires an API key with the `read:analytics` scope.
7387 
7388This endpoint is one of the legacy Claude Enterprise usage and cost reports. For new integrations, use [`GET /v1/organizations/analytics/cost`](https://platform.claude.com/docs/en/api/beta/organization/analytics/cost/list?sdk_languages=http) in the Usage and Cost Analytics API instead. To move an existing integration, see [Migrate from the Claude Enterprise usage and cost reports](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api?sdk_languages=http#migrate-from-enterprise-analytics-reports).
54677389 
54687390#### Query parameters
54697391 
from line 7749
58277749 
58287750**GET** `/v1/organizations/analytics/user_cost_report`
58297751 
5830Get per-user cost in USD across a date range.
5831 
5832Returns one row per user, ranked by spend. Use this to see which users
5833account for the most cost. Only cost attributable to a seat user is
5834included; for organization-wide totals including direct API-key and
5835automation traffic, use the bucketed
5836`/v1/organizations/analytics/cost_report` endpoint. Available to
5837organizations on a Claude Enterprise plan. Requires an API key with the
5838`read:analytics` scope.
7752[Legacy] Get per-user cost in USD across a date range.
7753 
7754Returns cost per user, ranked by spend; `group_by[]` or `bucket_width` splits a user across several rows. Use this to see which users account for the most cost. Only cost attributed to a user account is included; cost with no user attributed to it, such as requests attributed only to an API key, is left out. Available to organizations on a Claude Enterprise plan. Requires an API key with the `read:analytics` scope.
7755 
7756This endpoint is one of the legacy Claude Enterprise usage and cost reports. For new integrations, use [`GET /v1/organizations/analytics/cost`](https://platform.claude.com/docs/en/api/beta/organization/analytics/cost/list?sdk_languages=http) in the Usage and Cost Analytics API instead. To move an existing integration, see [Migrate from the Claude Enterprise usage and cost reports](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api?sdk_languages=http#migrate-from-enterprise-analytics-reports).
58397757 
58407758#### Query parameters
58417759 
58427760 
Feedback