Skip to content

How to cut your LLM API bill

Four levers, ranked by how much they actually save. Switching vendor is not one of them.

By Fiqhro Dedhen4 min readEdited by Fiqhro Dedhen

Most advice here is "switch to a cheaper model", which is true and unhelpful. Here are the four levers that actually move an API bill, ranked by size, with the numbers as published on 17 July 2026.

1. Drop a tier — up to 45×

By far the biggest. The spread from frontier to floor is roughly 45× for the same workload. Nothing else on this page comes close.

The uncomfortable part is that this is a quality decision, not a config change. The right method is unglamorous: take twenty real examples from your workload, run them on the cheapest model, and look. Most production tasks — classification, extraction, routing, summarising — do not need a frontier model, and people discover this only when they try.

Start at the bottom and move up when it fails. Not the reverse.

2. Cache repeated input — about 90%

If you send the same system prompt or the same documents on every request — and most applications do — caching discounts that repeated portion by roughly 90%. Input at $5.00 per million tokens becomes $0.50.

But on some models, writing to the cache costs more than not caching — and nobody leads with that. It is vendor- and model-specific: OpenAI's gpt-5.5 and gpt-5.4 families publish no write charge at all, so there caching is free money. Where a premium does exist, it changes the decision. Anthropic's published rates for Opus 4.8:

Rate per MTokvs base input
Base input$5.00
5-minute cache write$6.25+25%
1-hour cache write$10.00+100%
Cache hit$0.50−90%

So a cache you write and never read is a 25% to 100% penalty. The question is how many times you read it back.

When caching starts paying

Work it through. For N requests sharing the same context, the cached path costs one write plus N−1 hits; the uncached path costs N × base:

  • 5-minute cache: $6.25 + $0.50 × (N−1) beats $5.00 × N once N ≥ 2.
  • 1-hour cache: $10.00 + $0.50 × (N−1) beats $5.00 × N once N ≥ 3.

That is the whole rule: the 5-minute cache pays from the first read-back, the 1-hour cache from the second. After that the savings run away — at 100 requests the cached path costs about a tenth of the uncached one.

The trap is not the arithmetic, it is the expiry. A 5-minute cache written once and read once every ten minutes never gets a hit and costs you 25% forever. Match the cache duration to your real traffic pattern, not your hopes.

Worth noting: cached audio is discounted far harder — around 99% rather than 90%. If you run voice, see our voice pricing breakdown.

3. Batch it — 50%

Both OpenAI and Anthropic price batch processing at exactly half the standard rate. A frontier model at $5.00/$30.00 standard becomes $2.50/$15.00 batched.

The trade is latency: you submit work and collect it later. So this is free money for anything that is not a person waiting — overnight enrichment, backfills, evaluation runs, bulk classification, report generation.

If a human is watching a cursor blink, batch is not for you. If not, halving the bill costs you nothing but patience.

4. Cap your output — the 5–6× multiplier

Output costs five to six times input on essentially every model at every tier — Anthropic at exactly 5×, OpenAI and Google at exactly 6×, with gpt-5.4-nano the lone outlier at 6.25×. It is the most expensive thing you buy, and the one most under your control.

  • Set max_tokens to something deliberate. The default is generous.
  • Ask for brevity in the prompt. A model told to answer in one paragraph does.
  • Ask for structured output where you can. JSON is terser than prose about JSON.
  • Beware reasoning tokens — they are billed as output, and chain-of-thought on a task that does not need it is pure cost.

The order to do this in

  1. Measure first. You cannot optimise a bill you have not read by model, endpoint and token type. Most people are surprised by which line dominates.
  2. Try the cheaper tier. Biggest lever, one afternoon.
  3. Cache anything repeated — checking your read pattern clears the break-even above.
  4. Batch anything nobody is waiting for.
  5. Cap output.

Notice what is not on this list: switching vendor. The frontier models are priced within about 2× of each other, and all three sell a cheap tier. Moving between them to save money, while leaving output uncapped and caching off, is solving the 2× problem and ignoring the 45× one.

What we addedThe cache break-even calculation — worked from Anthropic's published write premium and hit discount — showing 5-minute caching pays from the second read and 1-hour from the third. No vendor publishes this, and the write premium means naive caching can cost more.

This article was researched and drafted with AI assistance from the sources listed below, then checked and edited by Fiqhro Dedhen before publication. How we work.

Sources

3 cited · 3 primary

  1. 1
    PrimaryAnthropic (Claude Platform Docs)
    Pricing

    Source of the cache write premiums (5m and 1h), the cache hit rate and the 50% batch rate used in the break-even arithmetic. Read 17 July 2026.

    docs.claude.com · accessed 17 Jul 2026

  2. 2
    PrimaryOpenAI (Platform Docs)
    Pricing

    Source of the standard-vs-batch 50% split, cached input rates and the audio cache discount.

    platform.openai.com · accessed 17 Jul 2026

  3. 3
    PrimaryGoogle (Gemini API Docs)
    Gemini Developer API pricing

    Cross-reference for the output-to-input ratio and tier spread across a third vendor.

    ai.google.dev · accessed 17 Jul 2026

Primary sources are the company, paper or repository itself. Reporting is established press, used to corroborate. Community is used to find stories, never to establish facts.