Cutting your LLM bill comes down to nine levers, and two of them move the needle more than the rest. Model routing sends each request to a model that fits the task. Prompt caching stops you paying full price for context you reuse. Put those two in place and the rest of the list closes the gap.

# Tactic What it does When it pays off
1 Model routing and tiering Sends each request to the least expensive model that can answer it Most teams, immediately
2 Prompt caching Discounts repeated prefix context on every call Any agentic or RAG workload
3 Batch API Cuts token rates for work that can wait Async, offline, nightly jobs
4 Output limits Shrinks the most expensive tokens you buy Chat, generation, agent loops
5 Context and agent control Stops context and parallel agents from multiplying spend Multi-step agents, long sessions
6 Spend caps and budgets Blocks requests past a hard threshold Teams, keys, customers
7 Token budgeting Turns a fuzzy budget into a per-unit forecast Capacity planning
8 Cost attribution Gives every dollar an owner Growing multi-team orgs
9 Rate-change planning Forecasts on the durable rate, not the promo Budgets and forecasts

This guide walks through all nine, then shows the order to pull them in and the numbers to watch. The premise is one you already manage in cloud spend: the unit price falls, but your volume grows faster, so you control the bill at the layer that decides which tokens you buy and how often.

Why LLM spend keeps climbing

Token prices fall constantly, yet AI budgets grow. The explanation is volume. Stanford's 2025 AI Index reports the inference cost for a GPT-3.5-level system dropped more than 280-fold between late 2022 and late 2024. That is a dramatic unit-price decline. At the same time, Menlo Ventures' 2025 State of Generative AI report found the infrastructure layer captured 18 billion dollars in 2025, roughly double the prior year.

The gap between those two facts is consumption. Agentic workflows reason, loop, and chain calls, so each task burns far more tokens than a single prompt did a few years ago. The per-call price drops, but the number of calls climbs faster. Gartner predicts that by 2030 the inference cost for a one-trillion-parameter model will fall more than 90 percent below 2025 levels, and history says the volume will still outrun the drop.

That is why cost control is not a one-time cleanup. It is a set of operating habits applied at the infrastructure layer where every request flows. The nine tactics below compound, so the ones you stack on top of routing and caching each trim a little more off the same bill.

Tactic 1: Model routing and tiering

Not every request needs a frontier model. Classification, extraction, formatting, and routing decisions often run perfectly on a small model. The price gap between tiers is the single largest lever in the list. Exadel's framework notes the spread between the most capable and most economical Anthropic tiers can reach 60x on input price, and routing just 60 percent of requests to a less expensive tier delivers meaningful savings across millions of monthly calls.

The practical version is a three-tier ladder. An entry tier handles high-volume routine work. A mid tier covers general reasoning. A frontier tier is reserved for hard reasoning, open-ended architecture, and high-stakes outputs. Alexander Thamm's guide observes that in many workflows 80 to 90 percent of user prompts are basic enough for a small model to answer with high accuracy, which means the expensive model is doing most of the work by default and none of it needs to.

Two ways to route. The first is a rules-based classifier: a small model, or even a trained classifier, looks at the incoming prompt and assigns it to a tier. The second is routing by task type at the application layer, where your code already knows whether a request is a quick lookup or a long synthesis. Either approach keeps the frontier model available for the requests that genuinely need it.

Routing stacks directly with the cost model in our Claude Code cost breakdown, where the same pattern applies inside one vendor's model lineup. Keep the strong model for the work that demands it and the bill drops with almost no change in the output users see. Teams that run thousands of calls a day cannot assign tiers by hand, which is why automating the decision is the first move at scale. LLM auto-routing digs into how that decision gets made and how to measure any quality tradeoff.

Tactic 2: Prompt caching

The most expensive way to use an LLM is to resend the same context over and over and pay the full input price each time. Agentic workloads do exactly that: a long system prompt, retrieved documents, and tool schemas reload on every call while only a small slice of content changes. Prompt caching changes the economics.

Providers compute the attention representations for the prefix once, then reuse them on later requests that share that prefix. Cache reads run at roughly 10 percent of the standard input rate, and Exadel's framework notes a single cache hit breaks even within about five minutes of the write. That makes caching the highest-leverage fix for agentic and RAG workloads, with the least architectural change.

The PwC study that Exadel cites, run across OpenAI, Anthropic, and Google over 500 agent sessions with 10,000-token system prompts, reported API cost reductions between 41 and 80 percent and time-to-first-token improvements of 13 to 31 percent. The nuance matters as much as the headline. The study found that naive full-context caching could actually raise latency when dynamic tool results sat inside the cached prefix. The winning setup caches the stable system prompt and places dynamic content at the end of the prompt, where it does not invalidate the earlier cache blocks.

Design for cacheability. Put stable instructions first, keep variable content last, and monitor the cache hit rate. A silent miss re-bills that context at the full input price, roughly ten times the cached rate, and nothing tells you. Prompt caching and routing walks through keeping cache hits alive while routing between models.

Tactic 3: Batch API

Real-time calls are the premium tier of inference. For anything that does not need an answer in seconds, batch mode cuts the unit price. Most providers, OpenAI and Anthropic included, offer a batch tier for asynchronous work, and results come back in minutes or hours rather than instantly.

Alexander Thamm's guide prices the benefit on a concrete example. It cites the GPT-5.1 batch tier at roughly 62.5 cents per million input tokens and five dollars per million output tokens, against about double that for on-demand mode, and notes batch processing often cuts token costs by half. Model rates drift, so treat those as illustrative and check the vendor's current batch pricing, but the ratio holds: the batch tier is consistently a discount.

The pattern redirects whole classes of work. Nightly code analysis, bulk refactoring, document extraction from PDFs, dataset enrichment, and report generation all belong in the queue. Trigger a batch, then notify users when results are ready. The tradeoff you accept is latency, and for these workloads nobody notices the minutes.

Tactic 4: Output limits

Output tokens cost far more than input tokens on every model tier, and providers price output as the expensive line. The fastest way to waste that spend is to let responses run long when a short answer serves the purpose.

Two tools control this. The first is explicit instruction. Adding a line that says "respond in no more than two sentences" or "return only the JSON object with no explanation" changes the output the model produces for zero infrastructure cost. Alexander Thamm's guide recommends exactly this kind of instruction for tasks where short answers suffice.

The second is a formal cap on the maximum output tokens a request can generate, set at the API level or through a gateway. A cap bounds the worst case for each call and stops one runaway response from dominating a budget.

Research shows you can compress outputs without losing reasoning quality. The CROP method from Google and Purdue, published in April 2026 and covered by Exadel, added a cost penalty for verbose outputs during prompt optimization and cut output token consumption by 80.6 percent on GSM8K, LogiQA, and BIG-Bench Hard while keeping accuracy stable. The lesson transfers without the research machinery: for programmatic consumers, brevity instructions save real money.

Tactic 5: Context and parallel-agent control

Agentic workflows scale cost in a way single-prompt systems do not. Each step of a workflow triggers its own inference call, and each active agent keeps sending its full conversation on every request. The cost grows with the number of steps times the number of runs. Researchers at Exadel describe this as a rerun crisis: a deterministic workflow re-derives the same action sequence on every execution instead of reusing it.

Three controls contain it. Keep context small. Compact long sessions or start fresh when you do not need the history, so you stop re-sending stale tokens. Cap the number of parallel agents. Every live agent consumes tokens until it exits, so a burst of ten helpers multiplies the bill roughly tenfold. And for high-frequency deterministic workflows, consider compiling a reusable blueprint instead of re-reasoning each time, a pattern that cuts the token footprint of repeated paths sharply.

Context management also reaches into retrieval. Stuffing a whole knowledge base into the prompt is the most common source of input inflation. Alexander Thamm's guide recommends retrieval-augmented generation instead, injecting only the passages relevant to the current query, which keeps prompts short and accurate. The token savings usually cover the upfront cost of the vector setup once request frequency is high.

Tactic 6: Spend caps and budgets

Optimization reduces what you pay per useful call. Budgets stop you overpaying in total. The two are different controls, and you want both. A spend cap is a hard ceiling that blocks a request the moment it would exceed a threshold, as opposed to a report that tells you after the fact that you blew past it.

The useful shape is hierarchical. A shared monthly budget across a team, with individual caps per key or per developer on top, gives two layers of protection. The gateway pattern applies this cleanly: a team of ten can share one monthly budget while each individual key carries its own smaller cap. When any level exhausts its budget, the request is refused before it becomes a bill.

Caps constrain who can spend rather than how a model responds, so they protect cost without degrading quality. They also surface problems early. A key that repeatedly hits its cap is usually a sign of a runaway loop or a misconfigured integration, not a team that needs more money. AI cost governance covers the approval flows and alerting that make caps operational across a larger organization.

Tactic 7: Token budgeting

A dollar budget is hard to reason about in advance because tokens are what you actually consume. Token budgeting flips the forecast around: estimate how many input and output tokens each workload produces per run, multiply by the expected number of runs, and price the total at the model tier you plan to use. That gives you a defensible line item before the first invoice.

Alexander Thamm's guide frames the underlying metric set: total input plus output tokens per day and per month, the breakdown by model, feature, customer, or user, and the average input length versus output length. Those become the units you budget in and the units you check against weekly.

A worked shape keeps it concrete. Say a feature costs 200,000 input tokens and 40,000 output tokens per hundred requests on your chosen tier. Multiply by projected volume for the quarter, apply the tier rate, and you have a capacity number and a cost number that route directly into the budget. When volume drifts from the forecast, the gap shows up in the token count first, which is earlier than a monthly invoice.

Tactic 8: Cost attribution

Untracked token spend grows on its own. When nobody can answer which team, feature, or customer generated a charge, nobody is accountable for trimming it. Cost attribution gives every dollar an owner, and it turns the other tactics from advice into practice, because you can finally measure whether a change moved spend.

The measurement unit is cost per outcome rather than cost per API call in aggregate. Alexander Thamm's guide ties LLM cost directly to business KPIs: cost per resolved support ticket, per processed document, per sale closed with AI-assisted service, per generated article. Those ratios tell you whether the investment pays off, not just whether it went down.

For an implementation baseline, Exadel's framework suggests three metrics captured before and after each optimization: cost per 1,000 API calls pulled from the billing dashboard, a token efficiency ratio of useful output to total tokens processed, and latency, since caching improves cost and latency together. Measure weekly for at least four weeks so the signal clears the noise. For agentic workflows, track cost per workflow execution as the composite number that captures every optimization across a complete business process.

Attribution is the discipline that keeps the other eight alive. It is also the one that gets skipped first in fast-moving teams, which is exactly when the bill creeps. Our Claude Code cost calculator gives a copy-ready way to estimate your own bill and see where each lever lands.

Tactic 9: Rate-change planning

Token prices are not static. Promotional rates expire, new model versions ship with different rate cards, and a tier you budgeted at one price can trade at another next quarter. Rate-change planning is the habit of forecasting on the durable rate rather than the temporary one, so the budget does not break the month after a discount ends.

Two practices keep it honest. First, when a promotional rate exists, name the expiration date in the budget and re-forecast the period after it at the standard rate. Second, treat point-in-time model names and prices in any article, this one included, as snapshots. Check the provider's current pricing page before you commit a number to a contract, and re-check at the end of each quarter because the card changes.

Gartner expects inference prices to keep falling, which sounds like a relief. In practice it rewards teams that re-rate their workloads regularly, because the model that made sense at last quarter's price may no longer be the value pick at this quarter's. The teams that capture the decline re-forecast on a schedule instead of waiting for an invoice to surprise them.

The order that works

Run the tactics in an order that front-loads return and defers effort. Exadel's prioritization makes the sequence explicit.

Start with prompt caching. It needs the least architectural change, all major providers support it, and it delivers the largest single reduction for agentic workloads. Next, audit model routing. Identify the tasks on your top-tier model, test whether a smaller model passes, and route accordingly. Then compress outputs for programmatic consumers with brevity instructions. After those three, revisit architecture for the high-frequency workflows you identified, because that is the highest-effort, highest-reward step. Monitor continuously throughout, because new features, longer conversations, and drifting context windows erode optimizations that once worked.

The two levers from the short answer, routing and caching, are also the two you should switch on first. They are the lowest-effort, highest-return pair, and everything else in the list makes them last longer.

Frequently asked questions

What is the biggest driver of LLM cost? Total spend is the product of request volume, tokens per request, and price per token. Agentic workflows inflate tokens per request by chaining calls and loading large tool contexts, which is why consumption outruns falling unit prices.

Does prompt caching reduce answer quality? No, when you cache the right prefix. Caching changes the price you pay to reprocess context, not the content the model writes. The quality risk comes from caching too aggressively, so cache the stable system prompt and keep dynamic content out of the cached block.

Can I cut cost without changing application code? Much of the list operates at an infrastructure layer between your application and the providers. Routing rules, budgets, and cache configuration apply there once for every workload, so you adopt most of the controls without touching client code. Output limits and batch placement typically require a small change in how calls are made.

How much can I expect to save? The honest answer depends on your workload. The sources behind this guide report ranges: PwC's caching study saw 41 to 80 percent cost reduction, and Exadel reports 50 to 80 percent across its own delivery work. Treat those as evidence of what is possible rather than a guarantee, measure your own before-and-after with the attribution metrics above, and point to your provider's pricing page for the rates that drive your arithmetic.

Why did my bill go up when I changed nothing? Either a promotional rate expired, volume grew, or a model was swapped to a newer, differently priced version. Rate-change planning and token monitoring catch all three before the invoice does.

The takeaway

LLM cost control is nine habits, not one fix. Route each request to a model that fits, cache the context you reuse, batch the work that can wait, cap output, discipline your agents, set hard budgets, budget in tokens, attribute every dollar, and re-forecast on durable rates. None of them requires a heroic engineering effort on its own. Stacked together they keep a growing AI budget inside the number you planned.

The routing decision is the one worth automating at scale, and it is the thread that runs through the rest of the guide. Send each task to the model that fits it, put a cap on the spend, and the bill stops being a surprise. That is the difference between an AI line item you dread and one you can defend to finance.

Cut LLM spend without cutting quality

Route, cache, and govern AI traffic from one OpenAI-compatible platform.

Start Free → See Features