LiteLLM: What the Open-Source LLM Gateway Does
LiteLLM is free, MIT-licensed software that puts 100+ AI models behind one OpenAI-style API, with budgets and logging. You host it and bring your own keys.
In this story (7 sections)
LiteLLM is free, open-source software that lets one app talk to 100+ AI models through a single OpenAI-style API, with spend limits and logs on top. You run it yourself and plug in your own provider keys, so your bill is the model providers plus whatever your server costs.
Everything below is as of December 3, 2026, from LiteLLM's docs, GitHub repo, PyPI page and Enterprise page.
What LiteLLM is: one adapter, many plugs
Every AI lab ships its own API with its own quirks. LiteLLM is the universal travel adapter. Its docs call it a "drop-in replacement for the OpenAI client" that reaches 100+ LLMs, naming OpenAI, Anthropic, Vertex AI and Bedrock. The GitHub repo adds Gemini and Azure to the list and describes the project as a Rust core with a Python SDK that calls those APIs in OpenAI format or the provider's native format.
In plain terms: you write your code once against the OpenAI-style interface, then switch from one lab's model to another by changing a name, not rewriting the app.
It's popular: the repo showed 64.4k stars and 13.8k forks on December 3, 2026.
SDK vs proxy: which LiteLLM do you need
Most confusion around "litellm" comes from it being two things with one name.
| Python SDK | Gateway (proxy) | |
|---|---|---|
| What it is | A library inside your own Python code | A server that sits between your apps and the providers |
| Who it's for | One developer, one project | Teams sharing AI access across an organization |
| Install | pip install litellm or uv add litellm |
uv tool install 'litellm[proxy]' or Docker |
| Extras | Unified calls to many providers | Virtual keys, budgets, spend tracking, logging, guardrails, caching |
Sources: PyPI, the GitHub README and the docs.
The SDK needs Python 3.10 or newer, below 3.16. PyPI also warns you to install only one SDK distribution per environment, because litellm and litellm-core share files.
The gateway is the bigger deal. LiteLLM calls it a "self-hosted gateway for platform teams managing LLM access across an organization," and any client that works with OpenAI can point at it. So a chat front end, a coding tool or a script you already have can talk to many providers through one address.
What the proxy does: budgets, keys and logs
This is the part that earns LiteLLM a spot on a server. The gateway offers:
- Virtual keys with budgets. Hand out keys with per-key, per-team and per-user budgets, instead of sharing your real provider key around the office.
- Spend tracking. Cost is tracked per key, team and user, across providers.
- Centralized logging, guardrails and caching. Guardrails include content filtering, PII masking and safety checks.
- Load balancing with fallbacks. Traffic can spread across deployments, with automatic fallbacks when one fails.
One boundary to get right. The docs cover budgets and virtual keys in the proxy; some governance features (e.g. key rotation) are Enterprise-only, as the virtual keys page flags. If you need a specific governance feature, check that page before you plan around it.
Our take: the virtual keys alone justify the setup for any group of more than two people. One leaked key with a budget cap is an annoyance. One leaked raw provider key is a bill.
Self-hosting LiteLLM with Docker
The Docker quickstart is the shortest route. Run the quickstart script, or download docker-compose.quickstart.yml and run docker compose up -d. That starts the full proxy on port 4000 plus PostgreSQL, with the API endpoints and an Admin UI at http://localhost:4000. The README recommends Docker images with the -stable tag from ghcr.io/berriai/litellm.
The database is optional for a basic setup with a config.yaml file and a master key. Virtual keys and a global max_budget both require one, so if budgets are why you came, plan on PostgreSQL.
Updates come quickly. The latest stable release on PyPI is v1.112.1, out December 2, 2026, and GitHub showed a v1.113.0-rc.1 pre-release the same day. Stick to stable builds for anything people rely on.
You still need accounts with the model providers. LiteLLM routes your requests; it doesn't sell tokens. Our OpenAI API key, Claude API pricing and Gemini API pricing guides cover getting those keys and what the tokens cost.
Is LiteLLM free? License and Enterprise
The open-source software is free to self-host. The license file puts everything outside litellm/enterprise/ under MIT. Code inside that folder falls under a separate commercial license. Your real costs are the providers' token prices and your own hosting.
Enterprise is the paid tier. The Enterprise page lists no dollar figure: it's custom pricing through a sales form. It describes the tier as everything in open-source LiteLLM plus governance, security and support, including:
- SSO/SCIM, OIDC/JWT and role-based access control
- secret managers with key rotation
- audit logs and tag spend tracking
- SOC 2 Type 2 and ISO 27001 listed
- air-gapped and multi-region options
- 24/7 support with SLAs
The listed support targets are 1 hour for Sev 0, 6 hours for Sev 1, 24 hours for Sev 2 and 3, and 72 hours for security patches.
The trial: a 30-day trial key with full Enterprise features, self-hosted, emailed instantly with no sales call. A refreshingly low-drama way to kick the tires.
Want a hosted LiteLLM you can just sign up for? The Enterprise page describes the tier as self-hosted in your own infrastructure, so check litellm.ai/enterprise for anything else.
LiteLLM vs OpenRouter
Both give you one OpenAI-style API for many models. The difference is who runs the box and who holds the keys.
| LiteLLM | OpenRouter | |
|---|---|---|
| What it is | Software you run yourself | A service you sign up for |
| Provider keys | Your own | Buy credits from OpenRouter |
| Software cost | Free (MIT), Enterprise custom | No markup on inference |
| Fees | Your hosting costs | 5.5% fee on credit purchases ($0.80 minimum), 5% for crypto |
| Budgets and keys | Virtual keys with budgets in the proxy | Spend caps on keys |
Sources: LiteLLM docs and the OpenRouter FAQ.
OpenRouter's FAQ describes itself as a proxy that sends your requests to the model provider, and you need to buy credits to use it. LiteLLM is the do-it-yourself version: no credit fee, but you own the server, the updates and the 2 a.m. outage. Our full OpenRouter guide covers its free models, privacy and plans.
Who should use LiteLLM
- Just curious about AI models: skip it. A chat app or OpenRouter gets you there with no server.
- Developer in one Python project: the SDK is a
pip installaway and saves you from juggling provider libraries. - Small team sharing AI access: run the proxy with PostgreSQL and give everyone a budgeted virtual key. This is the one we'd set up.
- Company with compliance checklists: grab the 30-day Enterprise trial key and confirm the governance features you need before talking price.
Receipts
Official pages behind this story, read Dec 3, 2026- docs.litellm.aiWhat is LiteLLM? · How does LiteLLM describe the gateway?
- github.comWhat does the GitHub repo say it is? · GitHub popularity?
- raw.githubusercontent.comWhat is the license?
- pypi.orgHow to install the SDK? · Latest release and date?
- docs.litellm.aiHow to self-host with Docker? · Is a database required?
- litellm.aiFree enterprise trial? · What does Enterprise add?
1 more receipts
- openrouter.aiHow does OpenRouter differ?
Filed under
Guides: Familiars“litellm”