AIAI EngineerJun 25, 2025· 18:47

Fun stories from building OpenRouter and where all this is going - Alex Atallah, OpenRouter

Alex Atallah, founder of OpenRouter, tells the story of how he launched the LLM aggregator in early 2023 after observing the open-source race sparked by Meta's Llama 1 and Stanford's Alpaca distillation under $600. He argues the inference market is not winner-take-all, citing OpenRouter's data showing Google Gemini growing from 2-3% to 34-35% of tokens over 12 months. The platform evolved from a simple model collection into a marketplace with over 400 models and 60 providers, solving architecture challenges like 30-millisecond latency, cancelable streams, and a middleware plugin system for web search and PDF parsing. Atallah explains that OpenRouter grew 10-100% month-over-month for two years, and he predicts future additions like transfusion models that generate images and more powerful geographic routing for enterprise optimization.

  1. 0:00The Question
  2. 1:43Moderation
  3. 2:41Open Source
  4. 4:44Alpaca
  5. 6:30Window AI
  6. 7:18Launch
  7. 8:59Marketplace
  8. 11:31Market Data
  9. 13:42Middleware
  10. 17:06Future

Powered by PodHood

Transcript

The Question0:00

Alex Atallah0:26

Allright. When I started OpenRouter at the beginning of 2023, I had one major question in mind. I was looking at this new market that was coming online, and it was incredible. At the very end of 2022, we all saw ChatGPT, and I got bitten by the AI bug.

And I decided to look into answering this question: will this market be winner-take-all? Inference might be the largest market ever in software, and this seemed like a critical thing that everybody was assuming the answer to it would be yes.

OpenAI was just far and away the leading model. There were a few others that were coming up on its tail, and I built a couple prototypes to look into what they could be used for, and also wanted to investigate open source.

So in this talk, which SWIX named, I'm going to talk about the founding story of OpenRouter and go through a little bit of the hoops that we jumped through, and sort of the investigation that we did as we put together this product that started as an experiment and kind of evolved into a marketplace over time.

In January, we saw the first signs of people wanting other types of models, and the first evidence was moderation. This was like a very clear interest from users in looking for models where they could understand whether they'd be deplatformed or what the moderation policy of the company was.

Moderation1:43

Alex Atallah2:07

And we saw some people generating novels where it would be a detective story, and in Chapter 4, the detective would find someone who commits a murder and shoots the victim. And OpenAI at the time sometimes refused to generate that output, or it was questionably against the terms of service.

And of course, we saw role-play and basically a big gray area emerge around what models we're willing to generate. So

in the next month, we saw the open source race begin, and I'm going to do a little bit of an OG test here. Raise your hand if you ever used Bloom 176B. There's like 10 hands raised, or OPT by Facebook.

Open Source2:41

Alex Atallah3:03

This was like one of the earliest open source language models, about five hands raised. There were a couple of these emerging, and there were some very interesting projects to help people access them. And early days, they weren't really useful for very much.

So we kept digging, and eventually, the open source community

ran into Meta's first launch, which was Llama 1 in February. And Llama 1, in their abstract, advertised that it outperformed GPT-3 on most benchmarks. You can see the highlighted part here, which blew everyone away. This was huge. An open weights model better than GPT-3, and especially a smaller model.

This was the 13 billion parameter version, one that you could run on your laptop, outperforming a large server-only, only

tons of money required to run inference companies' model. And it was beating it on some benchmarks. Everyone lost their minds. And Llama kicked off a huge storm. It still was not very useful, I have to say. It was like a text completion model for the most part, and it was very difficult to run locally.

The infrastructure just wasn't there, and people were struggling to figure out what to do with it, which is when we had the greatest moment of all, I think, for the birth of the long tail of language models, which was the first successful distillation in March of 2023.

Alpaca4:44

Alex Atallah4:44

Alpaca. A group at Stanford took Llama 1, generated a bunch of outputs on GPT-3, and fine-tuned Llama 1 on those outputs, and created Alpaca for less than $600 in total. And this was an incredible moment. It was the first time I saw the transference of both style and knowledge from a large model onto a small one.

And this was a huge unlock, because it meant that not only do you not need a $10 million training budget to create your own models, but you could also, for the first time, make unique data available as a service in the form of a language model.

And I immediately began to wonder, like, what are there's going to be tens of thousands of these, maybe hundreds of thousands, and they seem incredibly important. This is knowledge finally being distilled into software. There needs to be a place on the internet to discover these and understand what they do.

Because even this open weights model was still closed in a way. It's a black box. You get 7 billion floating point numbers. You don't know what it's good at or what to do with it. Very few people used Alpaca.

Raise your hands if you used Alpaca.

I see about maybe 12. So it's like only double the number of people who used the almost unusable open source models on the previous slide. So OpenRouter initially started as a place to collect all these things. But before we got there, I wanted to check out people's willingness to bring their own model to generic websites.

Like, what if the developer didn't even know which model a user wanted to use? How would a user bring their choice of model to the software that they want? And in April, I launched Window AI, which was an open source Chrome extension that let a user choose their model and let a web app just kind of suck it in.

Window AI6:30

Alex Atallah6:54

And so you can see from the Chrome extension here, if you look really closely, this user is using Together's open source deployment of GPT-next.

I can't read it from here, but like an open source model that swaps out OpenAI directly inside the web page.

So the next month, OpenRouter launched, and I co-founded it with the founder of the framework that Window AI was built on, Plasmo, Lewis. And we started OpenRouter as first a place to collect all the models in one spot and help people figure out what to do with them.

Launch7:18

Alex Atallah7:40

And it eventually grew into a place that gives you better prices, better uptime, no subscription, and the most choice for figuring out which intelligence your software should run. So let's talk a little bit about what it is, because not everyone here might be familiar with it.

We have been growing 10 to 100% month over month for the last two years. It is an API that lets you access all language models, and it's also become kind of the go-to place for data about who's using which model and how that is changing over time, which you can see on our public rankings page here.

It's a single API that you pay for once. You get near zero switching costs to go from model to model. And we have over 400 models, over 60 active providers, and you can buy with lots of different payment methods, including crypto.

And we basically do all the tricky work of normalizing tool calls and caching for you so that you get the best prices and the most features, and you don't have to worry about what the provider supports. Another story.

Marketplace8:59

Alex Atallah8:59

Initially, OpenRouter was not a marketplace, really. It was just kind of a collection of all the models and a way to explore data about who was using each one. So how did we get here? Initially, when the first open source models emerged, we only had one or two providers for each one.

And so we had a primary provider and a fallback provider. And initially, that was it, and we didn't even name the providers. But it became clear that there were going to be a bunch of companies that wanted to host these models and at very different prices and performances.

The number of features ballooned. There were companies that supported the minP sampler and most didn't. There were some that supported caching, some that supported tool calling and structured outputs, and others that didn't. And suddenly, the ecosystem was just ballooning into this kind of out-of-control, heterogeneous monster.

And we wanted to tame the monster. So we aggregated all providers in one spot, and at different price points, it became a marketplace. And you can see this model, Llama 3.370b-instruct, is one of the models with the most providers on the platform, and it has 23.

Closed source models also had something interesting happen to them, which is that they couldn't keep up with the demand. And so we helped developers basically get uptime boosting, and you can see the delta and how much we can boost uptime just by aggregating lots of different providers for a model.

And this became really helpful for people using closed source. And we became a marketplace for both, showing graphs about latency and throughput, and helping people figure out, using real-world data, what the latency and throughput is on each model.

And that's how OpenRouter became a marketplace and one optimized for language models, which I thought would be proper for inference, potentially the biggest market in software.

You can, obviously, a couple other things that we support: comparing models using your own prompts with the ease of just texting an iMessage, fine-grained privacy controls with API-level overrides, the ability to see your usage of all models in one place and have great observability.

And back to the original question here of whether will intelligence be winner-take-all, we've come to the most likely bet that that is not the case. Here's our data broken down by model author, how many tokens have been processed by each one.

Market Data11:31

Alex Atallah11:50

And you can see Google Gemini started pretty low, like roughly 2%, 3% in June of last year, and just has grown to 34%, 35% pretty steadily over the last 12 months.

Anthropic is one of the most popular models on our platform. OpenAI is a little bit underrepresented in this data because a lot of developers use us to get OpenAI-like behavior for all other models. But OpenAI has grown a lot here as well.

So here's what we believe about the market, after all of the

backstory that I just gave you. The future is going to be multi-model. All of our customers, tons of customers, use different models for different purposes and realize they can unlock huge gains by doing so. Inference is also a commodity.

Claude from Bedrock, we want to make look exactly the same as Claude from Vertex. And we do that because the two hyperscalers have fundamentally the same commodity being delivered at different rates, different performances. And for a developer, you just want to be able to select that without worrying about who's serving it.

We think inference will be like a dominant operating expense, and selecting and routing will be crucial. You can see the number of active models on OpenRouter has just steadily grown. It's not the case that people just hop from model to model.

It tends to be sticky, and we're trying to just make this wild ecosystem a lot more homogeneous and easier to work with as a developer.

To honor Swix's title for this presentation, let's give a technical story, something that we've worked on in the process of building the company. And that was our own idea for how to do an MCP within OpenRouter. So we don't have MCPs.

Middleware13:42

Alex Atallah14:01

We don't have an MCP marketplace, but we did run into the need to expand inference with new features and new abilities. For example, searching the web for all models, PDF parsing for all models,

other interesting things coming soon. And what we really wanted to do was give these abilities to all models. But that involves not just the preflight work that MCPs do today, where you can kind of

call another API, get a bunch of behaviors, and then have the inference process access those behaviors as it goes. We also need the ability to transform the outputs on the way to the user. And so what we really, really needed was something more like middleware.

Middleware is kind of a common concept in web development. You set up middleware when you're setting up authentication, for example, or caching for a web app. And so we came up with a type of middleware that's AI-native and optimized for inference, and that looks not totally dissimilar from the way middleware looks in Next.js or web development.

So pardon the code on the screen, but this is a little bit about how our plugin system looks, and it can call MCPs from inside a plugin. But importantly, it can also augment the results on the way back to the user.

So here's an example of our web search plugin, which augments every language model with the ability to search the web. Every language model can just kind of tap into this plugin and get web annotations as results are being fed back to users in real time.

And this all happens in a stream. So there's no kind of requirement that you get all of the tokens at once. It can just happen live in the stream. We solved a bunch of other tricky problems while building OpenRouter.

We really wanted to get extremely low latency, and we got it down to about 30 milliseconds, the best in the industry, I believe, using a lot of custom cache work. And we also need to make streams cancelable. All these different providers have completely different stream cancellation policies.

Sometimes if you just drop a stream, the inference provider will bill you for the entire thing. Sometimes it won't. Sometimes it'll bill you for the next 20 tokens that you never got. And we work a lot to try to figure out these edge cases and understand when developers are going to care about them, too.

And standardizing all these providers and models became a big, tricky architecture problem that we've spent a while working on. So here's where all this is going. We're going to add more modalities to OpenRouter, and I think this is a big change in the industry as well.

We're going to start seeing LLMs generate images. We already have a few examples on the market, but some people call it transfusion models, a transformer mixed with stable diffusion. These are going to give images way more world knowledge and the ability to have a conversation with the image, which we think is just critical for growing that industry and making it really work.

Future17:06

Alex Atallah17:31

Imagine I just ran into somebody today who is using a transfusion model, or who told me about their customer using a transfusion model to generate menus. Imagine doing that, like a whole menu in a delivery app generated by a transfusion model.

It's going to be really exciting and a big deal in the coming year. We're also going to work on much more powerful routing. Routing is our bread and butter. And so doing geographical routingright now, it's pretty minimal, but routing people to theright GPU in theright place and doing enterprise-level optimization is coming.

Better prompt observability, better discovery of models, like really fine-grained categorization. Imagine being able to see the best models that take Japanese and create Python code. And of course, even better prices coming soon. So we believe in collaboration and building an ecosystem that's durable and with low vendor lock-in.

So collaborate with us. Here's our email, and if you're interested, join us, too.