LIVE · Thursday 3 December

Best Tools to Reduce LLM API Costs in 2026, by Workload: What Each Saves at List Prices

Which cost tool to adopt depends on how often your prompts repeat, how much work can wait and how many requests are simple. A guide to the options by situation, with the arithmetic.

By Thomas9 min read

The best tools to reduce LLM API costs in 2026 depend on your workload. For real-time chat with a long repeated system prompt, use provider prompt caching, which bills cached tokens at 5 to 10% of the input price on current Claude and OpenAI models, then route simple requests to a cheaper model through a gateway such as LiteLLM, Portkey, Helicone or Bifrost. For work that can wait, use the OpenAI or Anthropic batch API at 50% off. For prompts full of retrieved documents, test compression with Microsoft's LLMLingua; for one narrow task at high volume, evaluate a small model trained on your own traffic.

No published study has measured all of these on the same workloads, and the 60 to 90% savings figures common in vendor lists rarely say what traffic produced them. This guide takes each situation in turn, explains which tool fits and why, and works out the cost at the providers' list prices so you can substitute your own numbers.

First, describe your traffic

Three numbers decide which tools pay. The first is the share of each prompt that repeats across requests: system instructions, tool definitions, policy documents. Caching discounts only that part. The second is the share of requests that can wait minutes or hours for an answer, which is what batch discounts apply to. The third is the share of requests simple enough for a much cheaper model, which is what routing and specialised models exploit. Most products have several features with different profiles, so work these out per feature. A gateway or observability tool that logs cost per request makes this easy; Helicone, for example, tracks cost and latency and has a free tier of 10,000 requests a month. Anthropic's console also reports the share of input tokens read from cache, the number that tells you whether caching is working.

If you run real-time chat with a long system prompt

Prompt caching is the first tool here, because a support bot or assistant resends the same long preamble on every turn. The provider stores the processed prefix and charges far less to read it again.

Anthropic requires you to opt in by adding a cache_control field. Its pricing page sets cache reads at 0.05 times the input price on Claude Opus 5.5 and Sonnet 5.5 and 0.1 times on most other models; a write costs 1.25 times input for the default five-minute cache, which is refreshed free each time it is used. OpenAI's caching guide says caching "is enabled by default" on supported models. On GPT-5.6 and later, reads cost 0.1 times input and writes 1.25 times for the default 30-minute lifetime; earlier OpenAI models charge nothing for writes. At either provider's default lifetime, a cached prefix pays back after a single reuse; the longer lifetimes (one hour at Anthropic, 12 hours at OpenAI) cost more to write and need two.

Once caching is on, routing is the next lever. Prices between models in the same family differ by far more than any discount: Claude Haiku 5.5 lists at $0.10 per million input tokens for prompts up to 100,000 tokens, against $2 for Sonnet 5.5, and gpt-5.6-luna at $0.20 against $2.00 for gpt-5.6-terra. A gateway can send each request to the cheapest model that can handle it. LMSYS's open-source RouteLLM reports routers that "reduce costs by up to 85% while maintaining 95% GPT-4 performance" on MT Bench, with the caveat that savings depend on your query mix.

Semantic caching, where a gateway returns a stored answer to a question phrased differently, is tempting for chat but needs care. LiteLLM's documentation says it suits single-shot prompts and "goes badly wrong on agentic traffic". Portkey offers it only on "select Enterprise plans", and only for requests under 8,191 tokens with four or fewer messages.

If much of your work can wait

Batch processing is the simplest discount available: send requests as a file, collect results later, pay half. Both OpenAI and Anthropic charge 50% of standard prices and work to a 24-hour window, and Anthropic says most batches finish within an hour. Evaluations, classification, extraction, backfills and nightly summaries all qualify.

Batch size limits differ. Anthropic's documentation says a batch "is limited to either 100,000 Message requests or 256 MB in size, whichever is reached first", and its rate-limits page lists the same 100,000 cap at every standard tier. OpenAI allows 50,000 requests and 200 MB per batch.

Caching can stack with batch. Anthropic says so explicitly: its cache multipliers "stack with other pricing modifiers, including the Batch API discount", though cache hits inside a batch are best-effort, with typical hit rates of 30 to 98% depending on traffic. Its docs suggest the one-hour cache for batches. OpenAI's price list shows batch cached-input rates for most models, though its batch guide doesn't mention caching. OpenAI's Flex tier, which charges batch rates for ordinary synchronous calls in exchange for slower service and occasional uncharged "Resource Unavailable" errors, is documented as adding caching discounts on top; it is in beta with limited model availability. Anthropic's pricing page doesn't mention an equivalent of Flex.

If your prompts are mostly retrieved documents

RAG features are where caching helps least, because the retrieved passages differ from request to request and only the short system prompt repeats. The lever for those changing tokens is prompt compression. Microsoft's open-source LLMLingua claims "up to 20x compression with minimal performance loss", and its LongLLMLingua paper reports RAG performance improving "by up to 21.4% using only 1/4 of the tokens" on the authors' benchmarks.

The arithmetic shows why compression belongs here and not on cached text. Take a RAG feature on Sonnet 5.5 with a 1,000-token cached system prompt, 20,000 retrieved tokens and 500 output tokens per request. At list prices, 1,000 requests cost about $45.10, and $40 of that is the retrieved text. Compressing it to a quarter cuts the bill to about $15.10, before the cost of running the compressor. Compressing an already cached 6,000-token prompt would save at most $0.57 per 1,000 requests, because those tokens already bill at the cache-read rate. Test quality on your own documents before relying on the published results.

If spend is spread across teams and providers

Here the gateway's job is control as much as routing. The four covered here differ mainly in licence and cache type. LiteLLM is MIT-licensed and offers several routing strategies, including cost-based, plus dollar budgets per provider per day or month, with over-budget providers skipped. Portkey's open-source gateway is MIT-licensed, with load balancing and fallbacks; exact-match caching is on all plans, semantic caching on select Enterprise plans. Helicone is Apache-2.0, combines observability with routing and fallbacks, and its caching documentation describes exact matching only, set with a request header. Bifrost, made by Maxim AI and licensed Apache 2.0, offers semantic caching and budgets per virtual key, team or customer.

Latency claims come from the vendors themselves: Bifrost reports 11 microseconds of overhead at 5,000 requests per second, and Portkey says "<1ms". No one has published a comparison of the four on the same traffic covering routing savings, cache hit rate, added latency and setup effort, so choose on licence, hosting and the features your traffic needs.

If one narrow task dominates your volume

When most of your spend is a single well-defined task, such as classifying tickets or extracting fields, a small model trained on that task can replace a large general model outright rather than deferring to it request by request. The 2024 LoRA Land technical report fine-tuned 310 models across 31 tasks and found the 4-bit LoRA fine-tunes beat GPT-4 by 10 points on average. The costs are data collection, evaluation and training time.

Parsec, a small-language-model lab, offers this as a service, post-training models on a customer's traffic and routing each turn between models. Its comparison page claims 60% savings on real workloads, without defining the workload or baseline, and a first post-trained model in about four weeks; it does not publish prices. No study has compared a specialised small model with per-request routing on the same workload for cost per 1,000 requests, quality, latency and payback time, so treat this as an option to evaluate on your own traffic.

The options side by side

Tool Fits List-price effect Watch for
Prompt caching (OpenAI, Anthropic) Long repeated prefixes Reads at 5 to 10% of input Writes cost 1.25x input or more
Batch API (OpenAI, Anthropic) Work that can wait 24 hours 50% off 50,000 (OpenAI) or 100,000 (Anthropic) requests per batch
OpenAI Flex Synchronous calls that tolerate delay Batch rates Beta; timeouts, uncharged 429 errors
Gateway routing (LiteLLM, Portkey, Helicone, Bifrost) Many simple requests Cheaper model's price Quality on your evaluation set
Compression (LLMLingua) Long retrieved context Fewer input tokens Little gain on cached text
Specialised small model One narrow, high-volume task Small-model pricing Weeks of data and training

A worked example: stacking the levers

Stacked discounts multiply rather than add, and levers that act on the same tokens overlap. Consider a real-time support chat on Claude Sonnet 5.5. The assumptions: each request carries a 6,000-token shared prefix, 1,000 fresh input tokens and 400 output tokens; 95% of prefixes are read from the five-minute cache and 5% written; and in the routing case, 60% of requests go to Haiku 5.5 with the same cache behaviour. All figures are per 1,000 requests at Anthropic's list prices.

Setup Cost per 1,000 requests Change from start
Sonnet 5.5, no caching $18.00 Starting point
Sonnet 5.5 with caching $7.32 59% lower
Caching plus 60% routed to Haiku 5.5 $3.16 82% lower

The figures break down simply. Without caching, input costs $14.00 (7 million tokens at $2) and output $4.00. With caching, 5.7 million tokens read from cache cost $0.57, 0.3 million written cost $0.75, fresh input $2.00 and output $4.00. Routing 60% to Haiku 5.5, at $0.10 input, $0.01 cache read, $0.125 cache write and $0.50 output per million, cuts the routed share to about $0.24, while the remaining Sonnet share costs about $2.93. In practice, splitting traffic gives each model its own cache and more writes, so the routed figure is a floor. Batch adds nothing here because the traffic is real-time, and compression adds little because most input is already cached.

The overnight case looks different. An extraction job on gpt-5.6-terra with a 2,000-token shared prefix, 1,500 document tokens and 100 output tokens per request costs $8.20 per 1,000 requests at Standard rates, $4.10 through batch, and $2.53 with batch and a 90% cache hit rate, using OpenAI's listed batch rates of $1.00 input, $0.10 cached input, $1.25 for a 30-minute write and $6.00 output per million. If gpt-5.6-luna handled the task well enough, the same job would cost about $0.25.

These are calculations from list prices under stated assumptions, not measurements of real traffic.

Bottom line

For real-time chat with long system prompts, turn on prompt caching first and then route simple requests to a cheaper model through a gateway. For evaluations, extraction and other work that can wait, use the batch API, adding caching on Anthropic where it is documented to stack, or OpenAI Flex for synchronous calls that can tolerate retries. For RAG over long documents, test compression on the retrieved text. For spend spread across teams, pick a gateway for budgets and cost tracking on licence and hosting grounds. For a single narrow task at high volume, compare a specialised small model with routing on your own traffic before committing. In every case, record cost per request and cache hit rate before and after each change.

Sources

More in Products

All Products →