People assume they are paying for what the model writes. Most of a bill is what you send, and the patterns that inflate it are predictable enough to check for directly.
Why does input dominate?
Because it is usually much larger. A request including a document, a conversation history and a system prompt might send several thousand tokens to receive a few hundred, and the ratio is frequently ten to one or worse.
Output is priced higher per token and there is far less of it.
What are the main drivers?
- Conversation history. Resent in full with every message.
- Long system prompts. Sent with every single request.
- Documents attached repeatedly. Rather than once.
- The flagship model on simple tasks. Where a cheaper one would do.
- Retries. Which pay for the failed attempt as well.
- Agentic loops. Which read a great deal per step.
Which is the biggest surprise?
The system prompt. A carefully constructed two-thousand-token instruction is sent with every request, so an application handling ten thousand requests a day is paying for twenty million tokens of instructions before any user input.
Trimming it is frequently the single largest saving available.
What is caching?
A feature most providers now offer where repeated content is charged at a reduced rate. It suits exactly the system prompt case: content that is identical across many requests can be cached and billed considerably more cheaply.
It requires structuring requests so the stable part comes first, which is a small change with a large effect on cost.
How do you reduce spend?
Use the smaller model wherever the task is routine. Trim the system prompt. Do not resend documents that have not changed. Limit conversation history to what is actually needed rather than everything.
Those four cover most of what is available, and the first is usually the biggest.
What about batch processing?
Worth knowing about for anything not urgent. Providers offer a substantially reduced rate for requests processed within a window rather than immediately, which suits overnight jobs and bulk work.
Streaming responses changes nothing about cost, which surprises people, since you are charged for the tokens produced regardless of how they were delivered.
What produces the alarming bills?
Loops without limits, and agentic tasks left running. A recursive process, a retry with no ceiling, or an agent working through a large codebase can consume a great deal in a short time, and none of it is visible until the dashboard updates.
Attributing spend by feature rather than in aggregate is what makes optimisation possible, since a single total tells you the bill and nothing about which part of the product produced it.
What should you measure?
Cost per request or per user, not total spend. A total tells you nothing about whether the pattern is sustainable; a per-unit figure tells you what happens when usage doubles.
How do the model prices compare?
The spread is wide, frequently an order of magnitude between a provider's smallest model and its flagship. That gap is the largest single lever available and it is the one least often used.
The practical approach is to route by difficulty rather than defaulting to the best model. Classification, extraction, formatting and routine summarising rarely need the expensive one, and reserving it for the requests that genuinely require reasoning is how well-run applications keep costs sensible without any loss of quality.
What is the first thing to check?
Which model you are calling. A surprising number of applications use the most expensive model for tasks a cheaper one handles identically, and changing one line frequently reduces a bill by most of it.