Module 9 · Lesson 2 of 6
What really drives the bill
One extra call to the small model.
- One plain call
- $0.0105
- The real request
- $0.0376, 3.6 times as much
- Model calls per request
- 4
- Adds the most
- Extra agent steps
- A month at 10,000 requests a day
- $11,277
How it is worked out: each request has a 2,000-token prompt and a 300-token answer, at $3 in and $15 out per million tokens. An earlier turn is a 100-token question and its answer. Each agent step adds a 500-token tool result, and every step but the last writes a 50-token tool call.
What this simplifies. The token sizes and prices are round examples, not any provider's real figures. A refused call, such as a 429, is usually not billed, so only retries after the model has started count here. Cached prompt tokens, which many providers price lower, would cut the history and agent steps.
The price of one call is only the start. In a real feature, one user request often becomes several billed calls, and each can be larger than the last.
A chat resends the earlier turns with each new question, so the (Everything sent to a language model in one request: instructions, context and the question.) grows as the chat goes on. An (A model that calls tools in a loop, deciding each next step from the results, until it can answer.) calls the model once per step, and each step resends the tool results so far.
A retry after the model has started writing pays for those (A piece of text that a language model reads or writes, often part of a word. Prices and limits are counted in tokens.) again. A separate safety check on each answer is one more call.
In system design: Measure tokens per user request, not per call. Then limit each extra: trim old turns, cap agent steps, and retry only when it is worth paying again.