BillCurfew

Guide · Anthropic

When a Claude agent will not stop spending

Opus-class loops are quiet until the invoice. The organization usage report can see the key. An individual console account cannot.

Organization accounts only

Anthropic’s Admin API is unavailable on individual accounts. You need an organization, an Admin API key (it looks like sk-ant-admin…), and permission to read usage. If you paste a normal inference key, the usage report will refuse you. BillCurfew surfaces that instead of pretending the sync worked.

What the usage report returns

GET /v1/organizations/usage_report/messages accepts bucket widths of 1m, 1h, and 1d. Group by api_key_id and model. Each result carries uncached input tokens, cache reads, 5-minute and 1-hour cache writes, and output tokens. It does not carry a dollar amount. BillCurfew prices those tokens from Anthropic’s published list, including cache writes, which are the part people forget when a long prompt is cached and then rewritten all night.

Turning the key off

POST /v1/organizations/api_keys/{id} with { "status": "inactive" } disables the key. The same call with status active turns it back on. That is the right kill switch for a contractor’s agent or a staging loop: reversible, scoped to one key, and independent of the workspace.

Where the money actually goes

  • A tool-using agent that retries on a 529 can multiply output tokens without a new prompt you would notice.
  • Cache writes on a 1-hour breakpoint cost more than a cache read. A job that rebuilds the prefix every call pays the write price on repeat.
  • Batch and flex tiers are cheaper. If you are not on them, do not assume the usage chart’s token count maps to yesterday’s rate.

A daily cap on the contract-reviewer key, plus a spike rule, is enough to page you while the loop is still a story you can tell, not a line item you have to explain.

Let BillCurfew watch the key

Paste the admin key, set a daily cap and a spike rule, and get email before the invoice does. Prompts stay with the provider.

Start on the free tier