StackSpendDocs

Anthropic

Connect your Anthropic account to track API costs, model-level usage, and Claude Code analytics in StackSpend.

Anthropic logo

Anthropic

Direct API billing — Admin API key required

The Anthropic provider connects StackSpend to your Anthropic organization account via the Admin API. Once connected, StackSpend pulls your full billing history on first sync, then keeps it current in real time as new usage accrues.

What StackSpend tracks

  • Real-time API costs across all models in your organization
  • Model-level usage breakdown — input tokens, output tokens, and cost per model
  • Claude Code user-level cost attribution — see spend per engineer
  • Claude Code token and productivity metrics
  • Full historical data synced on first connection
Anthropic and Claude are two separate providers.Anthropic tracks direct API billing data — what Anthropic charges your organization account. Claude tracks OTel-based estimated usage emitted by Claude Code, Cowork, and agents running in your infrastructure. If you use Claude Code or run Claude-powered agents, connect both providers to get the full picture. See the Claude provider setup guide →

Prerequisites

  • An Anthropic organization account (not a personal account)
  • An Admin API key — this must be created from the Admin API section, not the regular API keys section

Setup

1

Get your Admin API key

Go to console.anthropic.com and navigate to Settings → Admin API Keys. Click Create key and give it a name such as “StackSpend”.

Admin API key — not a regular API key.This must be an Admin API key. The regular API key (found under “API Keys”) does not have access to billing data and will not work. Admin API keys are found under Settings → Admin API Keys.
2

Add to StackSpend

In StackSpend, go to Providers → Add provider and select Anthropic. Paste your Admin API key into the key field and click Save.

3

Verify sync

Cost data appears within minutes of saving. Your full billing history is backfilled on the first sync. Claude Code analytics (user attribution, token and productivity metrics) may lag by up to 1 hour.

Data summary

AttributeValue
Data latencyReal-time
Historical dataFull history
Setup time2 min
Wrong key type is the most common setup error.If sync fails with an authentication error, check that you used an Admin API key (sk-ant-admin...) and not a regular API key (sk-ant-api...). These are different keys created in different sections of the Anthropic console. Only Admin API keys have permission to read billing data.
StackSpend Docs