An LLM bill is tokens × price, summed over every request. When it jumps, one of four things changed: which model, how many tokens go in, how many come out, or how many requests there are. The trick is to find out which before you start rewriting prompts.
1. Split the spend by model and line item
OpenAI's usage dashboard and its Costs API both break spend down by project and by line item, and the line
item names the model and whether it was input or output (for example, a model name followed by
input or output). Compare the jump day with a normal day:
- A new model name appears → someone switched models (or a default changed).
- Input grew, output didn't → prompts got longer: context, retrieved documents, chat history.
- Output grew → longer answers, or a reasoning model whose hidden reasoning is billed as output.
- Everything grew in proportion → more requests: traffic, retries, or a loop.
2. The usual suspects
A model swap
Prices between model tiers differ by an order of magnitude or more. A change in one config file, an SDK upgrade with a new default, or a teammate testing a bigger model in production is the most common single cause.
Context that only grows
Chat apps that resend the whole conversation pay for every earlier message again on every turn, so cost per conversation grows roughly with the square of its length. Trim or summarize history; cap retrieved chunks.
Agents and tool loops
An agent that calls tools until it's “done” can loop on an error, re-reading the same context each step. Put a hard cap on steps and on tokens per task, and log when it's hit.
Retries
Client retries on timeouts can double requests during a provider slowdown — and the slow request may still complete and be billed. Use idempotent jobs and back off.
Batch jobs and backfills
Re-embedding a whole corpus, re-running an eval suite, or a migration script that summarizes every row. Use the Batch API for anything that doesn't need an answer now.
A leaked key
Spend on a project or model you don't use, at hours you don't run, is a key on the internet. Rotate it, check your repo history and client bundles, and use per-project keys so the blast radius is small.
3. Prevent the next one
- Use separate projects (and keys) per app and environment, so spend splits cleanly.
- Set budget alerts and usage limits in your organization's billing settings.
- Log tokens in and out per request in your own app, next to the feature that made the call.
How Soracin helps
Paste an OpenAI admin key on Indie. Soracin reads only the costs endpoint, shows spend by model and day with a month-end estimate, and sends a daily alert when a day is at least 30% and $1 above its usual level — naming the models and line items that moved. Admin keys aren't read-only by construction; our trust page says exactly what we call with one.