First request changedmanage-claude/usage-cost-api
Nearest release: v2.1.333, published 4 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+21added
Lines−41removed
From line
1
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits24to this page, all time
### Claude Enterprise organizations
The whole hunk
from line 1, old and new numbered
/
from line 1
11---
22title: Usage and Cost API
33url: https://platform.claude.com/docs/en/manage-claude/usage-cost-api
4description: The legacy Admin API usage and cost report endpoints. For new integrations, use the Usage and Cost Analytics API.
4description: The legacy Admin API usage and cost report endpoints for Claude Console organizations. For new integrations, use the Usage and Cost Analytics API.
55---
66
77<Tip>
8 **The Admin API isn’t available to organizations on the claude.ai Team plan or to individual Claude Console accounts.** If your company also has a Claude Console organization, you can use the API with that organization; see [Create an Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys). An individual Console account must first set up an organization on the [Organization](https://platform.claude.com/settings/organization) page (`platform.claude.com/settings/organization`) in the Claude Console.
8 The Admin API isn’t available to organizations on the claude.ai Team plan, and an individual Claude Console account can’t create an Admin API key.
99</Tip>
1010
11If your company has a Claude Console organization, you can use the Admin API with that organization; see the [Admin API keys and tokens](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) page. An individual Console account must first set up an organization on the [Organization settings](https://platform.claude.com/settings/organization) page (`platform.claude.com/settings/organization`) in the Claude Console.
12
1113<Note>
12 The Usage and Cost API (`/v1/organizations/usage_report/messages` and `/v1/organizations/cost_report`) is a legacy API and remains supported. For new integrations, use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api), which reports usage and cost with more grouping and filtering dimensions. To move an existing integration, see [Migrate from the Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#migrate-from-usage-cost-api).
14 The Usage and Cost API (`/v1/organizations/usage_report/messages` and `/v1/organizations/cost_report`) is a legacy API and is supported for Claude Console organizations. For new integrations, use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api), which reports usage and cost with more grouping and filtering dimensions. To move an existing integration, see [Migrate from the Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#migrate-from-usage-cost-api).
1315</Note>
1416
15The Usage and Cost API provides programmatic and granular access to historical API usage and cost data for your organization. For Claude Console organizations, this data is similar to what the Claude Console shows on the [Usage](https://platform.claude.com/usage) page (`platform.claude.com/usage`) and the [Cost](https://platform.claude.com/cost) page (`platform.claude.com/cost`).
17The Usage and Cost API provides programmatic and granular access to historical API usage and cost data for your organization. This data is similar to what the Claude Console shows on the [Usage](https://platform.claude.com/usage) page (`platform.claude.com/usage`) and the [Cost](https://platform.claude.com/cost) page (`platform.claude.com/cost`).
1618
1719This API allows you to better monitor, analyze, and optimize your Claude implementations:
1820
from line 21
1921* **Accurate usage tracking:** Get precise token counts and usage patterns instead of relying solely on response token counting
2022* **Cost reconciliation:** Match internal records with Anthropic billing for finance and accounting teams
2123* **Product performance and improvement:** Monitor product performance while measuring if changes to the system have improved it, or set up alerting
22* **[Rate limit](https://platform.claude.com/docs/en/api/rate-limits) optimization:** Optimize features such as [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) or specific prompts to use your allocated capacity efficiently.
24* **[Rate limit](https://platform.claude.com/docs/en/api/rate-limits) optimization:** Optimize features such as [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) or specific prompts to use your allocated capacity efficiently
2325* **Advanced analysis:** Perform deeper data analysis than what’s available in Console
2426
2527<Check>
26 **Authentication**
28 **Admin API credentials required.** These endpoints are part of the Admin API.
29</Check>
2730
28 These endpoints are part of the Admin API. Claude Console organizations can access them using any of these credentials:
31Authenticate with an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys) or an OAuth token with the `org:admin` scope. You can also use a personal or service account key scoped to the organization. A personal or service account key has the permissions of its user or service account. Keys scoped to a single workspace, including workspace keys, don’t work. See the Admin API page’s [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) section.
2932
30 * An [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys)
31 * An OAuth token with the `org:admin` scope
32 * A personal or service account key that isn’t scoped to a workspace
33These endpoints are not available to Claude Enterprise organizations, which use an Analytics API key with the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api).
3334
34 Workspace API keys don’t work. See [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) for details.
35**Claude Platform on AWS:** Use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) instead of the Usage and Cost API.
3536
36 Claude Enterprise organizations use an Analytics API key, and the usage endpoint leaves out some of their usage; see [Claude Enterprise organizations](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#claude-enterprise-organizations).
37</Check>
37**Claude Models on Google Cloud (Anthropic managed):** Of the Usage and Cost API endpoints, only the [usage endpoint](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#usage-api) is available. Call it through the [organization-level base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) with Google Cloud credentials instead of an Admin API key. The only predefined [IAM role](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) that allows this call is `roles/claude.admin`. For cost data, use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) or the **Cost** page in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console).
3838
39<Note>
40 **Claude Platform on AWS:** The Usage and Cost API endpoints are not available. Use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api).
41</Note>
42
43<Note>
44 **Claude Models on Google Cloud (Anthropic managed):** Of the Usage and Cost API endpoints, only the [usage endpoint](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#usage-api) is available. Call it through the [organization-level base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) with Google Cloud credentials instead of an Admin API key. The only predefined [IAM role](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) that allows this call is `roles/claude.admin`. For cost data, use the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) or the **Cost** page in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console).
45</Note>
46
4739## Which API do you need?
4840
4941The APIs you can call, and the key each one takes, depend on which Claude product your organization uses:
from line 43
5143| API | Claude Console (Claude Platform) | Claude Enterprise (claude.ai) |
5244| ----- | ----- | ----- |
5345| [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) (recommended) | Admin API key (`sk-ant-admin01-...`) or another [Admin API credential](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) | Analytics API key |
54| Usage and Cost API (legacy), which this page documents | Admin API key or another Admin API credential | Analytics API key |
46| Usage and Cost API (legacy), which this page documents | Admin API key or another Admin API credential | Not available |
5547| [Claude Enterprise Analytics API](https://platform.claude.com/docs/en/api/beta/organization/analytics) cost and usage endpoints (legacy) | Not available | Analytics API key |
5648
5749Claude Enterprise parent organizations do not appear in Claude Console and carry no Admin API keys, so for them the Analytics API key is the only path to this data. See [Analytics APIs](https://platform.claude.com/docs/en/manage-claude/analytics-api) for how to create each key type and which plans the Claude Enterprise cost data applies to.
5850
59### Claude Enterprise organizations
60
61A Claude Enterprise organization uses one [Analytics API key](https://platform.claude.com/docs/en/manage-claude/analytics-api#get-access-to-the-claude-enterprise-analytics-api) for all three APIs in the table. For these APIs, the key reads only the organization it was created in. Send it in the `x-api-key` header, as the examples on this page do with an Admin API key.
62
63For these organizations, the two endpoints don’t cover the same usage, so you can’t reconcile one against the other:
64
65* **[Usage endpoint](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#usage-api):** It leaves out usage from some Claude products, so its totals can be lower than the organization’s usage. For example, it doesn’t count the following:
66
67 * Cowork
68 * Claude Code in the terminal, IDEs, and the desktop app
69 * Text chats in Claude on the web, desktop, and mobile
70
71* **[Cost endpoint](https://platform.claude.com/docs/en/manage-claude/usage-cost-api#cost-api):** With a `starting_at` on or after October 1, 2025, it covers usage-based charges across Claude products, including the three in the previous list. It doesn’t include seat fees or usage that a seat covers.
72
7351## Partner solutions
7452
7553Leading observability platforms offer ready-to-use integrations for monitoring your Claude API usage and cost, without writing custom code. These integrations provide dashboards, alerting, and analytics to help you manage your API usage effectively.
from line 231
253231
254232| Granularity | Default limit | Maximum limit | Use case |
255233| ----- | ----- | ----- | ----- |
256| `1m` | 60 buckets | 1,440 buckets | Real-time monitoring |
234| `1m` | 60 buckets | 1,440 buckets | Minute-level analysis |
257235| `1h` | 24 buckets | 168 buckets | Daily patterns |
258236| `1d` | 7 buckets | 31 buckets | Weekly/monthly reports |
259237
from line 307
329307
330308### How fresh is the data?
331309
332Usage and cost data typically appears within 5 minutes of API request completion, though delays might occasionally be longer.
310Usage data typically appears within about 30 minutes after an API request completes, though delays can be longer. The API returns a time bucket only after it ends, so results leave out the current UTC minute, hour, or day. A bucket that ended in the last 30 minutes or so can be incomplete or empty until its usage arrives.
333311
312Cost data is daily, so each UTC day appears only after it ends, and the most recent day can be incomplete.
313
334314### What’s the recommended polling frequency?
335315
336316The API supports polling once per minute for sustained use. For short bursts (for example, downloading paginated data), more frequent polling is acceptable. Cache results for dashboards that need frequent updates.
from line 337
357337
358338### How do I get per-user cost breakdowns for Claude Code?
359339
360Call the cost endpoint of the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#how-do-i-get-per-user-cost-for-claude-code) with `products[]=claude_code&group_by[]=actor`. For cost by API key, group by `api_key_id` instead. The [Claude Code Analytics API](https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api) also provides per-user estimated costs and productivity metrics.
340Call the cost endpoint of the Usage and Cost Analytics API with `products[]=claude_code&group_by[]=actor`. For cost by API key, group by `api_key_id` instead. For details, see [How do I get per-user cost for Claude Code?](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api#how-do-i-get-per-user-cost-for-claude-code) on the Usage and Cost Analytics API page. The [Claude Code Analytics API](https://platform.claude.com/docs/en/manage-claude/claude-code-analytics-api) also provides per-user estimated costs and productivity metrics.
361341
362342## See also
363343
No line in this hunk matches that.