The usual suspects

  • Billing rules vary by provider and model. Units, rounding, and what counts as a billable token are not identical everywhere — check the specific model's documentation, not just the provider's general pricing page.
  • Output length can change. A more verbose answer costs more, and output is usually the more expensive side of the bill.
  • Chat history accumulates. Long multi-turn conversations re-send a growing history as input on every turn, so cost per conversation climbs as it gets longer — not because any one message got bigger.
  • System prompts may be resent on every call, multiplying a fixed cost across every single request your application makes.
  • RAG / knowledge-base context can grow input tokens, especially if content is retrieved fresh on every message instead of once per conversation.
  • Some models or providers bill reasoning or additional tokens that are not obvious from the visible final answer. This behavior varies by provider — check the documentation rather than assuming.
  • Non-English text can tokenize differently. Many languages, including Portuguese and Spanish, can need more tokens than English for the same meaning.
  • Pricing changes over time. Providers update prices, so a number you remember from months ago may no longer be current.

How to investigate an unexpected bill

  • Check your provider's usage dashboard first. It is the source of truth for what actually happened, broken down in ways a monthly total cannot show.
  • Look at input vs. output separately. A bill driven by output length has a different fix than one driven by input/history growth.
  • Re-verify current pricing on the provider's official page — do not rely on a remembered number.
  • Check whether history is being re-sent unbounded. This is one of the most common, and most fixable, causes of a bill that grows faster than usage did.

How to reduce the risk before launch

Planning tip

Estimate first. A Low / Likely / High range built from your real assumptions catches most surprises before they happen — try the calculator that matches your use case.

  • Set a budget or usage limit where your provider supports one.
  • Keep the system prompt lean — every token in it repeats on every call.
  • Bound conversation history with a sliding window of recent turns instead of resending everything indefinitely.
  • Match the model to the task — a capable mid-tier model is often enough, and can cost a fraction of a frontier model for the same workload.

Related reading