Bill shock happens when metered AI usage runs past what you expected. Flat subscriptions cap your bill by design; API keys, credits and pay-as-you-go add-ons do not unless you set a limit. These are the controls vendors document, checked 2026-12-01.
Control 1: prepaid credits (Anthropic)
Claude’s Console billing help says most organizations pay for API and playground usage with prepaid usage credits bought in advance. If you run out, API calls stop until you add more, which is a natural ceiling. Max, Ultra and Team plans also include monthly API credits that are spent first and expire at the end of each billing cycle. Failed requests are not charged. Organizations with an invoicing arrangement are billed monthly instead and lose this natural stop.
Control 2: spend limits (Anthropic, OpenAI)
Anthropic’s rate-limit docs describe a monthly spend cap per tier: when you reach it, API usage pauses until 00:00 UTC on the first day of the next month and requests return HTTP 429 with an enforced_spend_limit_reached error code. OpenAI’s rate-limit guide lists a hard spend limit that returns 429 on affected requests, to enforce a monthly organization or project cap.
Control 3: dollar budgets (GitHub)
GitHub lets you set an additional-usage budget in US dollars for Copilot credits (1 credit = $0.01, so a $10 budget covers 1,000 credits). GitHub’s budgets docs add two caveats: a budget applies only to metered usage after the date it is created, so you can exceed it in the first billing cycle, and included-usage alerts are different from budget-threshold alerts. Usage beyond the allowance is billed after it occurs.
Control 4: alerts and monitoring
Use each vendor’s usage dashboard and email alerts, and review usage weekly rather than at invoice time. Track tokens with the usage fields in API responses.
A simple routine
- Prefer prepaid or capped billing for any new API key.
- Set a spend limit at roughly 1.5x your expected monthly cost (our rule of thumb, not a vendor figure).
- Create separate keys or projects per app so one runaway job is visible.
- Cache repeated prompts and use cheaper models for routine work.
- Review the invoice lines monthly; see AI invoice line items explained.
Estimate worst cases with the AI subscription cost calculator and the coding agent cost calculator.
Sources
Claude API billing, Anthropic rate limits and spend limits, OpenAI rate limits, GitHub budgets and alerts and GitHub usage-based billing (captures in docs/completion/captures-2026-12-01/).
How we check
All sources were read on 2026-12-01 (Asia/Colombo). Prices are USD list prices as printed and may exclude tax. This is desk research from official pages, not a hands-on test. Corrections: [email protected]. See /methodology/.
Related: When you hit an AI limit · Seat vs usage pricing