Prompt Caching Is the Only LLM Price That Matters for Agents

Cached input ranges from $0.003 to $1.00 per million tokens - a 333x spread. For a coding agent re-reading the same context 20 times, that number decides your bill, not the headline input price. Worked costs across 11 models.

Every LLM pricing comparison you've read compares input and output tokens. For a coding agent, both are close to irrelevant. The number that decides your bill is cached input - and it varies by more than 300× across providers.

DeepSeek charges $0.003 per million cached input tokens. OpenAI's gpt-6-astra charges $1.00 for the same thing. If your workload re-reads the same context over and over - which is exactly what an agent does - that ratio, not the headline input price, is your actual cost driver.

Why agents are a caching problem

A chatbot sends a short prompt and gets a short answer. An agent does something very different: it loads a codebase, a system prompt, and a tool schema, then loops. Read file, think, edit, run tests, read output, think again. Every turn re-sends the entire accumulated context.

Twenty turns against a 50,000-token context is a million input tokens - for one task. Almost all of it is identical to the turn before. That repetition is what prompt caching bills differently, and it's why two models with the same sticker price can differ 10× on the invoice.

Cached input prices, 2026

ModelInput /1MCached /1MOutput /1MCache discount
deepseek-flash$0.15$0.003$0.6050×
deepseek-v4-pro$0.66$0.022$1.9830×
Haiku 5.5$0.10$0.01$0.5010×
gpt-6-luna$0.10$0.01$0.5010×
Gemini 3 Flash$0.75$0.075$3.7510×
Sonnet 5.5$2.00$0.10$10.0020×
Opus 5.5$4.00$0.20$20.0020×
gpt-5.3-codex$1.75$0.175$14.0010×
grok-4.7$2.00$0.50$6.004×
Fable 5.1$10.00$0.25$50.0040×
gpt-6-astra$10.00$1.00$50.0010×
Prices as tracked on October 22, 2026. The live LLM API marketplace has current rates across all 8 providers.

The discount column is the one to read

Note how much the ratio varies independently of the sticker price. Anthropic discounts cached input 20-40×. OpenAI standardises on 10×. xAI only gives 4× - the shallowest on the board, which means grok's competitive $2.00 input price stops being competitive the moment your workload is cache-heavy.

Fable 5.1 is the clearest example of why this matters. At $10/1M input it looks like one of the most expensive models available. But its cached rate of $0.25 is a quarter of gpt-6-astra's $1.00 at the identical headline price. On an agent workload, the "expensive" model is four times cheaper on the dominant cost line.

Worked example: one agent task

A realistic coding task: 50k tokens of context, 20 turns, ~1k output tokens per turn. The first turn pays full input price; the rest hit cache.

ModelFirst turn19 cached turnsOutputTotal
deepseek-flash$0.0075$0.0029$0.012$0.022
Haiku 5.5$0.005$0.0095$0.010$0.025
Sonnet 5.5$0.100$0.095$0.200$0.395
gpt-5.3-codex$0.088$0.166$0.280$0.534
Opus 5.5$0.200$0.190$0.400$0.790
Fable 5.1$0.500$0.238$1.000$1.738
gpt-6-astra$0.500$0.950$1.000$2.450

Run that task a thousand times a month and the gap between deepseek-flash and gpt-6-astra is $22 versus $2,450. Same task, 110× the bill.

Look at the two $10-input models in that table, too. Fable 5.1 and gpt-6-astra have identical headline pricing, and Fable comes out $0.71 cheaper per task - entirely because of the cache rate.

Things that quietly break your cache

Cache discounts only apply on a hit. These are the usual ways to miss:

Bottom line

Costing out an AI feature?

Tell the Planner your workload shape and it picks the model, estimates the monthly spend, and compares providers on your actual token mix.

Estimate my AI costs →

Related: full LLM API pricing comparison for standard input/output rates, and the frontier model price war for how the top tier compares on capability.


← All posts
Share: X HN
✦
CloudMart AI Compute
Answers from live pricing data
✦
What are you building?
Compare providers, estimate costs, or get a recommendation - answers come from CloudMart's live dataset, never made-up prices.
Enter to send · Shift+Enter for a new line
Compare:
Report a problem