04 - Operate & Measure / LLM Cost Optimization

LLM Cost Optimization

An LLM cost and model optimization audit shows where the spend in a production system comes from. It then implements the changes that can lower it: prompt caching, model routing, prompt compression and retry rules. The report compares cost and quality test results before and after.

Fixed-price entry packageLLM Cost AuditEUR 4,2001 application · up to 3 weeks from scopingWhat is included
In short
01

Every euro attributed

Per feature, per segment, per model: the bill stops being one number nobody can explain.

02

Savings ranked by effort

Caching, routing, prompt compression, retry tuning, ordered by saving times effort.

03

Quality proven, not assumed

An eval run before and after shows the same or better quality at the lower cost.

23Minds runs LLM cost and model optimization audits for engineering teams whose LLM bill grows faster than traffic.

Show the full summary

The engagement instruments the system for per-call cost attribution, audits current usage, recommends and implements provider-side savings (prompt caching, smaller-model routing, prompt compression, retry tuning) and delivers a measured before/after with eval-protected quality. The size of the saving depends on the starting point; it is measured on your system, not promised up front. ISO 9001:2015 quality assurance backing.

Why 23Minds

What makes this service defensible.

  • Top three quick wins implemented in the package

    Not only recommended: applied in your code and measured.

  • Before and after in writing

    The audit report carries the measured saving with the method behind it.

  • Fixed price per application

    One LLM application, three weeks from scope approval.

  • Eval-protected

    No optimization ships without an evaluation run guarding the output quality.

How we work

The process, phase by phase.

  1. 1

    1. Cost instrumentation

    Instrument per-call cost attribution. Run for 1-2 weeks to capture a representative cost picture.

    Week 1-2
    A round meter mounted on a pipeline with its needle in yellow: the cost of every model call measured and attributed over one to two weeks.
  2. 2

    2. Audit + recommendations

    Analyze cost data. Identify top savings opportunities. Write recommendations with effort estimates.

    Week 2
    A bar chart of five bars, one of them shorter with a yellow arrow pointing down: the biggest saving opportunities picked out of the cost data and written up with the effort each one takes.
  3. 3

    3. Implementation

    Implement top wins. Set up eval-protected rollout: quality must hold before cost drop counts.

    Week 2-3
    A toggle switch between two boxes with a third, yellow box beneath it: caching and routing put in, with quality checked on the test set before the saving counts.
  4. 4

    4. Measurement + report

    Measure before/after over 2-4 weeks. Deliver audit report with documented savings.

    Week 3, up to 4 weeks after rollout in a project
    Two bars side by side, the right one shorter and yellow, with a report sheet behind them: cost before and after, measured the same way and documented.
Free tool · from our Operate practice

The same workload can cost very different amounts.

Move the sliders to estimate monthly inference spend for a typical AI feature across the major providers. The point isn't the exact number - it's the gap between the cheapest and the premium option: that gap is your optimization headroom.

  • Model selection per task, routed dynamically by call profile and stake level.
  • Caching and prompt size shift the bill as much as model choice does.
Optimization headroom at these settings~88%  ·  $3.7k/mo
Cheapest$480/moClaude Haiku 4.5
Premium$4.2k/moGPT-6 Astra
5,000
1,200 tok
40%

Estimated cost based on Anthropic's and OpenAI's public price lists as of 4 October 2026, excluding cache writes. Not an offer.

How to start

Pick the way in that fits your budget and timing.

Every practice has a free first step, an entry package with a written deliverable and its price listed here, and a full project or retainer quoted after a first call. Once the scope is agreed, the price is fixed, with no hidden costs.

  1. 1
    Step 1 · Free

    Intro call or self-assessment

    60 minutes · 1 engineer · no obligation

    Free
    Show details
    • Intro call with an engineer, or the online self-assessment
    • A written next step within one business day
    • No obligation and no sales deck
    Talk to an engineer
  2. Recommended
    2
    Step 2 · Fixed price

    LLM Cost Audit

    1 application · up to 3 weeks from scoping

    EUR 4,200 net

    Fixed price, no hidden costs; extras only from the Not included list.

    Show details
    • Cost attribution for one LLM application: per feature, segment, model
    • Recommendations ranked by saving times effort
    • Top three quick wins implemented
    • Written report with the measured effect
    • Not included: Implementing the full recommendation list, architecture rework, negotiating contracts with model providers, any guaranteed saving level.
    Ask for this package
  3. 3
    Step 3 · Project or retainer

    Full scope, quoted after a first call

    Full scope · phased delivery · quoted per phase

    from EUR 2,800 net per month, quoted after a first call
    Show details
    • Continuous cost optimization across the platform
    • Quality protected by evaluation
    • Monthly report with the measured saving
    Start the conversation
Sounds familiar?

The situations that bring teams to this service.

  • LLM spend grows faster than user traffic and nobody knows why
  • Prompt cache hit rate is low or not measured; every call pays full price
  • All features route to the most expensive model regardless of stakes
Show the other problems (1)
  • Retries on transient errors silently multiply the bill
Who it's for
  • Engineering teams whose monthly LLM bill grew past EUR 10k and keeps climbing
  • CFOs and finance partners asking why LLM spend exceeds plan
  • Product engineering leaders shipping AI features whose unit economics are upside-down
  • Mid-stage companies preparing for a funding round needing defensible AI cost numbers
Failure modes

Where this goes wrong, and what we do about it.

  1. 1. Saving tokens breaks the cache and raises the billWhat stays with you: cache hit rate before and after per prompt family, with the invoice line it maps to
    What happens

    A plugin or a prompt rewrite trims the context to save tokens. The trimmed prefix no longer matches, prompt caching stops hitting, and the same traffic now costs more than before the optimisation. The change looks like a saving in every metric except the invoice.

    What we do about it

    We measure the actual cache hit rate before touching anything, treat the stable prefix as a structure to protect rather than text to compress, and re-measure after each change so a regression is visible in the same week.

  2. 2. The cost is attributed to the model and driven by the behaviourWhat stays with you: spend broken down by cause rather than by model, with the top drivers ranked and one of them fixed
    What happens

    Teams negotiate price per token and compare providers, while the multiplier sits elsewhere: branching times retries times context growth. A documented case ran to tens of thousands of dollars on billions of missed input tokens in a single chain. Changing the model moves the unit price a little; the behaviour moves the total.

    What we do about it

    We break the spend down by what causes it - retries, branch depth, context growth per turn, per feature and per user segment - and fix the largest driver first, whether that is a routing rule, a retry policy or a product decision.

  3. 3. Caching is supported and nobody checked whether it hitsWhat stays with you: measured hit rate per layer, and budget limits with alerting at the level where spend is actually made
    What happens

    The provider documents prompt caching, so the team assumes it is working. Support is not the same as a hit. Without a measurement, a chain of middleware quietly rewrites the prefix on every call and the cache never engages, which shows up only as a bill that grows faster than usage.

    What we do about it

    We verify hits against the provider's own counters rather than the documentation, follow the request through every layer that can rewrite it, and set a hard spend ceiling so the next regression stops instead of accumulating.

What you get

Deliverables, not deliverable-shaped slides.

  • Cost attribution dashboard - per feature, per user segment, per model
  • Optimization recommendations ranked by saving × effort
  • Implementation of the top wins (caching, routing, prompt rework, retry policy)
  • Eval-protected quality measurement: same or better quality after optimization
  • Written audit report with measured before/after savings
FAQ

Questions procurement teams ask.

We compare model API spend for comparable tasks and load: the period after implementation against a baseline period before the audit, of the same length in the package and month on month in ongoing work. Traffic growth is excluded from the comparison, which needs baseline data on calls and costs. The result depends on the starting point: teams already using caching see less, teams that have never optimized see more. We do not promise a percentage up front.
We protect against this with eval pipelines. Every optimization is tested against a golden set; we only ship changes that hold or improve quality. Quality is the constraint, cost is the optimization target.
The audit shows which changes have the most potential in your application. The usual candidates are prompt caching, routing tasks to smaller models where tests confirm the quality, prompt compression (removing redundant context) and retry tuning (no silent retries where the error will repeat). The price lists separate the cost of reading from the cache and of writing to it: at Anthropic a cache read costs 0.1x the base input price, a five-minute cache write 1.25x and a one-hour write 2x the base input token price; OpenAI bills cached input on GPT-5.6 and newer models at 0.1x, with a 30-minute cache lifetime (checked 25 September 2026).
Both. Multi-provider clients often have routing logic that picks the cheapest qualified model per task - we optimize that routing as part of the engagement. Single-provider clients optimize within the provider's pricing surface.
The entry package for one application has a fixed price, listed on this page. A larger scope is quoted after the intro call, by the size of the workload. The payback is calculated in the audit report on your own numbers, not promised up front.
Uber's CTO told The Information in April 2026 that AI coding tools, mainly Claude Code, had used up the company's AI budget for the year within months, and in June 2026 Uber confirmed to Bloomberg that each AI coding tool is capped at USD 1,500 per employee per month. In August 2026 the CTO credited better prompt caching, a change of default model and cost visibility for engineers with bringing the cost per token down (Fortune). The example concerns coding tools. In an application built on a language model, the audit checks which features generate the cost, how the cache is used and whether the model fits the task.
Guides

Guides that lead to this service.

Talk to an engineer.

Describe where you are with LLM cost optimization. A reply within one business day.

Talk to an engineer
Szczecin - ul. Wawrzyniaka 6WWarszawaZielona GóraKraków