Why did my OpenAI or Claude API bill go up?
Short answer: most jumps come from sending more tokens than before (longer prompts, retries, agents that loop), from paying a higher rate for the same tokens (a pricier model, a faster tier, lost cache hits), or from new usage nobody announced. Your usage CSV shows which one it is.
More tokens than before
- Retries and loops. A failing call retried in a loop, or an agent that keeps calling tools, shows up as one day far above the rest. Look for a single spike and check request counts and logs for that date.
- Prompts that grew. Conversation history, retrieved documents or tool definitions added to every request raise input tokens across all days, not just one. Compare input tokens per request month over month.
- Longer answers. Output tokens usually cost several times more than input. On OpenAI, output prices include reasoning tokens, so a model that thinks longer costs more even when the visible answer is short (OpenAI pricing).
- New usage. A new feature, a new customer or a batch job that nobody mentioned. It shows as a step up that stays, often on one model or API key.
A higher rate for the same tokens
- Cache misses. Cached input costs a fraction of normal input. If a system prompt changes on every request, or the cache expires between calls, the same tokens get billed at the full rate. A falling cache share in the usage export is the sign.
- A different model. A config change can move traffic to a pricier model. A model name that was not in last month's file is the sign.
- A newer tokenizer. Anthropic notes that Claude 4.7 and later models produce about 30% more tokens for the same text (Anthropic pricing). After a model upgrade, token counts can rise even when traffic does not.
- A faster service tier. OpenAI's fast mode (formerly priority) costs about twice the standard rate on current models. Check the service tier column.
- Long context and regional processing. Some OpenAI models charge more above 272K input tokens, and US-only inference on recent Claude models costs 1.1 times the standard rate.
How to find which one it is
- Export last month's usage and cost CSV from the Claude Console or the OpenAI dashboard.
- Look at spend per day: one spike points to retries or a job, a step up that stays points to new usage or a model change.
- Look at spend per model: a new or pricier model points to a config change.
- Look at cache and batch share if the file has those columns.
The free checkup does these steps in your browser and never uploads the file. When a check needs a column your export does not have, it says so instead of guessing.
Questions
Why did my OpenAI API bill suddenly increase?
The most common causes are retries or agent loops (one spike day), longer prompts or answers (a gradual rise), a pricier model or faster tier, and lost prompt cache hits. The usage CSV shows which by day, model and token type.
Why did my Claude API costs go up after upgrading the model?
Anthropic notes that Claude 4.7 and later models use a newer tokenizer that produces about 30% more tokens for the same text, so token counts can rise even when traffic stays the same.
How can I see what caused an API cost spike?
Export the usage or cost CSV, find the day with the spike, see which model and token type grew, then check request counts and logs for that day.
List prices checked 27 September 2026 on the official Anthropic and OpenAI price pages. Prices change; check the source before making decisions. Not affiliated with Anthropic or OpenAI. © 2026 Valeriy Danilov. AI Spend Doctor by AgentBridge Labs.