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. Initial sync requests up to 90 days of available history, then scheduled syncs refresh recent data. Billed cost categories and available Claude Code estimated usage remain separate.

What StackSpend tracks

  • Daily API costs for the model and token-cost categories returned by the Cost API
  • Billed model/token-type cost categories; general API token counts are not fetched
  • Available Claude Code user/model token usage and estimated API-equivalent value
  • Claude Code token and productivity metrics
  • Up to 90 days of initial history requested where available
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

Go to Providers → Add provider → Anthropic:

Add Anthropic provider

••••••••••••••••••••

Requires an Admin API key (sk-ant-admin...) — not a regular API key

⚠

Use your Admin API key (sk-ant-admin...), not a regular API key (sk-ant-api...). The connector rejects the wrong key type.

Providers›Add provider›Anthropic
3

Verify sync

Check the first successful sync, returned date range and cost basis. Initial history is requested for up to 90 days where available. Claude Code analytics, when enabled and available, is stored separately as estimated usage.

Data summary

AttributeValue
Data latencyProvider reporting plus scheduled sync
Historical dataUp to 90 days where available
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. This connector requires an Admin API key with the sk-ant-admin prefix.

Frequently asked questions

What credential does StackSpend need to connect Anthropic?

StackSpend needs an Anthropic Admin API key (sk-ant-admin), created under Settings → Admin API Keys. The connector makes read requests, but the key carries administrative authority. A regular API key (sk-ant-api) is rejected with a key-type error.

Is the connection read-only?

StackSpend makes read requests for billed cost categories and available Claude Code analytics. The Admin key itself has broader authority. General API token counts and workspace chargeback are not guaranteed; Claude Code estimates are kept separate from billed spend.

How long does setup take and how much history loads?

Once the Admin key is ready, connection setup takes a few minutes. Initial sync requests up to 90 days where available; source reporting and scheduled sync determine freshness.

Why don't I see any cost data yet?

Data appears after provider reporting and a successful sync. If sync fails with an authentication error, confirm you used an Admin API key (sk-ant-admin) and not a regular API key (sk-ant-api). Claude Code analytics have their own reporting delay; verify the returned date range and latest successful sync.

Connect Anthropic to StackSpend — StackSpend Docs