---
title: Building LLM Gateway: from zero to $470K in 12 months
date: 2026-06-11T00:10:01.889Z
edited: 2026-06-11T00:10:01.889Z
author: Ismail Ghallou (Smakosh)
canonical: https://smakosh.com/blog/building-llm-gateway
reading_time: 6 min (1342 words)
Tags: ai, web-development, career
---

# Building LLM Gateway: from zero to $470K in 12 months

![LLM Gateway homepage](/assets/blog/llmgateway-home.png)

In May 2025, [Luca Steeb](https://github.com/steebchen) and I started building [LLM Gateway](https://llmgateway.io), an open-source API gateway for Large Language Models. Twelve months later, it has processed over $470K in verified revenue, served 34 million API requests, routed 214 billion tokens, and grown past 8,800 signups with 714 paying customers — all from a standing start, with no funding and no audience to launch to.

This post is the story of how we built it, the technology choices we made and why, and the growth work that actually moved the numbers.

## What is LLM Gateway?

If you build anything on top of LLMs today, you end up juggling API keys from OpenAI, Anthropic, Google, and a dozen smaller providers, each with their own dashboards, billing, rate limits, and slightly incompatible APIs. LLM Gateway sits in the middle: one OpenAI-compatible API that routes requests to 270+ models across 40+ providers, tracks token usage and costs in real time, caches responses, and falls back to a healthy provider when one goes down.

We positioned it from day one as the open-source, self-hostable alternative to OpenRouter, LiteLLM, Portkey, Helicone, and Vercel AI Gateway. The core is AGPLv3 with a dual license for enterprise features, and the whole thing is public at [github.com/theopenco/llmgateway](https://github.com/theopenco/llmgateway) — currently sitting at 1,293 stars and 144 forks.

What started as one API turned into four customer-facing surfaces:

1. **The main app** ([llmgateway.io](https://llmgateway.io)) — the gateway itself, plus the dashboard for API keys, usage analytics, and billing
2. **The docs** — a full documentation site with integration guides and an AI assistant that answers questions using our own gateway
3. **DevPass** ([devpass.llmgateway.io](https://devpass.llmgateway.io)) — a flat-rate subscription for developers using AI coding tools like Claude Code, OpenCode, and Cline, at $29/$79/$179 per month
4. **The chat playground** ([chat.llmgateway.io](https://chat.llmgateway.io)) — chat, image, video, and audio generation, canvas, and side-by-side group chat across 210+ models

![LLM Gateway chat playground](/assets/blog/llmgateway-playground.png)

## The tech stack, and why

The whole project is a TypeScript monorepo managed with Turborepo and pnpm workspaces. Strict mode everywhere, no `any`. Here's how it breaks down:

**The gateway and API are built with [Hono](https://hono.dev).** When your product _is_ an API proxy, the framework overhead on every request matters. Hono is tiny, fast, and runs anywhere, and combined with Zod for validation we get an OpenAPI spec generated straight from the route definitions. That spec then generates a fully typed API client for every frontend app — change a route's response shape and TypeScript breaks in the UI at build time, not in production. This one decision saved us from an entire category of bugs.

**PostgreSQL with Drizzle ORM, and Redis for caching.** Postgres holds everything: users, organizations, projects, API keys, usage records, billing. Drizzle gives us typed queries and sane migrations without the magic of heavier ORMs. Redis caches gateway responses (keyed on the request body) and handles the hot-path lookups that need to happen on every single proxied request — checking an API key shouldn't cost a Postgres round-trip 34 million times.

**Next.js App Router for every frontend.** The dashboard, playground, DevPass site, and docs are all Next.js apps with React Server Components, TanStack Query for client-side data, and Radix UI with Tailwind for components. Sharing one component language across four surfaces meant shipping each new surface got cheaper than the last.

**Better Auth for authentication, Stripe for billing, Vitest for testing.** Better Auth gave us passkey support out of the box. The e2e suite runs real requests against real providers — when you're the middleman between someone's app and a dozen LLM providers, mocked tests lie to you.

The division of labor was roughly: Luca drove the gateway core and infrastructure, and I spent most of my time across the product surfaces, billing systems, the playground, and everything growth-related.

## How we grew it

The honest answer is: lots of small compounding bets, not one viral moment. The revenue chart makes that obvious — five months of nearly flat lines before anything happened.

### Programmatic SEO

We built provider pages, model comparison pages, and migration guides ("switching from OpenRouter", "LiteLLM alternative", and so on) as first-class pages with real content, not thin doorway pages. The models directory alone — every model with live pricing, context size, and capabilities — became one of our biggest organic entry points.

![AI Models Directory](/assets/blog/llmgateway-models.png)

Over 16 months, that grew into 33.4K clicks from 2.33M impressions in Google Search, with the curve still pointing up:

![Google Search Console performance for llmgateway.io](/assets/blog/llmgateway-search-console.png)

We also started tracking AI search visibility across 50 monitored prompts — when developers ask ChatGPT or Perplexity for "open source OpenRouter alternatives", we want to be in the answer. That's where a growing share of developer discovery actually happens now.

### Ecosystem distribution

Instead of shouting into the void on social media, we went where developers already were: LLM Gateway shipped as a built-in provider in [OpenCode](https://opencode.ai/docs/providers/#llm-gateway), got listed on [models.dev](https://models.dev/providers/llmgateway/) and [OpenAlternative](https://openalternative.co/llm-gateway), and we [sponsored AI Hack Night](https://x.com/Andy_AJT/status/1969173545419767811?s=20). Each integration is a permanent distribution channel that keeps working while you sleep.

### DevPass: meeting a wave when it arrived

The single biggest inflection was [DevPass](https://devpass.llmgateway.io). AI coding tools exploded, and developers wanted predictable flat-rate pricing instead of anxiously watching a usage meter. DevPass turns one key into access to every model at three flat prices, working in Claude Code, OpenCode, and any OpenAI-compatible tool with no SDK changes. It launched in January 2026 and grew to 179 subscriptions started with 135+ active within six months.

![DevPass landing page](/assets/blog/llmgateway-devpass.png)

### Monetization as a product, not an afterthought

Once we had paying customers, I led a monetization redesign that shipped five revenue features in a single release: an auto-topup nudge, low-balance alerts, a burn-rate and runway dashboard, a second-topup bonus tier, and an admin view for payment failures. None of these are glamorous. Together they target one thing — repeat purchase behavior — and the cumulative revenue curve visibly steepened after that release.

We also ran the boring-but-necessary trust work: I owned our SOC 2 Type II program end-to-end, including quarterly security reviews, asset inventory, incident response tabletop exercises, access controls, and coordinating third-party penetration testing. For an infrastructure product handling other companies' API traffic, this stops being optional very quickly.

## The numbers, 12 months in

Everything below is independently verified — revenue through [TrustMRR](https://trustmrr.com/startup/llm-gateway), which connects directly to our Stripe account:

![LLM Gateway verified revenue on TrustMRR](/assets/blog/llmgateway-trustmrr-revenue.png)

- **$470K+** all-time revenue, verified via Stripe
- **$8.4K MRR** across 142 active subscriptions
- **34.4M+ API requests** served, routing **214B+ tokens**
- **78,000+ unique visitors** and **8,800+ signups** in the first 12 months
- **714 paying customers** across 2,000+ credit purchases
- **1,293 GitHub stars** and 144 forks on the open-source core
- **33.4K clicks / 2.33M impressions** from organic search

If you want the full picture of what shipped along the way, the [changelog](https://llmgateway.io/changelog) tells the story better than I can summarize it.

## What I took away from this

**Boring technology, chosen deliberately, is a superpower.** Postgres, Redis, TypeScript, Next.js — nothing exotic. The innovation budget went into the product, and the typed OpenAPI pipeline meant two people could maintain six deployed apps without drowning.

**Distribution is built, not found.** Every durable growth channel we have — SEO pages, ecosystem integrations, the open-source repo itself — is something we constructed deliberately and that compounds. The flat first five months weren't failure; they were the part of the compounding curve that looks like nothing is happening.

**Revenue features deserve the same craft as product features.** The monetization release did more for the business than any model launch. Most engineers (me included, for years) treat billing as a chore. It's the product.

**Open source is a business model, not charity.** Being self-hostable and AGPLv3 is exactly why developers trusted us over closed alternatives — and the dual license keeps the lights on.

Building LLM Gateway with Luca has been the most complete thing I've done in my career so far: architecture, product, growth, security compliance, and revenue, end to end. If you're working on something where this experience would help — or you just want to talk LLM infrastructure — [reach out](https://smakosh.com/contact).

---

_Originally published at https://smakosh.com/blog/building-llm-gateway_
