How to Cut Your LLM API Bill by 80%: The Complete Cost-Optimization Playbook
Four concrete levers — prompt caching, batch processing, model routing, and context trimming — with real math showing how much each one saves.
Most teams discover their LLM bill is too high the same way: a Slack message with a screenshot of a usage dashboard nobody expected. The good news is that API costs are unusually easy to cut once you know where they're hiding, because — unlike most cloud spend — every dollar traces back to a token you chose to send or generate. This is a walkthrough of the four levers that move the needle most, roughly in order of effort-to-savings ratio.
Lever 1: Prompt caching (biggest win, least code)
If your application resends the same system prompt, tool definitions, or reference document on every call — and almost every production app does — you are paying full price to re-process text the model has already seen. Prompt caching lets a provider skip re-encoding a repeated prefix and bill the repeated portion at a steep discount, commonly 90% off the standard input rate, and 95% or more on some newer models (Anthropic's Opus 5.5 and Sonnet 5.5 read at 0.05× the input rate; DeepSeek's cache-hit rate is about 2-3% of its miss rate).
The mechanism differs slightly by provider (cache "reads" vs. cache "writes," time-to-live windows, minimum prefix length), but the shape of the saving is the same everywhere: the more your input consists of a stable, reused chunk, the more caching is worth doing. We cover the exact mechanics in Prompt Caching Explained.
Worked example. Say your input is 90% a fixed system prompt + retrieved context, and only 10% varies per request (the user's actual question). At an illustrative $3 per 1M input tokens with a 90% cache discount:
| Uncached | Cached | |
|---|---|---|
| 1,000 requests × 4,000 input tokens | 4M tokens @ $3/1M = $12.00 | 3.6M tokens @ $0.30/1M + 0.4M @ $3/1M = $2.28 |
That's an 81% cut on input cost alone, with zero change to your prompts or model choice — you're only restructuring how the request is assembled so the stable part comes first and stays byte-identical between calls.
Lever 2: Batch processing for anything that isn't real-time
If a workload doesn't need a response in the next second — nightly summarization, backfills, bulk classification, embedding generation — route it through a batch/async API instead of the synchronous endpoint. Batch processing commonly runs at ~50% off standard rates in exchange for turnaround measured in minutes to hours rather than milliseconds, though the exact rate (and whether it exists at all) varies by provider: OpenAI, Anthropic, Google, Mistral and Qwen publish 50%, Moonshot 40%, xAI only 20%, and DeepSeek none — see which providers actually discount batch, and by how much before assuming the 50% figure applies to yours.
The rule of thumb: if a human isn't staring at a loading spinner waiting for this specific call, it belongs in a batch queue. Splitting your workload into "live" (chat-facing) and "batch" (everything else) often reveals that a large share of your token volume is background work — in which case the batch discount applies to a big slice of the bill, not a small one. Measure your own split rather than assuming one.
Lever 3: Route by task difficulty, not by default
The most expensive mistake we see is sending every request — classification, extraction, formatting, simple Q&A — to the same premium model used for hard reasoning. Use the pricing table and compare tool to build a tiered routing table:
- Budget tier — classification, tagging, simple extraction, short-form rewriting. These tasks rarely need frontier reasoning.
- Standard tier — general chat, summarization, moderate coding.
- Premium tier — multi-step reasoning, hard coding tasks, anything where a wrong answer is expensive.
Because output tokens are priced several times higher than input tokens on almost every model (see Input vs Output Tokens), moving even simple output-heavy tasks off a premium model is often worth more than it looks. A budget model can be an order of magnitude or more cheaper per token than a frontier model (in our October 2026 data, a Budget-tier model like Claude Haiku 5.5 or GPT-6 Luna lists $0.10 per 1M input tokens against $2-10 for Standard and Premium models) — so correctly routing just 30% of a workload down a tier can cut total spend by far more than 30%.
Lever 4: Trim what you send, not just what you keep
Context windows keep growing, which tempts teams to stuff in "everything, just in case." But you pay for every input token whether the model needs it or not. Three concrete trims:
- Retrieve narrowly. In a RAG pipeline, fetch the top 3–5 chunks, not the top 20. Re-ranking a smaller, more relevant set beats dumping in bulk context.
- Summarize long conversation history instead of resending the full transcript on every turn once it exceeds a few thousand tokens.
- Strip boilerplate from tool outputs (raw API responses, HTML, logs) before feeding them back to the model — send the structured fields you need, not the whole payload.
Putting it together: a worked scenario
A support chatbot serving 5,000 monthly active users, 8 prompts/user/day, 1,500 input tokens and 500 output tokens per prompt, no caching, no batching, all on a Standard-tier model:
- Baseline — full price, no optimization: use the calculator with those numbers to see your baseline monthly figure.
- Add caching on the ~1,000-token fixed system prompt + tool definitions portion of every call → input cost drops roughly 60–70%.
- Route the ~20% of requests that are simple FAQ lookups to a Budget-tier model instead of Standard → another meaningful cut on that slice.
- Batch the nightly conversation-summarization job that used to run live → moves a chunk of output-heavy volume to half-price.
Stacked together, reductions of 60–85% are realistic for workloads with a lot of repeated context and background work, without touching quality on the requests that actually need a strong model; your result depends on your own mix. The order matters less than doing all four — caching and routing alone typically account for most of the win.
Checklist
- ☐ Is your system prompt/tool schema byte-identical across calls, so it's actually cacheable?
- ☐ Do you have any non-real-time workloads still hitting the synchronous endpoint (or, on DeepSeek, running at peak rates when they could run off-peak)?
- ☐ Have you audited what fraction of requests could run on a cheaper tier?
- ☐ Are you sending full documents when a targeted retrieval would do?
- ☐ Have you modeled the output token cost separately — it's usually the bigger number?
Once you've applied these, re-run your numbers on the calculator and compare providers directly on the compare page or find the outright lowest-cost option on cheapest models.
One lever deliberately isn't on this list: fine-tuning. It's a heavier, slower-payoff option than the four above — real training cost, iteration time, and (on some providers) an ongoing inference markup — and it only pays off for a narrow set of high-volume, repetitive tasks. See what fine-tuning actually costs, provider by provider before assuming it's the next step after these four.
What changed in this update
- Refreshed the caching, batch and routing numbers against current provider docs and our price data (October 24, 2026): deeper cache-read discounts on newer models, per-provider batch discounts (xAI is 20%, not 50%), and current Budget-tier price examples.
- The worked examples remain illustrative; the calculator uses live prices.
Try it with your workload
Set your tokens per request and requests per day once, and see what every model would cost you per month.