Skip to content
Back to Blog
Guidefinops practitioner

Claude Enterprise Cost and Usage Analytics Guide

How to use Claude Platform, Claude Code, and Claude Enterprise analytics correctly: key types, endpoints, grouping dimensions, data freshness, known gaps, and a FinOps ledger mapping.

12 min read

Direct answer. Do not treat Anthropic's analytics APIs as interchangeable. Claude Code Analytics uses an Admin API key and reports daily per-user Claude Code productivity and estimated cost. Claude Enterprise Analytics uses a separate Analytics API key and reports enterprise engagement, adoption, and usage-based cost data. The Usage and Cost API is for organization-level API consumption.

Last reviewed: July 15, 2026. Endpoint availability, key provisioning, data coverage, and pricing are vendor-controlled. Test with a read-only key in your own organization before automating an import.

The most common reporting failure is a key mismatch. A team calls an endpoint with the wrong kind of Anthropic key, then works around the error by exporting a partial dashboard. That produces a ledger that looks complete while omitting the activity or cost the organization actually needs.

Pick the correct API first

API Use when Key type Main coverage
Claude Code Analytics API You manage Claude Code through Claude Platform. Admin API key (sk-ant-admin...) Daily per-user sessions, code changes, commits, pull requests, tool acceptance, tokens, and estimated model cost.
Claude Enterprise Analytics API You manage a Claude Enterprise workspace. Analytics API key from claude.ai organization settings. Engagement, adoption, product usage, and cost/usage data for usage-based Enterprise plans.
Usage and Cost API You need API consumption across Anthropic services. Organization/API access per current documentation. Usage and cost data organized for API reporting and analysis.

Anthropic's Analytics APIs guide is explicit: an Admin API key cannot call the Claude Enterprise Analytics API, and an Analytics API key cannot call the Admin API. Treat the key type and source system as ledger provenance, not implementation detail.

Access and control checklist

  • Confirm which Claude product the organization actually uses: Platform, Enterprise, or both.
  • Ask the correct administrator to create the scoped, read-only analytics key.
  • Store the secret in a secrets manager, never a spreadsheet or exported report.
  • Document the endpoint, filters, grouping dimensions, data-refresh watermark, and retention expectation.
  • Create a service identity and owner for the integration rather than using a departing employee's key.

A safe read-only export example

For a Claude Platform organization, Anthropic documents a daily Claude Code report endpoint. The following is read-only; replace the placeholder and use the least privileged Admin API key available.

curl "https://api.anthropic.com/v1/organizations/usage_report/claude_code?starting_at=2026-07-01&limit=1000" \
  --header "anthropic-version: 2023-06-01" \
  --header "x-api-key: $ANTHROPIC_ADMIN_API_KEY"

Persist the raw response reference, retrieval time, and query parameters. Do not directly treat the response as an invoice. It is an operational usage and estimated-cost source that must reconcile to the contract and billing record.

Grouping dimensions that matter

Field or dimension Decision it supports
User / actor Adoption, power-user context, and owner-level discussion.
Date Daily trend and stable month-close windows.
Product Separates chat, Claude Code, and other product usage.
Model Model-mix and routing decisions.
Team / RBAC group Showback, budget owner, and cost-center mapping.
Cost type / token type Explains whether cost came from token, code execution, or other components.
Sessions, commits, PRs, tool acceptance Productivity context, never a standalone value claim.

The Claude Code Analytics API can report sessions, lines added or removed, commits, pull requests, tool acceptance/rejection, token use, and estimated cost by model. That is useful context for adoption and engineering workflow analysis. It does not prove that each code change was good, nor should it become a quota metric.

Freshness and reconciliation

Freshness rules determine whether a metric is safe for a daily dashboard, a forecast, or an invoice review:

Data family Anthropic's documented behavior Safe use
Claude Code daily metrics Typically available within one hour after activity completion. Adoption and near-term operations.
Enterprise engagement/adoption Daily snapshot; data becomes queryable after the documented aggregation window. Trend analysis, not immediate intervention.
Enterprise cost and usage Usually within four hours, may take 24 hours, and can be revised up to 30 days. Forecasting and operational reporting; use a 30-day-close rule for invoice-grade totals.

For cost APIs, preserve data_refreshed_at. If you query a period after that watermark, treat the tail as incomplete. This is the difference between an honest dashboard and a number that shifts without explanation.

Known coverage gaps

Anthropic documents that Claude Code activity used through Amazon Bedrock is not returned by the Claude Enterprise Analytics API. The Claude Code Analytics API similarly describes coverage for Claude API usage rather than AWS, Microsoft Foundry, Bedrock, or Google Cloud routes. Keep provider-hosted usage in its own source path and reconcile it with the related cloud bill.

The broader rule: vendor analytics is an input to AI spend management, not the whole ledger. Combine it with subscription terms, invoices, cloud costs, seat roster, team hierarchy, and the workflow's success metric.

Map the export into the common AI-spend ledger

Claude field Ledger field Notes
Product and model product, model Preserve source values and a normalized label.
amount and currency effective_cost, currency Store vendor response exactly and apply documented unit conversion in a tested importer.
User actor or RBAC group owner, team, cost_center Map identity centrally; do not maintain manual email-to-team mappings in every spreadsheet.
Sessions / token data quantity, billing_unit, usage_meter Use for drivers and usage review, not as the only cost truth.
data_refreshed_at last_refreshed_at Retain the source watermark.
Source endpoint and key type source, confidence Makes coverage and reliability reviewable.

Use AI cost allocation to define how shared Claude Enterprise cost is treated. Use cost per successful AI task only after a workflow outcome is defined.

Sources

Build an AI spend baseline

Use the AI Spend Intelligence hub to turn vendor bills, usage exports, and ownership gaps into a 30-day FinOps operating plan.

Explore AI Spend Intelligence

Frequently asked questions

Which Anthropic analytics API should a FinOps team use?+

Use the Claude Code Analytics API for daily per-user Claude Code metrics in Claude Platform organizations, the Claude Enterprise Analytics API for Claude Enterprise engagement, adoption, and usage-based cost data, and the Usage and Cost API for organization-level API consumption. The APIs use different key types and cannot be substituted for one another.

How fresh is Claude Enterprise cost data?+

Anthropic says cost and usage data is typically available within four hours, can take up to 24 hours, and may be revised for up to 30 days. For invoicing-grade totals, query dates at least 30 days in the past and preserve the data_refreshed_at watermark.

By Reviewed by Alex LowePublished July 15, 2026

Related Guides

Get the AI Spend Brief

One source-checked AI billing change, one optimization technique, and one FinOps operating decision.