A rate card quotes a price per million tokens, but a workload is a count of how many times you pay it. Three products can sit on the same rate card — a chat box, a documentation assistant, an agent that takes ten steps per task — and cost 95 times different amounts to run. On gpt-6.2-sol, 100,000 tasks a month bill $1,000 for the chat, $2,820 for the documentation answers, and $95,100 for the agent loops.
The difference is not quality. It is how many times the same text is billed, and which line grows as a result. Chat spends on output, because an answer is longer than a question. Retrieval spends on input, because twelve documents arrive with every question. An agent spends on both, repeatedly, because every step re-sends the conversation it has built so far.
That repetition has a size. The reference agent below starts with 12,000 tokens of instructions, tool schemas and task, adds 6,900 tokens per step (a 6,000-token tool result plus 900 of its own action and reasoning), and stops after ten steps holding 74,100 tokens. It is billed for 430,500 input tokens — 5.8 times what it holds, and 8.3 times at fifteen steps.
At a glance
- Who this is for: teams running a chat product, a docs assistant, or an agent that makes more than one model call per task, choosing between a frontier model at $2/$10 and a cheap one at $0.10/$0.50.
- What it costs: per task on gpt-6.2-sol, $0.0100 for chat, $0.0282 for retrieval, $0.9510 for a ten-step agent — $1,000, $2,820 and $95,100 per 100,000 tasks a month.
- Where the ranking turns: a 10-step loop bills 5.8 times its final context; a cache read is worth 20 fresh tokens; retrieval beats a cached corpus only above 19 requests per five minutes; and one token past 100K or 272K reprices the whole request.
- The caveat: none of this covers retries, failed steps or tool fees, and the thresholds are checked per request rather than per task, so a loop can cross one mid-run with nothing on the invoice saying so.
No affiliate links in this post. The provider rates below are the subject of the article, not a sponsorship.
What a workload actually is
Every LLM workload reduces to three numbers: requests per task, tokens per request, and how much of the text was already sent in the previous request. Chat is one request with a short prompt. Retrieval is one request with a long prompt that differs every time. An agent loop is many requests whose prompt keeps growing and is mostly the same text as last time.
Those shapes produce three invoices on identical rates.
Table 1. One task, three shapes (US list, per 1M tokens)
| Workload | What one task sends | Billed input, tokens | Input's share of the bill | What the decision turns on |
|---|---|---|---|---|
| Chat | 1,500 in (400 system, 800 history, 300 question), 700 out | 1,500 | 30 percent | Output length, including the thinking nobody sees |
| Retrieval | 11,600 in (3,000 instructions, 12 chunks, 200 question), 500 out | 11,600 | 82 percent | How many chunks you retrieve, and whether they repeat |
| Agent loop | 12,000 start, 6,900 added per step, 10 steps, 900 out per step | 430,500 | 91 percent | The step count, and whether the prefix is cached |
A per-token rate answers a question nobody asked: what one request costs. The number that decides a budget is what one task costs, and the same $2.00 rate produces a one-cent task or a dollar task depending on how many times the text is billed. Output carries a second surprise: every provider bills reasoning as output — Google states it plainly, "output price (including thinking tokens)" — so a reply that shows 300 words and thinks 400 tokens bills 700.
Chat: the output line is the bill
The chat task bills $0.0030 of input and $0.0070 of output, so 70 percent of the invoice is what the model said. The ratio holds across the market: gpt-6-luna at $0.10/$0.50 costs $0.0005 for the same conversation, still 70 percent output. A cheaper model scales the bill down twentyfold and leaves the shape untouched.
So the lever is answer length, not model choice. Cut the answer from 700 tokens to 350 and the task falls from $0.0100 to $0.0065, a 35 percent saving no like-for-like model swap matches — $350 a month for a support bot answering 100,000 questions.
Chat has one failure mode that ruins the arithmetic, and it arrives slowly. Claude Haiku 5.5 charges $0.10 per million input tokens to a 100,000-token prompt and $0.50 above it, and a request over the line pays the higher price for all of its tokens, cache reads included. A 99,000-token conversation bills $0.0099 of input; a 100,001-token one bills $0.0500, five times as much for 1 percent more text. Long support threads reach that length without anyone noticing, because the context window is far larger than the threshold — and OpenAI's version of the same line, at 272,000 tokens, doubles input to $4.00. Truncate or fork the history at 90,000 and 245,000, or the cheapest model on the card becomes the most expensive one mid-thread.
RAG: the input line is the bill, and the cache prices it
The retrieval task bills $0.0232 of input against $0.0050 of output, so 82 percent is documents. Four more chunks at 700 tokens add $0.0056 — more than the answer itself. Retrieval quality and retrieval quantity are one budget question: an index that returns twelve good chunks instead of twenty mediocre ones is a cost decision as much as an accuracy one.
Caching the prompt does not fix it, since the chunks differ on every query. What can be cached is the other half of the design: the corpus itself.
The 20x rule
Cache reads are priced at a fraction of input, and the fraction is now standard: 5 percent on gpt-6.2-sol, Sonnet 5.5 and Gemini 4 Neon, 10 percent on gpt-6-luna, Haiku 5.5 and Gemini 3.8 Flash. At 5 percent, one cached token costs what 0.05 fresh tokens cost, so the exchange rate between a cached corpus and a retrieved excerpt is 20 to 1.
Read a 100,000-token corpus from cache and you pay what 5,000 fresh tokens cost. Send 11,600 tokens of retrieved chunks and you pay 2.3 times as much. On price alone, retrieval earns its place only when it cuts the prompt by more than 20 times — and most pipelines quote 8 to 15 and call it a win.
Nineteen requests per five minutes
The cache write is not free, and that decides the case. Anthropic's 5-minute write costs 1.25 times input, so a corpus served once per window is worse than retrieval. With a 100K corpus and 11,600 tokens of retrieved context at $2.00 input, cached stuffing and retrieval cost the same at 18.9 requests per five-minute window.
Below that line retrieval wins, and the gap widens fast: at one request per window, stuffed and cached costs $260 per 1,000 requests against $23.20, and at twelve it is $30.83. Gemini 4's implicit cache has no write fee, only a 5 percent read, so there the comparison is decided by hit rate — and Google promises nothing about the hit, describing the TTL as best-effort.
Two costs sit outside the token arithmetic: a vector store is a fixed monthly bill rather than a token bill (the index sizing is in the managed Postgres post), and rewriting a stale corpus invalidates every prefix built on it.
The agent loop: you pay for the prefix at every step
The arithmetic of the multiplier
An agent's context is monotonic: each step appends its output and the tool result, then sends the whole thing again. With a starting context of P and g tokens added per step over n steps, the task is billed nP + g·n(n−1)/2 tokens and ends holding P + g(n−1). The ratio is the loop multiplier. For 12,000 to start and 6,900 a step that is 430,500 billed against 74,100 held at step ten, 5.8 times. Half the bill comes from the growth term, which rises with the square of the step count: every added step costs more than the last.
Table 2. One agent task at different step counts (US list, gpt-6.2-sol and Sonnet 5.5)
| Steps | Billed input, tokens | Multiplier over final context | Cost per task, uncached | Cost per task, cached | What the decision turns on |
|---|---|---|---|---|---|
| 3 | 56,700 | 2.2x | $0.140 | $0.089 | Caching barely pays; keep tool output small |
| 6 | 175,500 | 3.8x | $0.405 | $0.177 | Cache the prefix or the loop is the bill |
| 9 | 356,400 | 5.3x | $0.794 | $0.272 | Cached reads are now most of the saving |
| 12 | 599,400 | 6.8x | $1.307 | $0.373 | Split the task: two short loops beat one long one |
Cache the prefix, not the prompt
Automatic caching is the one mechanism built for this shape. Anthropic's top-level cache_control, OpenAI's automatic prefix caching and Gemini's implicit cache all work the same way: unchanged text is read at the discount, and only the new increment is written at a premium. In a loop, each step reads the previous context at 5 percent and writes only what it added.
That collapses the multiplier. The reference agent's $0.9510 becomes $0.3049, because 356,400 of its 430,500 billed tokens are reads instead of fresh input. Across 100,000 tasks a month that is $30,489 instead of $95,100. The prompt-caching runbook covers lifetimes; the point here is narrower — in a loop nearly all of the discount is available, and in a single call almost none of it is.
The condition is byte stability. Reorder the tools, edit a schema description, stamp a date into the system prompt or re-summarize the history, and every step writes at 1.25 times with no read to offset it. Keep tool definitions append-only and disable unused ones with tool_choice: "none".
The step where the bill jumps
Growth is what pushes a loop across a threshold, and the crossing happens inside a task, where no monthly report can see it. A heavier research agent — 40,000 tokens of starting context, 30,000 per step — reaches 250,000 tokens at its eighth step and bills 1.16 million input tokens, $2.39 on gpt-6.2-sol. Its ninth step carries 280,000 tokens, past the 272,000 line, so all 280,000 bill at $4.00: that one step costs $1.12 where it would have cost $0.56, and the task closes at $3.53 instead of about $2.97.
That is the argument for capping tool output at the boundary. Anthropic's web fetch tool takes a max_content_tokens parameter for this reason; a fetched documentation page runs about 25,000 tokens, and three of them in one step move a task across a line nothing else in the system reports. Cutting a page to 8,000 costs little in answer quality and roughly halves the multiplier.
Three rate cards, three thresholds
Two models at $2/$10 are not the same price
gpt-6.2-sol and Claude Sonnet 5.5 both list $2.00 input and $10.00 output. Below 272,000 tokens they cost the same to the cent. Above it, Sol doubles input and raises output by half, while Sonnet holds its rate to its full million-token window. At 300,000 tokens per request, 1,000 requests cost $1,205 on Sol and $605 on Sonnet.
Table 3. 1,000 requests at three prompt lengths, 500 output tokens each (US list)
| Model | 50K prompt | 150K prompt | 300K prompt | What the decision turns on |
|---|---|---|---|---|
| Claude Haiku 5.5 | $5.25 | $75.25 | $150.25 | The 100K line: 2.9x the tokens is 14x the bill |
| gpt-6-luna | $5.25 | $15.25 | $60.25 | Doubles at 272K, still cheapest at every length |
| gpt-6.2-sol | $105.00 | $305.00 | $1,205.00 | Doubles at 272K: twice Sonnet's price above the line |
| Claude Sonnet 5.5 | $105.00 | $305.00 | $605.00 | Flat to 1M: the long-context choice at this tier |
The cheapest model is the one your workload does not push over a line
Haiku 5.5 and gpt-6-luna are both $0.10/$0.50, and below 100,000 tokens they cost the same to the cent. Above 100,000, Haiku bills five times luna, so the cheapest model in the market becomes the most expensive one in the cheap tier the moment a loop, a long chat or a stuffed corpus crosses a line neither the model nor the SDK mentions.
A second hidden multiplier sits in the same comparison. Anthropic's tokenizer changed with Claude 4.7: the same text produces roughly 30 percent more tokens than on 4.6 and earlier, which is more than most of the per-model gaps teams spend a week choosing between.
The lines no model rate covers
Tool calls are priced separately, and in an agent they are not small. Web search costs $10 per 1,000 searches at OpenAI and Anthropic, $14 at Google after 5,000 free a month — $0.01 to $0.014 a call. Twelve searches add $0.12 to $0.17, or 40 to 55 percent of that agent's cached token bill. A hosted container session is $0.03 per 20 minutes at 1 GB; file search is $2.50 per 1,000 calls plus $0.10 per GB-day.
Tool definitions are tokens too, paid on every request. Anthropic reports 286 input tokens for its tool-use system prompt on Sonnet 5.5 and Haiku 5.5, 325 more for the bash tool and about 4,500 for the computer-use toolset — 45,000 tokens of overhead in a ten-step loop before the task begins. Put both meters in one number: a task costs its tokens plus its tool calls. The tracing and evaluation bill on the same traffic is a third meter, covered in the sampling-rate post.
Seven things to check before the next invoice
- Measure billed input per task, not tokens per call: sum input tokens across one task's steps and divide by the final context. Above 3x you have a loop worth caching, above 6x one worth splitting.
- Make the prefix byte-stable: append tools, never reorder them, keep dates out of the system prompt, and send the conversation as it was rather than a re-summarized version.
- Watch writes against reads. If writes outnumber reads on a rolling day, the prefix is changing or the lifetime is wrong, and you pay 1.25 times for a discount you never collect.
- Cap tool output at the boundary —
max_content_tokenson fetches, pages truncated to 8,000 tokens — and log each request's context size so a crossing becomes visible. - Keep 10 percent of headroom under both cliffs: 90,000 tokens for Haiku 5.5, 245,000 for OpenAI's long-context line, cache reads included in the count.
- Count tool calls in dollars. Twelve searches are $0.12 to $0.17, and Google's 5,000 free a month are shared across all Gemini 3 and newer models.
- Compare at task level with the tokenizer in mind. A 30 percent token difference is larger than the per-model rate gaps most comparisons rest on, and the semantic-cache arithmetic shows the same effect one layer down.
Where the bill lands
Same rate card, three workloads: $1,000 for 100,000 chat tasks, $2,820 for retrieval, $95,100 for agent loops — $30,489 with a cached prefix, or $4,755 on gpt-6-luna. The cheapest fix is almost never a cheaper model. It is fewer billed tokens per task: a stable prefix, capped tool output, a truncated history, and a step count someone chose on purpose.
The free calculators are at vervebrief.com/p/free-ai-cloud-cost-calculators.html; the playbook collects the rate tables and spend-cap patterns, and the $39 master bundle adds the Excel model behind these numbers. The same bundle is on Payhip, and the short version arrives by email from signalsilicon.substack.com.
Related reading
- The Write Is a Bet: A Prompt Caching and Batch API Runbook for Late 2026 — cache lifetimes, write premiums and batch stacking on the same three providers.
- Managed Redis Cost: Upstash vs ElastiCache vs Self-Hosted — the hit-rate arithmetic that decides whether a semantic cache pays for itself.
- The Sampling Rate Decides the Bill: Agent Tracing and Evaluation Costs — the third meter on the same agent traffic.
Source notes
Prices checked: 2026-12-06. All rates are US list, standard tier, per million tokens unless noted. The model arithmetic is mine; the rates are the providers'.
- OpenAI, API pricing — gpt-6.2-sol, gpt-6-luna and gpt-6.2-astra standard, batch, flex and fast rates; short context at or below 272K input tokens and long context above it; cached input and 30-minute and 12-hour write columns; web search $10 per 1,000 calls plus search content tokens at model rates; containers $0.03 per 20-minute session at 1 GB; file search $2.50 per 1,000 calls and $0.10 per GB-day.
- OpenAI, Prompt caching — automatic prefix caching, cached input at 5 percent of input on gpt-6.2-sol and 10 percent on gpt-6-luna, four breakpoints, routing above 15 requests per minute.
- Anthropic, Pricing — Sonnet 5.5 at $2/$10 with cache hits at 0.05x and writes at 1.25x and 2x; Haiku 5.5 at $0.10/$0.50 to 100,000 tokens and $0.50/$2.50 above, with cache hits at $0.01 and $0.05; long-context pricing flat to 1M tokens for Claude 4.6 and later except Haiku 5.5; web search $10 per 1,000; tool-use system prompt 286 tokens; bash tool 325 additional tokens; computer-use toolset about 4,500 tokens; Claude 4.7 and later tokenizer producing about 30 percent more tokens.
- Anthropic, Prompt caching — automatic caching with one top-level
cache_control, 5-minute and 1-hour writes, free refresh on read. - Anthropic, Context windows and Batch processing — 1M-token window at standard pricing and the 50 percent batch discount.
- Google, Gemini Developer API pricing — Gemini 4 Carbon $4/$20, Neon $3/$15 and Hydrogen $1.50/$7.50, each with a unified 1M-token window and implicit-only caching at 5 percent; Gemini 3.8 Flash $0.75/$3.75 through 2026-12-31 and $1.50/$7.50 from 2027-01-01, with explicit cache storage at $0.50 per million tokens per hour; grounding with Google Search at $14 per 1,000 requests after 5,000 free a month; batch at 50 percent.
- Google, Context caching — implicit caching by default from Gemini 2.5, best-effort TTL, explicit caches only on Gemini 3 and 2.5.
- OpenAI, Web search tool — search content tokens billed at model rates alongside the $10 per 1,000 calls.
Cross-posted from Signal & Silicon, where the post carries its source notes and every rate table. Prices checked 2026-12-06.
More on the same arithmetic: free AI and cloud cost calculators · the playbook · the $39 master bundle · Signal & Silicon on Substack.


