AI services

AI cost optimisation

We deliver AI cost optimisation for companies already using language models. We analyse OpenAI API costs and those of other providers, match models to tasks, introduce caching and request routing, and set up LLM monitoring in Langfuse – keeping quality high at lower, predictable costs.

Why AI costs grow faster than the benefits

First AI deployments are often built quickly: one top-tier model for everything, long prompts and the whole conversation history sent with every request. While there are few users, costs are negligible. Once the solution scales across the company, the API bills start to surprise.

On top of that there is no visibility: the company does not know which features, teams or processes generate the costs, or whether the more expensive model actually delivers better results. Without data it is hard to decide what to optimise.

AI cost optimisation starts with measurement. We then apply techniques that reduce costs without hurting quality – and verify the results on the same test data.

Typical sources of excessive costs

  • One expensive model used for simple tasks.
  • Long prompts and unnecessary context in every request.
  • No caching of repeated questions.
  • No monitoring of token usage and quality.
  • Unbounded AI agent loops.
Scope

OpenAI and LLM API costs – what we optimise

We verify every change on a test set to make sure lower cost does not mean worse answers.

Usage audit

We analyse which features, processes and teams generate costs and how good the answers are in each of them.

Matching models to tasks

Simpler tasks go to cheaper models, while the most capable ones are reserved for where they are really needed.

Request routing

We automatically select the model based on the type and difficulty of each request.

Caching and context optimisation

We reduce repeated requests, shorten prompts and pass the model only the context it needs.

LLM monitoring with Langfuse

We set up monitoring of costs, latency and quality, broken down by feature and user.

Limits and budgets

We set limits for users, agents and processes, with alerts when budgets are exceeded.

Process

How AI cost optimisation works

We work with data from your solution – whether you built it yourself or another provider did.

  1. Consultation

    We learn about the solution, the models, usage volume and the company’s cost goals.

  2. Measurement and audit

    We set up monitoring (e.g. Langfuse) and collect data on costs, latency and quality.

  3. Test set

    We prepare a set of control queries to compare quality before and after the changes.

  4. Optimisation

    We introduce model selection, routing, caching and context reduction, verifying results on the test set.

  5. Ongoing monitoring

    We set budgets and alerts so costs stay under control as usage grows.

Technologies

Monitoring and optimisation tools

We use Langfuse for LLM monitoring and Redis for caching. We work with OpenAI and Anthropic models, accessed directly via their APIs or through Microsoft Azure, AWS and Google Cloud.

  • Langfuse
  • OpenAI
  • Anthropic
  • Redis
  • Python
  • PostgreSQL
  • Microsoft Azure
  • AWS
  • Google Cloud
Example use case

Optimising the cost of an internal AI assistant

An internal AI assistant quickly became popular, and monthly API bills grew with it. Every question went to the most expensive model, together with a long instruction and the full conversation history.

Once monitoring is in place, it turns out most questions are simple procedure lookups. We route them to a cheaper model, cache the most frequent questions and shorten the context. Answer quality is verified on a set of test questions, and costs are tracked in a dashboard broken down by department.

An illustrative scenario showing the typical course and scope of such a project.

FAQ

Frequently asked questions

How can we reduce OpenAI API costs?

Most often by matching models to tasks, routing requests, caching, shortening prompts and context, and setting limits for users and agents. We verify every change on a test set.

Does a cheaper model mean worse answers?

Not always. For many simple tasks cheaper models deliver comparable results. That is why we decide based on tests on your data.

What is LLM monitoring?

It means collecting data about every request to a model: cost, response time, quality and context. It shows where costs and quality issues arise. We use tools such as Langfuse.

Do you optimise solutions built by other companies?

Yes. We analyse existing solutions regardless of who built them and propose changes along with their impact on quality.

Can AI costs be made predictable?

Yes – with monitoring, budgets and alerts, costs become measurable and predictable, even as the number of users grows.

Why insideWeb

Experience since 2009, now powered by AI

  • Since 2009

    17 years of building enterprise-class web applications, custom business systems and mobile apps.

  • Industry know-how

    Many projects for automotive, logistics, healthcare, food service and catering, construction and finance.

  • From idea to maintenance

    Consulting, design, development, integrations, rollout, training and ongoing growth in one place.

  • Data security

    Solutions designed in line with GDPR and the EU AI Act, with access control and transparent costs.