Skip to content

Budget surprises

What it looks like

The monthly bill comes in much higher than last month. Traffic is about the same. Nobody shipped a big feature. You open the usage page and it shows one large total that does not say which part of your app caused it.

Why it happens

You pay per token, and most providers bill input and output tokens separately, often at different rates. So cost grows whenever any of these grow:

Each change looks small on its own. Together they add up, and the bill only shows the total.

How to spot it

Fix checklist

  1. Log input and output tokens per request, tagged with feature, user and model.
  2. Set max output tokens on every call.
  3. Cap history and retrieved text to a fixed token budget.
  4. Use prompt caching where your provider supports it, keep the cached prefix stable, and check the cache hit rate.
  5. Set spend alerts and per-key limits in your provider's console.

Lasting fix

Related on Solaro sites

See where your tokens go before you send, then price it, in the Context planner

Next

Start with How to read your token bill, then Log tokens per request.

All failure modes