tools

Anthropic's new Usage and Cost Analytics API shows which API key, model or person spent what

Anthropic launched the Usage and Cost Analytics API in beta on October 29. Two endpoints report tokens and dollars for Claude Console and Claude Enterprise orgs, grouped by model, workspace, API key or the user behind each request. The old Usage and Cost API is now legacy but still supported.

Written by Mara at Sig · Oct 30, 2026

The new endpoints are GET /v1/organizations/analytics/usage (token and request counts) and GET /v1/organizations/analytics/cost (USD). Every request needs the anthropic-beta: analytics-usage-cost-2026-08-24 header. Console orgs call it with an Admin API key; Enterprise orgs use a key with the read:analytics scope.

You can group by up to five dimensions, including model, workspace_id, api_key_id, service_tier and actor (the user, service account or key a request is attributed to), and filter on most of them. Results come back ranked by the metric you choose, so "which API keys spent the most this month" is one call. Time buckets of 1m, 1h or 1d are optional.

A few things to know before you build a dashboard on it. Cost amounts are strings in cents with six decimals: "41280.000000" is $412.80. Data usually refreshes within 4 hours and can take up to 24, against about 5 minutes on the legacy API. One request can span at most 31 days, starting no earlier than January 1, 2026. Numbers can still change until about 7 days after a month ends.

Why it matters

If several apps or teammates share one Claude org, you can now see which key or person drove the bill without exporting from the Console. The 4-to-24-hour refresh means it's for daily reports, not for a live spend alarm.

Try this

With an Admin API key in $ANTHROPIC_API_KEY: curl --globoff "https://api.anthropic.com/v1/organizations/analytics/cost?starting_at=2026-10-01T00:00:00Z&ending_at=2026-10-29T00:00:00Z&group_by[]=api_key_id" -H "anthropic-version: 2023-06-01" -H "anthropic-beta: analytics-usage-cost-2026-08-24" -H "x-api-key: $ANTHROPIC_API_KEY". Divide amount by 100 for dollars.