Module 9 · Lesson 2 of 6

What really drives the bill

5

Each new question resends the earlier ones and their answers.

3

1 means one plain call. Each extra step is one more model call.

5%

One extra call to the small model.

  • One call: the prompt and the answer$0.0105
  • Earlier chat turns, sent again$0.0024
  • Extra agent steps$0.0228
  • Retries that pay again$0.0018
  • A safety check on each answer$0.0001
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 grows as the chat goes on. An 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 again. A separate safety check on each answer is one more call.

Example. With the calculator above at its starting values, one request costs about $0.038 instead of $0.0105: 3.6 times one plain call. The extra agent steps add the most.

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.

Check yourself

An agent takes 3 steps to answer one request. Why can it cost more than 3 times one plain call?