Claude Platform Docs
AdminMonitoring

Usage and Cost API

Programmatically access your organization's API usage and cost data with the Usage & Cost Admin API.

The Usage & Cost Admin API provides programmatic and granular access to historical API usage and cost data for your organization. This data is similar to the information available in the Usage and Cost pages of the Claude Console.

This API enables you to better monitor, analyze, and optimize your Claude implementations:

  • Accurate usage tracking: Get precise token counts and usage patterns instead of relying solely on response token counting
  • Cost reconciliation: Match internal records with Anthropic billing for finance and accounting teams
  • Product performance and improvement: Monitor product performance while measuring if changes to the system have improved it, or set up alerting
  • Rate limit optimization: Optimize features like prompt caching or specific prompts to make the most of your allocated capacity.
  • Advanced analysis: Perform deeper data analysis than what's available in Console

Claude Enterprise organizations use an Analytics API key with a different API instead; see Which API do you need?.

Which API do you need?

Anthropic provides cost and usage reporting through two APIs, depending on which Claude product your organization manages:

Your organizationAPIKey type
Claude Console (Claude Platform)The Usage and Cost Admin API described on this pageAdmin API key (sk-ant-admin01-...) or another Admin API credential
Claude Enterprise (claude.ai)The Claude Enterprise Analytics API cost and usage endpointsAnalytics API key

Claude 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 for how to create each key type and which plans the Claude Enterprise cost data applies to.

Partner solutions

Leading 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.

Cloud intelligence platform for tracking and forecasting costs

LLM Observability with automatic tracing and monitoring

Agentless integration for easy LLM observability with out-of-the-box dashboards and alerts

FinOps platform for cloud and AI cost management

Advanced querying and visualization through OpenTelemetry

FinOps platform for LLM cost & usage observability

Quick start

Get your organization's daily usage for the last 7 days:

cURL
curl "https://api.anthropic.com/v1/organizations/usage_report/messages?\
starting_at=2025-01-08T00:00:00Z&\
ending_at=2025-01-15T00:00:00Z&\
bucket_width=1d" \
  -H "anthropic-version: 2023-06-01" \
  -H "x-api-key: $ANTHROPIC_ADMIN_KEY"

Usage API

Track token consumption across your organization with detailed breakdowns by model, workspace, and service tier with the /v1/organizations/usage_report/messages endpoint.

Key concepts

  • Time buckets: Aggregate usage data in fixed intervals (1m, 1h, or 1d)
  • Token tracking: Measure uncached input, cached input, cache creation, and output tokens
  • Filtering & grouping: Filter by API key, workspace, model, service tier, context window, data residency, or speed (beta), and group results by these dimensions
  • Server tool usage: Track usage of server-side tools such as web search

For complete parameter details and response schemas, see the Usage API reference.

Basic examples

Daily usage by model

cURL
curl "https://api.anthropic.com/v1/organizations/usage_report/messages?\
starting_at=2025-01-01T00:00:00Z&\
ending_at=2025-01-08T00:00:00Z&\
group_by[]=model&\
bucket_width=1d" \
  -H "anthropic-version: 2023-06-01" \
  -H "x-api-key: $ANTHROPIC_ADMIN_KEY"

Hourly usage with filtering

cURL
curl "https://api.anthropic.com/v1/organizations/usage_report/messages?\
starting_at=2025-01-15T00:00:00Z&\
ending_at=2025-01-15T23:59:59Z&\
models[]=claude-opus-5&\
service_tiers[]=batch&\
context_window[]=0-200k&\
bucket_width=1h" \
  -H "anthropic-version: 2023-06-01" \
  -H "x-api-key: $ANTHROPIC_ADMIN_KEY"

Filter usage by API keys and workspaces

cURL
curl "https://api.anthropic.com/v1/organizations/usage_report/messages?\
starting_at=2025-01-01T00:00:00Z&\
ending_at=2025-01-08T00:00:00Z&\
api_key_ids[]=apikey_01Rj2N8SVvo6BePZj99NhmiT&\
api_key_ids[]=apikey_01ABC123DEF456GHI789JKL&\
workspace_ids[]=wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ&\
workspace_ids[]=wrkspc_01XYZ789ABC123DEF456MNO&\
bucket_width=1d" \
  -H "anthropic-version: 2023-06-01" \
  -H "x-api-key: $ANTHROPIC_ADMIN_KEY"

Data residency

Track your data residency controls by grouping and filtering usage with the inference_geo dimension. This is useful for verifying geographic routing across your organization.

cURL
curl "https://api.anthropic.com/v1/organizations/usage_report/messages?\
starting_at=2026-02-01T00:00:00Z&\
ending_at=2026-02-08T00:00:00Z&\
group_by[]=inference_geo&\
group_by[]=model&\
bucket_width=1d" \
  -H "anthropic-version: 2023-06-01" \
  -H "x-api-key: $ANTHROPIC_ADMIN_KEY"

You can also filter to a specific geo. Valid values are global, us, and not_available:

cURL
curl "https://api.anthropic.com/v1/organizations/usage_report/messages?\
starting_at=2026-02-01T00:00:00Z&\