
LLM token cost optimization is the practice of reducing what you pay for the tokens a language model processes by sending fewer tokens, paying less per token, or avoiding calls. Services that support it fall into five groups: provider caching and batch discounts, AI gateways, model routers, observability tools, and owned models.
Key Takeaways
- Provider prompt caching and batch processing lower the price of repeated input and deferrable work, but neither changes the per-token price of new input.
- Gateways and routers cut the cost of individual requests: in the RouteLLM research, routers reduced cost by more than 85 percent on MT Bench while still reaching 95 percent of GPT-4's performance.
- Observability and spend-management services show which workflow, team, or model drives the bill, while leaving the provider's pricing in place.
- Owned models are the only option that changes who sets the price: they replace provider calls for the workloads they cover with your own hosting cost.
What Is LLM Token Cost Optimization?
LLM token cost optimization is the practice of reducing what you pay for the tokens a language model processes, without lowering the quality of the work. Models read and write text in tokens, which are short chunks of words, and providers bill input tokens (what you send) and output tokens (what the model returns) at separate rates.
Spend is growing fast. Menlo Ventures estimated that companies spent $37 billion on generative AI in 2025, up from $11.5 billion in 2024, and Gartner forecasts $32.6 billion in worldwide spending on AI models in 2026, up from $15.5 billion in 2025.
The bill builds up in four places, and the services in this guide work on one or more of them:
- Resent context. Agents send history, instructions, retrieved documents, and tool definitions again on every step.
- Output length. Providers generally price output tokens above input tokens, so long responses cost more per token.
- Model choice. A premium model costs more per token than a smaller model for the same request.
- Retries and failed runs. Tokens spent on work that does not succeed still appear on the bill.
What Should You Look for in a Token-Reduction Service?
Score every token-reduction service on the same six criteria. Together they show which part of your bill a service changes, what it puts at risk, and what it leaves with your provider.
- What it changes. The part of the bill the service acts on: fewer tokens, a lower price per token, fewer calls, better visibility into spend, or a different party setting the price.
- Quality risk. Whether the service can change the answers your users get, and how you would test that before and after adopting it.
- Coverage. Which requests the service actually sees. A gateway, for example, governs only the traffic you route through it.
- Dependence on provider pricing. Whether your savings still depend on a provider's per-token price and terms after you adopt the service.
- Vendor status and hosting. Whether you host the service yourself or buy it as a managed product, and who owns and maintains it.
- Setup effort. What your team has to change in code, data, or process before the service starts saving money.
Do Provider Prompt Caching and Batch Discounts Reduce Token Spend?
Prompt caching lowers the price of repeated input, and batch processing lowers the price of work that can wait. As of October 2026, Anthropic and OpenAI both build prompt caching into their APIs, and Anthropic also offers batch processing at 50 percent less than standard calls.
Neither feature lowers the per-token price of new input or output. A prompt that starts differently on every call gets no caching discount, and savings depend on the hit rate, because a cached prefix expires if matching requests arrive too far apart.
Which Services Support LLM Token Cost Optimization?
Five services lower or show what you pay a provider, and one approach changes who sets the price. As of October 2026, each entry covers what the service is, why it works, and where it falls short.
LiteLLM
LiteLLM is an open-source AI gateway: software that sits between your applications and model providers. It applies budgets, routing, and fallbacks to every request that passes through it. You host it yourself, so your team deploys and operates the proxy and its database.
Portkey
Portkey is a hosted AI gateway, owned by Palo Alto Networks since May 2026. It adds caching, fallbacks, conditional routing, and budget limits to the requests you send through it. Tools that call providers directly sit outside its budgets.
OpenRouter
OpenRouter is a hosted API that sits in front of many model providers. It sends each request to the provider that best matches your price or speed priority, and its Auto Router can pick a model for each prompt. Routing works in research: the RouteLLM paper reports routers cutting cost by more than 85 percent on MT Bench while still reaching 95 percent of GPT-4's performance. The catch is quality, so you need to test a cheaper model on each task.
Helicone
Helicone is an open-source observability platform that logs requests through a proxy. It reports cost by user, session, and feature, so you can see which workflows drive spend. It doesn’t lower costs on its own, and it has been in maintenance mode since March 2026.
Ramp Token Spend Management
Ramp Token Spend Management is a hosted service for Ramp customers. It consolidates AI spend across Anthropic, OpenAI, and other providers by model and team, flags anomalies, and offers no engineering data export. It shows and allocates spend, but cutting it still falls to the engineers who control prompts, caching, and routing.
Build a Model You Own to Stop Depending on Provider Pricing
These five services can lower your bill, but each still pays the provider’s per-token price. If that price rises, the savings shrink.
Sara Hooker, Adaption’s co-founder and CEO, told the Financial Times in October 2026, as quoted in Adaption’s post on token spend: “There’s a clear understanding in the industry that tokens are not priced properly right now. Once the IPOs [of frontier labs like OpenAI and Anthropic] happen, there is going to be immediate pressure on those margins to be more sensible.”
The workaround is a model you own. A smaller open-weight model adapted to your routine, high-volume tasks runs on hosting you pay for, so your own hosting cost replaces the provider’s per-token price for those tasks.
Adaption is an AI company that builds continual learning systems, which let organizations train, customize, and own their AI. AutoScientist, Adaption’s system for automating the research loop behind model training, co-optimizes a model’s training data and training recipe against an outcome the team sets. You define the task, the training examples, and the pass mark, then host the model and test it on your own requests.
Smaller models can handle routine work when the harness around them is well built. In Adaption’s September 2026 research on the Harvey Legal Agent Benchmark, an optimized harness, meaning the tools, context management, execution loop, and delivery checks around a model, scored 84 percent with Qwen. That was within 0.79 percentage points of Prime Agent, with 54 percent fewer input tokens. Quality work, reduced cost.
For which workloads fit an owned model, how to build one, and AutoScientist’s measured results, see How to Reduce Your Company’s AI Token Spend.
How Do You Choose a Token-Reduction Service?
Choose based on your situation, and run the options in parallel instead of in sequence.
- Agents resend long, stable instructions on every call: start with provider prompt caching, which needs no new vendor.
- Work can wait up to 24 hours: use provider batch processing for jobs such as nightly summaries or evaluation runs.
- Many teams and providers need shared budgets and fallbacks: use an AI gateway such as LiteLLM or Portkey.
- Task difficulty varies, and a cheaper model passes your quality test on some tasks: use a model router such as OpenRouter.
- You cannot say which workflow drives the bill: use Helicone for engineering or Ramp Token Spend Management for finance.
- Routine, high-volume workflow: build an owned model with AutoScientist.
You do not have to exhaust the other options before starting an owned-model project. The usual gate is data preparation and training effort, and automated data and training tools address both.
Whichever service you choose, measure cost per completed task on your own requests. A cheaper path that fails more often can raise the total bill.
Author
Adaption TeamDate