Skip to content

LLM Cost Optimization

Keep the AI feature. Lose the token bill.

Cost per feature measured, then cut.

Blurred abstract image of a microchip with heatmap colors highlighting technological innovation

In plain English

I measure what each AI feature in your product costs per use, then cut it with caching, cheaper models where they do the job, batching and shorter prompts, without making the answers worse.

The technical version: Token spend usually grows from a few causes: the same long context re-sent on every call, the most expensive model used for work a smaller one does equally well, requests made one at a time that could be batched, prompts that grew by accretion, and retries nobody counts. The fixes are prompt caching, model routing by task, batch processing for anything not interactive, trimming context, and per-feature budgets with alerts. Each change is checked against an evaluation set first, so cheaper never quietly means worse.

  1. 01

    Measure

    cost per feature, per call

  2. 02

    Quality test

    what 'no worse' means

  3. 03

    Cache

    repeated context paid once

  4. 04

    Route

    small model for simple work

  5. 05

    Batch

    overnight work at batch prices

  6. 06

    Budget alerts

    spikes caught the same day

Each cut is checked against a quality test before it ships, so cheaper never means worse.

Token Cost Cut

$4,500 2 weeks, fixed price

  • Cost per AI feature, measured from your own logs
  • A quality check for each feature before anything changes
  • Caching, model routing, batching and trimming applied to the top three
  • Budgets and alerts per feature

Guarantee: find annual savings of at least three times the fee, or you pay nothing.

Applies when your AI model spend is at least $3,000 a month. Savings are measured against your bill for the month before the work, annualized, and confirmed in writing. Changes ship only when they pass the quality check. Terms.

If you continue, the fee comes off your first month of Modernize and Harden.

What you could actually do with this

The long system prompt sent with every request is cached instead of paid for every time.

Repeated context is often the biggest line on the bill and the easiest to cut.

Simple classification and extraction move to a smaller model; hard reasoning stays on the big one.

You pay top price only for the work that needs it.

Overnight jobs run through a batch API instead of one call at a time.

The same work, done when nobody is waiting, at a lower price.

Every feature has a cost per use and a budget, and an alert when it jumps.

A bad prompt change or a retry loop shows up the same day, not on the invoice.

What it is worth

Take last month's bill from your model providers and multiply by twelve. Then look at how many of those calls a customer actually waits on. The rest can usually be cached, batched or moved to a smaller model.

What I actually deliver

The technical detail, for whoever on your side has to check it.

  • Cost per feature and per call, measured from your own logs
  • An evaluation set for each feature, so quality is checked before any change ships
  • Prompt caching, model routing, batching and context trimming applied to the top three features
  • Per-feature budgets and alerts

How it works

  1. 01

    Measure

    Usage logs read per feature: calls, tokens, model, retries, cost.

  2. 02

    Set the quality bar

    A small evaluation set per feature, so we know what "no worse" means before cutting anything.

  3. 03

    Cut the top three

    Caching, routing, batching or trimming, each checked against the evaluation set.

  4. 04

    Keep it down

    Budgets and alerts per feature, and a monthly look at the numbers.

When this is the wrong call

If your model spend is a few hundred dollars a month, an audit costs more than it saves; turn on prompt caching and move on. And if a feature is expensive because customers love it and use it constantly, the goal is cost per use, not a smaller bill.

Where I have done this

PracticeRank.ai

Runs a weekly check that asks six AI engines a customer's questions, with token use measured per run: one 28-question run on Claude used 560,273 input and 37,065 output tokens, logged and costed per customer.

Further reading

Often paired with

Questions

How do you cut LLM costs without making the product worse? +

Every change is run against an evaluation set built from your real requests before it ships. If the cheaper version scores worse, it does not ship.

Which providers do you work with? +

Anthropic, OpenAI, Google and AWS Bedrock, and gateways in front of them. The techniques are the same; the prices and caching rules differ.

Will you switch us to a different model? +

Only where a smaller or cheaper model passes the quality check for that task. Hard reasoning usually stays where it is.

Can you set this up so it stays down? +

Yes: per-feature budgets and alerts are part of the work.

Want to work with Kody? Let's talk.

  1. 1Book 30 minutesPick a time that suits you. It is free, and there is no pitch deck.
  2. 2Bring the problemNot a polished brief. What you are trying to ship, and where it is stuck.
  3. 3Leave with an answerA straight answer on whether I can help, and a rough sense of scope and cost if I can.
Book a free call

Rather write it down?

Straight to my inbox. I reply within one business day.