
Key takeaways
- Log every call with tokens, cost, feature, team and customer.
- Measure unit cost, such as cost per resolved ticket.
- Use the smallest model that meets the quality bar, and route by task.
- Prompt caching, batch APIs and shorter outputs cut costs further.
- Re-test quality on an evaluation set after every change.
Why are AI and LLM costs hard to control?
Model APIs charge per token, usually at different prices for input and output tokens, and prices vary widely between models. A single product feature can call a model thousands of times a day, retries and long prompts multiply the bill, and usage grows with customers in ways budgets rarely anticipate. The FinOps Foundation's State of FinOps 2026 found that 98% of FinOps teams now manage AI spend, and that AI cost management is the skill they need most.
How do you track LLM costs?
- Log every call with the model, input tokens, output tokens, latency and cost, plus the feature, team and customer that triggered it.
- Use separate API keys or projects per product or environment, so provider dashboards can split spend.
- Measure unit cost: cost per resolved ticket, per document processed or per active customer, not just total spend.
- Set budgets and alerts per feature, and rate limits per customer, before usage scales.
- Track GPUs separately if you self-host models: utilization, idle hours and cost per thousand requests.
What are the biggest levers for cutting LLM costs?
| Lever | What to do | Watch out for |
|---|---|---|
| Model choice | Use the smallest model that meets your quality bar for each task; route easy requests to cheaper models | Test quality on a real evaluation set before switching |
| Prompt and context size | Trim system prompts, retrieve fewer and better chunks in RAG, summarize long histories | Cutting context too far lowers answer quality |
| Output length | Ask for concise or structured output and set a maximum output length | Output tokens are often priced higher than input tokens |
| Prompt caching | Use the provider's prompt caching for long, repeated prefixes such as instructions and documents | Cache rules and pricing differ by provider |
| Batch processing | Send non-urgent work through batch APIs, which providers typically offer at a discount | Results arrive later, not in real time |
| Response caching | Reuse answers to identical or near-identical requests | Stale answers if source data changes |
| Retries and loops | Cap agent steps and retries; stop runaway loops | Agents can call models many times per task |
How do you cut costs without hurting quality?
- Build an evaluation set of real examples with expected answers.
- Measure quality and cost per task on the current setup.
- Change one lever at a time (model, prompt, context, caching) and re-run the evaluation.
- Keep the change only if quality holds and unit cost drops.
- Repeat monthly; new models and prices appear constantly.
What should an AI cost report show?
- Spend by model, feature, team and customer, with the trend over time.
- Cost per unit of value (per ticket, document or conversation).
- Token mix: input, output and cached tokens.
- Anomalies: sudden jumps in calls, tokens per call or retries.
- GPU utilization and idle cost, if you run your own models.
Model prices change often; always check the current rates on each provider's pricing page before modeling savings.
Want this run for you? Our FinOps for AI service tracks token, GPU and cloud spend together and cuts it without lowering quality.
Frequently asked questions
Are output tokens more expensive than input tokens?
With most providers, yes. That is why limiting output length and asking for structured, concise answers is one of the simplest savings.
Is self-hosting an open-source model cheaper?
Sometimes, at high and steady volume. Include GPU cost, idle time and engineering effort, and compare cost per request, not just list prices.
What is prompt caching?
A provider feature that stores a long, repeated part of your prompt so later calls that reuse it are cheaper and faster.
Can you manage our AI spend alongside cloud costs?
Yes. Our FinOps service covers token, GPU and AI platform spend together with cloud infrastructure.
More questions? See all FAQs →
