
Services
Cut your LLM bill without losing quality. Nine proven tactics — model routing, semantic caching, prompt compression, output caps, and more — ranked by effort versus payoff, with the order I actually use on client projects.

Most LLM bills are 40 to 70 percent waste. Not because the models are expensive, but because the application around them is sloppy: oversized models doing trivial work, no caching, prompts bloated with context nobody reads, retry loops quietly burning tokens at 3am. This is the field guide I use to reduce LLM costs on client projects — nine tactics, ordered the way I actually apply them, from the cheap wins you ship in an afternoon to the bigger bets that need real engineering.
In a demo, cost is invisible. You make a few calls, the bill is cents, and nobody thinks about it. In production the same architecture meets real traffic, and the waste compounds. Three things drive it. First, default-to-the-biggest-model habits: teams wire everything to their most capable model because it "just works," then pay frontier prices for tasks a small model would nail. Second, no caching: identical or near-identical requests hit the model fresh every time. Third, context bloat: every prompt drags along a giant system message, full chat history, and retrieved chunks the model barely uses — and you pay for every input token, every call.
The good news: because the waste is structural, the fixes are repeatable. Reducing LLM costs is far less about clever prompt tricks and far more about treating your LLM calls like any other expensive resource — measured, pooled, and right-sized.
You cannot cut what you cannot see. Before changing anything, instrument every LLM call with three numbers: input tokens, output tokens, and the model used, tagged by the feature or route that made the call. Aggregate that into a cost-per-request figure per route. Almost every team that does this for the first time finds the same thing — one or two routes account for the majority of spend, and they are usually the easiest to fix. If you are still choosing the model, the LLM API pricing comparison has current per-token rates for Claude, Gemini, Grok, and OpenAI.
This mirrors how you would approach observability for any agent. If you have not set up call-level tracing yet, that is step zero; the tactics below assume you can see where the money goes. Without measurement you are guessing, and optimization-by-guessing tends to break quality while saving little.
Here they are in the order I apply them — roughly cheapest-to-implement first.
The single biggest lever. Audit each route and ask: does this genuinely need a frontier model? Classification, extraction, short rewrites, and routing decisions are usually handled perfectly by a small or mid-tier model at a fraction of the price. Reserve your most capable model for genuinely hard reasoning.
Once you have right-sized statically, route dynamically. A cheap model handles the request first; only escalate to an expensive model when the task is hard or the cheap model is low-confidence. Done well, llm routing cuts cost 50 to 60 percent while keeping quality on the hard cases. I broke down the mechanics in the LLM routing guide.
Exact-match caching catches repeated identical prompts. Semantic caching goes further: it embeds incoming requests and returns a cached answer when a new query is close enough to a previous one. For support bots and FAQ-style workloads where users ask the same thing many ways, this alone can remove a large slice of calls.
Every token in the prompt is a token you pay for on every call. Trim the system message to what the model actually needs, drop redundant few-shot examples once the model is reliable, and summarize long chat history instead of replaying it verbatim. Prompt compression is unglamorous and consistently effective.
Output tokens often cost more per token than input. If a route does not need a 2,000-token essay, set a hard max and prompt for brevity. Uncapped generations are a quiet, steady leak.
For non-interactive work — nightly enrichment, bulk classification, report generation — use batch APIs where available. They trade latency for a real discount. Anything a user is not staring at in real time is a batch candidate.
Pasting an entire document into every prompt is expensive and often worse for accuracy. Retrieval pulls only the relevant chunks, shrinking input tokens dramatically. If you are paying to send the same long context repeatedly, a retrieval layer usually pays for itself fast.
For a high-volume, narrow task, fine-tuning a small open model can beat prompting a large one on both cost and latency. This is a bigger investment — data, training, hosting — so it belongs near the bottom of the list, after the cheap wins are banked.
Agents that loop without a hard step limit can call a model dozens of times on a single task. Set max iterations, add a budget ceiling per request, and fail closed. One unbounded loop in production can dwarf every saving above it.
Do not attempt all nine at once. Start where effort is low and payoff is high: right-sizing models, capping outputs, and killing retry loops are afternoon jobs with outsized returns. Routing and semantic caching are a few days of work for the biggest sustained savings. Fine-tuning and a RAG rebuild are projects — worth it at scale, overkill for a small workload. Re-measure after each change so you can prove the saving and catch any quality regression before it ships.
If your bill is climbing faster than your usage and you do not have the bandwidth to instrument, route, and cache properly, that is the point where outside help pays for itself in the first month. A focused cost pass — measurement, routing, caching, prompt trimming — routinely recovers more than its own cost. That is exactly what my LLM cost optimization engagement does, and you can see the mechanics applied end-to-end in this cost-optimization case study where I cut a support agent's bill 60 percent.
If part of the bill is document OCR, the unit is a page, not a token. The self-hosted OCR cost calculator compares an open OCR model on a rented GPU with Textract, Document AI, Azure, and Mistral OCR.
The same goes for embeddings and transcription, which are priced per token or per audio minute, and for moving a chat model onto your own GPUs. The embedding cost calculator, the speech-to-text cost calculator, and the LLM hosting cost calculator put the GPU bill next to the API price.
If you are still mapping out what your agents should do before worrying about their bill, the pillar on what AI agents are is the right starting point.
Right-size the model on your highest-traffic route. Most teams route everything to a frontier model out of habit; moving simple classification, extraction, and routing tasks to a smaller model is an afternoon of work and often the single biggest cut.
Not if you do it right. The cheap model handles easy requests and escalates hard or low-confidence ones to the strong model. Quality stays high on the cases that matter while the bulk of cheap requests cost a fraction. The key is a good escalation signal and an eval set to verify it.
It depends on how repetitive your traffic is. For support and FAQ-style workloads where users ask the same things many ways, semantic caching can remove a large share of calls. For highly unique requests the savings are smaller, so measure your cache-hit rate before committing.
Only after the cheap wins. Fine-tuning a small model for a high-volume, narrow task can beat a large model on cost and latency, but it adds data, training, and hosting work. Bank routing, caching, and prompt compression first, then consider fine-tuning where volume justifies it.
Reducing LLM costs is not about one clever trick — it is about treating model calls like the expensive resource they are. Measure cost-per-request, right-size your models, route dynamically, cache what repeats, trim what bloats, and put hard limits on loops. Apply the cheap wins first and you can usually cut 50 to 60 percent without users noticing anything except a faster, leaner product.
Want the cut without the trial and error? That is exactly what I do.
Free 30-minute call. We will find your biggest cost leaks and map the fastest path to a leaner bill — measurement, routing, caching, and prompt trimming.
Book a Scoping Call