How to cut LLM costs
Most LLM spend comes from a few jobs your app runs over and over. Trimming, caching, and batching shave a share off each of those calls. Moving a high-volume job to a small model trained on it changes the price of the call itself.
The short answer
- Break spend down by job. Not by model or by team: by the question your app asks.
- Trim, cache, and batch. Shorter prompts, cached prefixes, and slower lanes for work that can wait.
- Route the easy calls. Send them to a cheaper model when you can tell them apart.
- Replace the biggest job. A small model trained on it costs a fraction per call. Sous’s example models cost 8.5 and 6.2 times less.
Where the money goes
The cost of a job is its number of calls times the tokens in each call times the price of those tokens. A job that runs a million times a month with a long prompt can cost more than everything else combined. So the first step is a table: each job, its calls per month, its average input and output tokens, and the model it uses.
The levers, from quickest to biggest
| Lever | How it saves | Good for | Watch out for |
|---|---|---|---|
| Trim prompts and cap outputs | Fewer tokens per call | Every job | Cutting context the model needs |
| Prompt caching | A lower rate on repeated prompt prefixes | Long, stable instructions or documents | Only exact prefix matches count |
| Batch and flex processing | Lower prices for slower turnaround | Back-office and offline jobs | Not for calls a user is waiting on |
| Routing | A cheaper model for easy calls | Mixed traffic | You need a reliable way to tell easy calls from hard ones |
| A small model trained on the job | A far lower price per token, and usually faster answers | High-volume jobs with an answer that has a shape | It needs examples and a test on calls it never saw |
OpenAI, for example, charges a lower cached-input rate on reused prompt prefixes, discounted by up to 95% depending on the model, and lists lower Batch and Flex prices for work that can wait. Check your provider’s current rates.
Why a small model saves the most
The other levers lower the cost of a frontier model’s tokens. A small model changes which tokens you pay for. On Sous, a trained model costs from $0.05 per million input tokens and $0.40 per million output tokens at 2B, and $0.10 and $0.80 at 4B. Here are two jobs as the Sous trainer logged them:
| Job | Cheaper than the frontier model | Same answer as the frontier model | Learned from |
|---|---|---|---|
| PII redactor | 8.5× | 84% | 128 calls from an app |
| Support ticket router | 6.2× | 92% | 300 past tickets |
It works best on jobs with an answer that has a shape: a label from a list, yes or no, fields, a score. See SLM vs LLM for where a small model fits, and estimate your savings with the calculator on the pricing page.
Cut costs without losing answers
- Keep a test set. Hold back real calls, about 20% of them, and score every change on them.
- Change one lever at a time. So you know which one moved quality.
- Switch only on a match. Move a job to a cheaper setup when it gives the answers you want on calls it never saw.
- Keep watching. Inputs drift. Rescore after you switch, and retrain when the job changes.
Sous does this for a job automatically: it keeps your current model’s answers, trains up to 4 small models, and switches your app only when one matches.
Questions people ask
What is LLM cost optimization?
Cutting what you spend on model calls without losing the answers you need: fewer tokens, cheaper tokens, or a cheaper model for the job.
What is the fastest way to cut LLM costs?
Measure spend by job, then trim the prompt and turn on caching for the biggest one. For the largest savings on a high-volume job, train a small model on it.
Does a smaller model hurt quality?
On broad, open-ended work, usually. On one narrow job, a small model trained on your calls can give the same answers most of the time: Sous’s example models matched the frontier model on 84% and 92% of calls they never saw. Measure before you switch.
How much can a small model save?
In Sous’s example runs, 8.5 and 6.2 times less per call than the frontier models they learned from.
Does prompt caching work on every request?
Only when requests share an exact prefix. Put stable instructions and documents first and the parts that change last.