LLMs

How to get your Anthropic API usage, balance and spend programmatically

Anthropic doesn't expose your credit balance over the API. Spend comes from the Admin API cost report, GET /v1/organizations/cost_report, in daily buckets, authenticated with an Admin key in the x-api-key header.

What the Anthropic API exposes

SignalAnthropic
BalanceNo
Spend historyYes. GET /v1/organizations/usage_report/messages, GET /v1/organizations/cost_report (admin key)
Cost breakdownBy model
Plan and quotaNo
Cost on each responseToken counts only
Rate-limit headersanthropic-ratelimit-tokens-remaining, anthropic-ratelimit-requests-remaining
CredentialAdmin key

Call it yourself

Credential. An Admin key (sk-ant-admin…), created by an org admin in the Claude Console. Standard API keys can't read the cost report.

Daily cost, split by model

curl -g "https://api.anthropic.com/v1/organizations/cost_report?starting_at=2026-10-10T00:00:00Z&ending_at=2026-10-17T00:00:00Z&bucket_width=1d&group_by[]=description" \
  -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
  -H "anthropic-version: 2023-06-01"
{
  "data": [
    {
      "starting_at": "2026-10-16T00:00:00Z",
      "ending_at": "2026-10-17T00:00:00Z",
      "results": [
        { "amount": "1834.50", "currency": "USD", "model": "claude-sonnet-4-5", "cost_type": "tokens" },
        { "amount": "120.00", "currency": "USD", "model": null, "cost_type": "web_search" }
      ]
    }
  ],
  "has_more": false,
  "next_page": null
}

Trimmed to the fields Argus reads. Values are examples.

Gotchas

  • amount is a decimal string in cents: "1834.50" is $18.345.
  • limit tops out at 31 daily buckets per page.
  • model is only filled in when you group by description, and description splits each model by token type, so roll results up per model yourself. Web search and code execution carry no model.
  • Cost history is available from January 1, 2026 onward.
  • An empty balance returns 400 "credit balance is too low", not 402 or 429.
  • Live headroom is in anthropic-ratelimit-requests-remaining and anthropic-ratelimit-tokens-remaining response headers.

How Anthropic charges

Per-token, prepaid credits by default. Named tiers Start→Scale→Custom raise rate limits and the monthly spend cap; prompt caching and batch discounts apply.

  • Start: $500/mo cap; 1,000 RPM / 2M ITPM (Opus/Sonnet)
  • Scale: $200,000/mo cap; 10,000 RPM / 10M ITPM
  • Custom: uncapped

At zero. Zero credits → 400 "credit balance is too low"; tier monthly cap pauses until next month.

  • requests per minute, per org. Token-bucket RPM + input/output TPM per model class; see tiers.

Or let Argus track it

Paste the key once. Argus keeps the ledger, and your coding agent reads it through the MCP server.

  • Pulls Anthropic's daily cost buckets every hour for month-to-date spend and a projected month-end total, broken down by model.
  • With the SDK, records token counts on each response and prices them per model, so you see what a call cost before the provider's daily bucket lands.
  • Emails you on low balance, days to zero, a spend spike, or projected overage.
  • Hands all of it to your coding agent over MCP, so it can ask what a run cost or how much runway is left without leaving the editor.
> what has anthropic cost today, and how long until it runs out?

get_overview       → anthropic: mtd spend, burn per day, days to zero
get_request_costs  { "provider": "anthropic", "limit": 25 }
get_advisories     → credits_low, spend_spike, rate_limit_low …

Questions

Does Anthropic have an API for its balance?
Anthropic doesn't expose your credit balance over the API. Spend comes from the Admin API cost report, GET /v1/organizations/cost_report, in daily buckets, authenticated with an Admin key in the x-api-key header.
Can I get Anthropic spend per day from the API?
Yes, from GET /v1/organizations/usage_report/messages, GET /v1/organizations/cost_report (admin key), in daily buckets.
What happens when Anthropic credits run out?
Zero credits → 400 "credit balance is too low"; tier monthly cap pauses until next month. Auto-recharge is available.
What key does Argus need for Anthropic?
An Admin key (sk-ant-admin…), created by an org admin in the Claude Console. Standard API keys can't read the cost report.

Related

Pricing and limits verified 2026-07-20 against platform.claude.com/docs/en/about-claude/pricing, platform.claude.com/docs/en/api/rate-limits. Endpoints are the ones the Argus Anthropic connector calls.

Let your coding agent watch the meter.

Connect a provider key, point Claude Code or Cursor at the Argus MCP server, and ask what the last run cost.