1-Click apps Deploy your code Pricing Guides Docs Support Log in Deploy an app

Self-Host LiteLLM: The OpenRouter Alternative You Own

OpenRouter is the easy way to route LLM calls, but you pay a fee and every prompt flows through their servers. Here is how to self-host LiteLLM and own your gateway for $15/mo.

Jun 16, 2026 4 min readAI + Hosting

On this page
  1. What LiteLLM Actually Is
  2. OpenRouter vs Self-Hosting LiteLLM
  3. Making the Self-Host Part Boring
  4. Deploy It

If you are building anything with LLMs, you have probably hit the gateway problem. You start with one provider, then you want a fallback, then you want to track spend per project, then you want to hand a scoped key to a teammate without sharing your root OpenAI key. Calling each provider’s API directly stops scaling fast.

The popular answer is OpenRouter. One endpoint, one credit balance, every model. It is genuinely good, and if you never want to run any infrastructure, it is hard to beat.

But there is a quieter answer that a lot of teams move to once they care about cost, data, or control: run the gateway yourself. The open-source tool for that is LiteLLM, and you can now deploy your own on InstaPods in one click.

What LiteLLM Actually Is

LiteLLM is the open-source LLM gateway. Around 50,000 GitHub stars, MIT licensed, in production at companies like Netflix and Stripe.

It gives you a single OpenAI-compatible endpoint in front of 100+ providers (OpenAI, Anthropic, Gemini, AWS Bedrock, Azure, and more). Point any OpenAI client at it and you get:

  • Provider routing and fallbacks - send a request, LiteLLM picks the provider, retries, and fails over.
  • Virtual keys - mint scoped sk- keys per teammate or project, each with its own budget and rate limit.
  • Spend tracking - per-key, per-user, per-team cost, stored in your own database.
  • An admin UI - add models, manage keys, and watch spend without touching a config file.

In other words, it does what OpenRouter does, except it runs on your server.

OpenRouter vs Self-Hosting LiteLLM

This is not a “managed is bad” article. The two models are genuinely different trades.

OpenRouter is the managed path. Zero ops, one credit balance, instant access to a huge model list, unified billing. The cost is a platform fee on credit purchases (5.5% on card top-ups, with a small minimum) and the fact that your prompts, keys, and usage flow through OpenRouter’s infrastructure. For most weekend projects that is a fine deal.

Self-hosting LiteLLM is the ownership path. You bring your own provider API keys, so there is no middleman markup on top of provider prices. Your prompts and spend logs stay on a server you control, which matters for data residency and privacy. You own routing, fallbacks, and virtual-key policy outright. The cost is that someone has to run it.

The honest summary: if you never want to operate anything, OpenRouter wins. If you want your keys, your data, and no per-call markup, self-hosting wins, as long as the operating part is cheap and boring.

Making the Self-Host Part Boring

That last condition is the whole point of doing this on InstaPods. A LiteLLM pod is a private, single-tenant gateway:

  • Its own master key, generated per pod, never shared.
  • A bundled PostgreSQL for virtual keys and spend logs.
  • Your provider keys stored on the pod and encrypted at rest with a per-pod salt.
  • No public sign-ups - the admin UI is gated by a per-pod login.
  • Managed TLS and a public URL out of the box.
  • Daily backups of the gateway database, so your keys and spend history survive.

You get the admin login and master key by email the moment it boots. From there you add providers (or set OPENAI_API_KEY and friends with one command), mint virtual keys for your team, and point your apps at the pod.

It runs on the Grow plan at $15/mo (2 vCPU, 4 GB RAM, 50 GB), which has real headroom for production traffic.

Deploy It

Deploy it in one click:

Deploy LiteLLM on InstaPods

That opens the create screen with LiteLLM already selected on the Grow plan. It boots from a pre-baked image, so the gateway and its PostgreSQL are running by the time the page finishes loading, and the admin login and master key land in your inbox. If you want the full spec sheet and pricing first, the LiteLLM app page has it.

If you are weighing it against the managed option, the full side-by-side is here: LiteLLM vs OpenRouter.

If you are already self-hosting n8n (and if you are weighing Cloud against self-hosting, here is what n8n actually costs) or running agents on InstaPods, this is the piece that ties the stack together: one gateway, your keys, your data, one bill.

Keep reading

  1. Claude Design to Website: Host the Export on Your Own DomainPut a Claude Design export on your own domain. Why the .zip shows a 403 or 404 on most hosts, the fix, and when Send to Netlify or Vercel is the better pick.8 min
  2. How to Publish a Claude Artifact: 3 Ways Compared (2026)Publish a Claude artifact in 3 clicks, or use the new Share button. Which one you get, who can open the link, and the unpublish trap to avoid.7 min
  3. What is a claude.ai/public/artifacts URL? (2026 guide)A claude.ai/public/artifacts link is a published Claude artifact anyone can open without an account. What it is, what it can't do, and why previews break.13 min