← Blog

OpenRouter is not your optimal solution

A router finds the cheapest price for an average workload. The optimum for yours has to be found separately.

A setup tuned for the average does acceptably everywhere. A setup tuned for your workload does far better on it
There is no free lunch

OpenRouter finds you the cheapest provider. That price, though, belongs to an endpoint configured for a broad mix of customer workloads, and a stack re-optimized for your own workload can cost far less. A better router cannot close this gap, because a router only chooses among endpoints that already exist and has no way to change how any of them is configured.

The gap also matters competitively. Now that anyone can use the same models at the same price, every business starts from the same place, and what can still set you apart is the data that only your own system produces. Fitting the stack to your workload with that data is the moat you can build right now.

Until now, only companies with their own inference engineering team could do this work. Fractalyze is turning what that team does into an automated system. Our bespoke solutions cut inference costs by 25–80%. With the model left unchanged, we have measured speeds 3–4x faster than an open-source serving engine on the same GPU, and in a recent project that fine-tuned a model to the customer's task, model cost fell by roughly 90%.

Global Optimum: A router finds a price for everyone

A router decides which of several providers a request goes to. OpenRouter's default behavior is to look at the providers with no recent outages and send requests to the cheaper ones with higher probability. Routers like this have become a standard layer of the stack, and many of them now compete for the same market.

The provider endpoints a router chooses from, however, serve requests from a great many customers at once. Settings such as batch size, the memory given to the KV cache, and how long cached entries are kept therefore have to be tuned to the average across all those customers. The lowest price a router finds is, in the end, the lowest price for serving an average workload.

Settings tuned to the average are unlikely to be optimal for your workload, because the more general the assumptions, the less room there is to optimize. Compilers are a good example. A compiler that knows nothing about its inputs produces code that runs acceptably everywhere, and the same compiler produces faster code once it is told what constraints the inputs satisfy.

AI inference works the same way. Optimization theory has a result known as "no free lunch": no single method performs best on every problem. In practice this means that once you narrow the problem with data, there is room to find a better method. The OpenRouter price that everyone has access to is a global optimum found across all customers, with no guarantee that it is optimal for yours. The optimum for your own workload, the bespoke optimum, has to be found separately.

Bespoke Optimum: Teams that can are already rewriting their stack

Cloudflare is one team building its own bespoke optimum. It expected most of the requests on its platform to come from agents. An agent resends the system prompt, the tool definitions, and the whole conversation so far on every turn, so its inputs are very long. When a single server both processes the input and generates the output, the two stages block each other. Cloudflare therefore split input processing and output generation onto separate servers and tuned each one on its own. It reports that p90 time between tokens fell from about 100 ms to 20–30 ms while the same GPUs absorbed a growing volume of requests (Building the foundation for running extra-large language models).

Cloudflare got this result because it knew its own workload and modified its stack to match. A router that found it a cheaper or better GPU partner would have left the problem where it was. Your competitors may be doing the same kind of work.

This kind of optimization takes a skilled engineering team, though, and the team's work never finishes. Models change every few months and workloads keep shifting, so each round of tuning has to be redone. Cloudflare notes in the same post that its input and output patterns changed sharply again after the model was released to the public.

Most companies cannot bring a team like that in-house. A dedicated team only pays for itself when the inference bill is much larger than the team's payroll, and for most companies the bill is painful without being anywhere near that size.

It is not an easy choice for larger companies either. Engineers who can modify an inference stack are scarce. Handing the job to an AI and letting it try configurations at random does not work, because optimization and concurrency problems are entangled and the search space is far too large. Most companies therefore end up paying whatever price the router picks or, if they run their own GPUs, leaving the inference engine on its default settings. Neither option gives a company a moat.

Automated Bespoke Optimum: Routing and the serving system change together

For a company without that engineering team to get the same result, a system has to do the team's job. What an inference team does comes down to feeding what it knows about its workload back into the stack, and a system can do the same by feeding workload information into the inference pipeline.

That information is needed in two places. One is routing, which decides where a request goes, and the other is the serving system, which actually processes it. OpenRouter handles only the routing, and the providers behind it run the serving systems. Of the two, routing is the easier one to change, since you can leave the serving system alone and build a smarter router that knows the workload.

A routing change can also make things worse when it is judged by a single metric. An experiment by an engineer at Meta shows this. The router was set to always send requests that share a prefix to the same server, so that the server could reuse the KV cache it had already computed. The cache hit rate rose from 64% to 87%. The request rate the cluster could sustain within its latency target did not rise with it: it was 42 requests per second before the change (±20 across seeds) and 30 after. Requests followed the cache and piled onto particular servers, and the queues on those servers pushed up latency overall. The paper solves this with a routing plan that also accounts for load. On another workload where caching saves little computation, though, sending requests after their cache cut capacity to 0.5–0.67x of the baseline, so the author recommends turning it on only after replaying real traffic and confirming that latency or capacity improves (CacheRoute).

Only the routing changed in this experiment, and the serving system stayed as it was. Routing decides where requests concentrate, and serving settings such as batch size and the memory given to the KV cache decide how much of that load a server can absorb. Both shape the same latency and throughput, so fitting only one of them to the workload leaves the other's headroom unused. Tuning the two from the same workload information puts both to use.

Workload data retunes routing and serving together
Workload data retunes routing and serving together.

Fractalyze is building a system that changes the two together. It leaves the model and the hardware as they are and optimizes routing and the serving system from the customer's data. The work runs in three stages: measure, retune, and operate.

  • Measure. We measure the workload on the customer's real traffic: how long requests are, how much of their prefix they share, how long sessions last, and when traffic peaks. The quality and latency targets that must hold are also fixed at this stage.
  • Retune. We use those measurements to retune the routing and serving configuration together, which covers caching, batching, and kernels. Nothing is switched over before it has been checked: the same traffic is replayed through the current setup and the new one, and we compare the cost per request under the same quality and latency requirements.
  • Operate. Once the numbers hold up, production traffic moves to the optimized setup, either on an API we operate or on the customer's own GPUs. Because workloads keep changing, as described above, measuring and retuning are repeated rather than done once.

If people had to run each repetition, the team that most companies cannot afford would be needed all over again, so the loop has to be automated. The automation rests on an observability layer that sits in the customer's system and collects, for every request, the data that bears on routing and serving strategy. The system adjusts its strategy from that data and then measures again to confirm that cost went down while quality held. What to change is decided from the observed data, which is what separates this from trying configurations at random.

The more observations accumulate, the more precisely the system knows your workload, so this setup improves with time. The data also comes only from your own system, which gives you an edge over competitors.

How much this approach saves is hard to state precisely. The technology is moving fast and AI adoption is only now getting underway in earnest, so there is no settled baseline to compare against and the picture differs from one domain to the next. Going by published cases and our own work, though, a 60–80% reduction is a realistic target.

Start with the published cases. We found three in which a company said it kept the same model and changed only routing and serving. The reported savings ranged from 50% to 80%, with a median of 67%. These figures are self-reported by the companies or their vendors, and each uses a different baseline, so they cannot be compared directly with one another. The chart also includes cases that changed the model or the way the model is used, which the next section covers (sources for each case are listed at the end).

Published cost reductions in 2026, by what was changed
Published cost reductions in 2026, by what was changed.

Our own measurements fall in the same range. We optimize open models for a single consumer GPU (an RTX 5090) and publish the results on Hugging Face, four models so far. Keeping the model and the GPU fixed, we rewrote the kernels and caching for each combination. Two of the image generation models (Qwen-Image 2.1 and FLUX.2 klein) ran 3–4x faster than SGLang, an open-source serving engine, with its optimization options turned on, and text generation on a speech-and-text model (Qwen3-Omni) ran 3.7x faster than the default configuration. If these speedups carry over proportionally into sustained throughput, they imply roughly 67–75% lower GPU cost per request.

The Next Problem: As much intelligence as needed, used the right way

Everything so far is about computing the same answer at the same accuracy for less, with the model and the hardware held fixed. Two more choices sit above that layer: the model, which sets how much intelligence is used, and the harness, which sets how the work is handed to the model. These two are the problems we want to take on next, and they hold more of the remaining room for optimization. On the model side we have already started, by fine-tuning models to a customer's task.

Routing and serving now. The model and harness next
Routing and serving now. The model and harness next.

In the chart in the previous section, the largest savings also come from the cases that switched to a cheaper model. This room exists because a given level of intelligence is getting cheaper quickly. According to an analysis Epoch AI published in September 2026, the cost of reaching a fixed level of performance has fallen by about 47% per quarter since 2023, or 13x per year (The plunging price of thought). Open-weight models have also been trailing the most advanced closed models by an average of four months in 2026 (Epoch AI).

The work companies give to AI does not change nearly as fast. The shape of traffic keeps shifting, as noted earlier, but the quality bar for tasks like answering support requests or reviewing documents barely moves over a few months. So if there is a task you handled well with a top-tier model four months ago, you can now generally do it without paying frontier-lab prices. Every such task is a candidate for cost optimization.

There is also a way that does not depend on waiting for cheaper models to catch up: fine-tuning a model on your own task. A model that has only one task to do need not be good at everything else, so a much smaller model can reach the same quality on that task. In recent work with a B2B customer, we fine-tuned a model to that customer's task with LoRA and cut their model cost by roughly 90%.

Coinbase did the same. It took a 9B-parameter open-weight model for its fraud detection agent and trained it further for under $100, and on Coinbase's internal benchmark the resulting model's recall, the share of actual fraud it caught, was 12 percentage points higher than that of Opus 4.5 (Coinbase). On the same benchmark, the newer versions of Opus, Sonnet, and GPT had lower recall than their predecessors. A model built for everyone turned out not to be the best one for Coinbase's task, which is the global optimum argument from earlier applied to models.

Coinbase could do this because it had a standard to measure against. Its benchmark was fixed at 16,140 real transactions, 813 of them confirmed fraud, so each time the model changed the team could tell whether the results had improved. Without a standard like that, there is no way to tell after a model or harness change whether you lowered the cost or lowered the quality. Most enterprises are still partway through adopting AI, and few of them have such a standard in place.

Our end goal is to reduce cost by having each problem use only as much intelligence as it needs, in the way that suits it. That work begins with setting the standard. In a PoC with a team that is in the middle of adopting AI, we therefore start by defining together what success means for their business and then look for the bespoke optimum that meets it. Models and workloads will keep changing, so we are looking for partners who want to keep this going with us as a system after the PoC ends.


We would like to hear from you if your inference bill hurts but a dedicated optimization team is out of reach, if you already use the cheapest provider and are unsure what to change next, or if you run your own GPUs with default serving configurations. Tell us what you are running today, and we will measure how much we can reduce your inference cost at the same quality and show you the result (inference.fractalyze.io).

Cases and sources used in the chart

Half the bill. Two weeks.

Tell us what you run, on an API or your own GPUs. We'll show you how much you can save.