✕
Home About Services
Technical SEO AuditCore Web VitalsOn-Page SEOWebsite DevelopmentSEO AutomationFractional CMO & MonetizationLLM Token Optimization
Pricing Portfolio Blog Contact Let's talk
RO EN ES
Back to services

LLM token optimization: lower AI API costs, same quality output.

Would you mind paying less for AI and getting the same results?

If your product or team runs on Claude, OpenAI or Gemini APIs, a large part of the bill is usually waste: repeated context, oversized models and prompts nobody has reviewed. I find it and remove it, without making the output worse.

Tell me which models you use, roughly how many calls a month and for what.

On this page
  1. Why AI costs grow
  2. Prompt caching
  3. Right model per task
  4. Prompts out of control
  5. Inconsistent output
  6. Bulk jobs
  7. How it works
  8. FAQ
The basics

Why AI API costs grow faster than usage

LLM APIs charge per token, for everything you send and everything the model writes back. Most applications send far more than the task needs: the same instructions on every call, long examples, whole documents and the full conversation history. The model's actual answer is often the smallest part of the bill.

InstructionsExamplesContext & documentsConversation historyModel output

Illustration of a typical call. Your real breakdown comes from your usage logs.

Problem 1

Every call re-sends the same long instructions

“Our system prompt is 3,000 tokens and we pay for it on every single request.”

Prompt caching is usually the biggest and fastest saving. Anthropic, OpenAI, Gemini and AWS Bedrock can all cache the repeated start of a prompt and bill it at a fraction of the normal price, but only if the prompt is structured for it: stable parts first, changing parts last.

What I do

  • Anthropic prompt caching
  • OpenAI cached input
  • Gemini context caching
  • Bedrock prompt caching
  • Prompt structure for cache hits
Problem 2

The biggest model does every task

“We use the top model for everything, including tagging and formatting.”

Classifying, extracting, formatting and short rewrites rarely need the most expensive model. Routing each task to the smallest model that does it well, and keeping the large model for reasoning and writing, cuts costs without anyone noticing a difference in the output.

What I do

  • Task-by-task model choice
  • Claude, OpenAI and Gemini pricing compared
  • Routing simple tasks to smaller models
  • Output length limits
Problem 3

Prompts grew for months and nobody owns them

“Every fix added another paragraph. Now nobody dares to touch the prompt.”

Prompts that grow by patching become long, contradictory and expensive. I rewrite them as clear, versioned prompts with a test set, so every change can be checked against real examples before it goes live. That's prompt engineering as maintenance, not magic words.

What I do

  • Prompt audit and rewrite
  • Versioned prompts
  • Test sets from real cases
  • Shorter context and examples
Problem 4

The output is inconsistent, so you pay to fix it

“Half the generated texts sound the same, and we re-run the rest until they're usable.”

Every retry and manual fix is a hidden cost. In my own content pipelines I use deterministic variation, anti-repetition lists, structured outputs and a self-check step, so the first answer is the usable one. Fewer retries means fewer tokens and less editing time.

What I do

  • Structured outputs (JSON)
  • Anti-repetition rules
  • Self-check steps
  • Fewer retries
Problem 5

Bulk jobs run in real time, at full price

“We generate thousands of product texts overnight through the normal API.”

Jobs that don't need an instant answer, like product descriptions, classifications or translations in bulk, can go through the batch APIs from Anthropic and OpenAI at a discounted price. I move them there and set up the pipeline so results flow back automatically.

What I do

  • Batch API setup
  • Bulk content pipelines
  • Usage and cost tracking
  • Python and Claude API
How it works

How an LLM cost optimization project works

  1. 1

    Measure

    Usage logs and invoices: which calls, which models, how many tokens and where they go.

  2. 2

    Find the waste

    Repeated context, oversized models, retries and bulk jobs running at full price, ranked by cost.

  3. 3

    Fix and test

    Caching, routing, batching and prompt rewrites, each one tested against real examples.

  4. 4

    Keep it measured

    Cost per task tracked over time, so the next prompt change doesn't quietly double the bill.

Paying more for AI than you expected? Would you mind if I looked at your usage?Consultation is billed hourly. Larger projects get a fixed quote after a first look at your usage.

No, take a look →

LLM token optimization FAQ

What is prompt caching?

Prompt caching lets the API provider store the repeated beginning of your prompts (instructions, examples, documents) so later calls reuse it instead of processing it again. Anthropic, OpenAI, Google and AWS Bedrock all offer it in some form, and cached input is billed at a fraction of the normal price.

How much can token optimization save?

It depends on how the application is built. Workloads that resend long instructions, use one large model for everything or run bulk jobs in real time usually have the most to gain. I measure your actual usage first and give you an estimate before changing anything.

Will cheaper calls make the output worse?

Not if it's done properly. Every change is tested against a set of real examples from your use case, and anything that lowers quality is rolled back. Often quality improves, because shorter, clearer prompts are easier for the model to follow.

Do you work with OpenAI and Gemini, or only Claude?

Most of my own pipelines run on the Claude API, but the same principles apply to OpenAI, Gemini and models served through AWS Bedrock or OpenRouter.

What does an AI consultant do in a project like this?

I review how your application uses the models, find where tokens and money are wasted, then rewrite prompts, add caching, routing and batching, and set up measurement so costs stay under control. Consultation is billed hourly; larger projects are quoted upfront. See pricing.

Is it a mistake to switch to a smaller model to save money?

Not if you do it on the right tasks. Classification, data extraction and formatting work well on small models. Complex reasoning stays on the large model. I test every change on real examples before it goes live.