Claude Usage and Cost Analytics API: spend and tokens by model and key

Anthropic's beta Usage and Cost Analytics API lets Claude Console and Enterprise teams query token use and spend by model, workspace and API key.

About the tool
Claude
Category
Coding
Format
Update

Читати українською

On October 29, 2026, Anthropic launched the Usage and Cost Analytics API in beta for Claude Console and Claude Enterprise organizations. Teams can now pull token usage and spend programmatically instead of checking the consoles by hand.

What’s new

The API has two endpoints: one returns token and request counts, the other returns cost in USD. You can group and filter results by model, workspace, API key or user, and build daily or hourly series for dashboards. Grouping accepts up to five dimensions at once. The older Usage and Cost API still works, though Anthropic now classes it as legacy.

How to try it

Console organizations need an Admin API key; Enterprise organizations need a key with the read:analytics scope. Every request must include the beta header anthropic-beta: analytics-usage-cost-2026-08-24 plus an anthropic-version header. The SDKs and the ant CLI add these for you. For a service that collects this data, the docs recommend a dedicated key in a secrets manager, or a Workload Identity Federation rule instead of a long-lived key.

Limitations

The feature is in beta, and individual accounts cannot use the Admin API. One request covers at most 31 days, and data is available only from January 1, 2026 and within the last 365 days. Data usually refreshes within 4 hours and can lag up to 24 hours, while monthly totals can still change for about 7 days after month end. The documentation lists no separate price for this API.

Prepared with AI from public sources. Reviewed by the site’s author.