πΊπΈ USA Β· LiteLLM
Status: π© COMPLETE π¦ LIVING Last updated: 2026-06-26 Plain-English tagline: Open-source Python library + self-hosted proxy that lets you call any AI provider (OpenAI, Anthropic, Google, Bedrock, Vertex, Together, 100+ others) using the OpenAI API format. The Swiss Army knife of multi-provider AI.
Front-matter facts
| Field | Value |
|---|---|
| Vendor | BerriAI (USA) β open-source maintained |
| Country / origin | πΊπΈ USA |
| Recommended for Australian users? | β Yes β open-source, self-hostable, no geographic restrictions |
| Privacy summary | LiteLLM itself sends nothing β proxies to your chosen provider; self-hosted = full control |
| Free tier | LiteLLM library + proxy are free (MIT license); pay your AI providers |
| Paid tiers | None for LiteLLM itself; LiteLLM Enterprise (managed service) quoted |
| First released | 2023 |
| Last reviewed | 2026-06-26 |
| Official site | https://litellm.ai |
What it is
LiteLLM is an open-source Python library + self-hostable proxy server that gives you a unified interface to 100+ AI providers using the OpenAI API format. Instead of writing different code for OpenAI / Anthropic / Google / Bedrock / Vertex / Together / etc., you write OpenAI-style code; LiteLLM translates.
Two modes:
- Python library β
import litellm, drop-in for OpenAI SDK - Proxy server β self-host a proxy; configure providers; your apps call the proxy
Use cases:
- Multi-provider applications β use Claude / GPT / Gemini interchangeably
- Vendor portability β write code thatβs not locked to one provider
- Cost / spend tracking across providers in one place
- Caching to reduce duplicate requests
- Rate limiting at the proxy level
- Self-hosted observability + control (vs SaaS aggregators)
Differs from OpenRouter (SaaS aggregator):
- LiteLLM = self-hosted / library β you control everything
- OpenRouter = hosted SaaS β convenience but data flows through OpenRouter
What youβd use it for
- Multi-provider apps without SaaS dependency
- Enterprise wanting full self-hosted control over AI routing
- Cost / spend tracking in one dashboard
- A/B testing providers
- Fallback / load balancing across providers
- Compliance use cases where SaaS aggregators are unacceptable
- Self-hosted enterprise AI gateway
How to use
As Python library
pip install litellm- Set provider API keys as env vars (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)
- Use OpenAI-format calls:
from litellm import completion response = completion( model="anthropic/claude-sonnet-4-6", # or "openai/gpt-5", "vertex_ai/gemini-3-pro", etc. messages=[{"role": "user", "content": "Hello"}] )
As self-hosted proxy
- Deploy LiteLLM proxy (Docker / k8s / VM)
- Configure providers in YAML
- Your apps call the proxy URL instead of provider URLs
- Get unified billing, logging, rate-limit, caching
What it costs
Library + open-source proxy: free (MIT)
LiteLLM Enterprise (managed)
- Quoted pricing
- SLA, dedicated support, advanced features
Underlying provider APIs
- Pay your providers (OpenAI, Anthropic, Google, etc.) at their normal rates
- No LiteLLM markup
How it compares to alternatives
| Aspect | LiteLLM | OpenRouter | Portkey | Vercel AI SDK | Cloudflare AI Gateway |
|---|---|---|---|---|---|
| Open-source | Yes (MIT) | No | No | Yes (Apache 2.0) | No |
| Self-hosted | Yes | No | Optional | Library | No |
| Multi-provider | 100+ | 100+ | Strong | Strong | Yes |
| Observability | Self-hosted | Dashboard | Best | Self-instrument | Yes |
| Caching / rate-limit | Yes | Yes | Yes | Limited | Yes |
| Cost | Free | Small markup | Tier-based | Free (library) | Free |
| Best for | Self-hosted full control | Easiest SaaS aggregator | Enterprise observability | TS/React apps | Cloudflare users |
For enterprise / compliance / βwe control our own AI infrastructure,β LiteLLM is the strongest open-source choice.
Privacy / data handling
- LiteLLM library: data goes from your code β provider directly (LiteLLM is just a translator)
- LiteLLM proxy: data goes through your self-hosted proxy β provider (you control the proxy)
- No data leaves to BerriAI servers in either mode (unless you opt into LiteLLM Enterprise hosted)
Recent changes
- 2026: Continued provider expansion; ~150 providers supported
- 2024-25: Major enterprise adoption; observability improvements
Gotchas
- Self-hosting overhead for proxy mode β Docker / deployment / monitoring
- For simple multi-provider needs, OpenRouter is easier (no infrastructure)
- For React / Next.js apps, Vercel AI SDK has cleaner DX
- Library mode is excellent for Python apps β start there
- Some provider features may not map cleanly to OpenAI format (vendor-specific features)
See also
- OpenRouter π© π¦ β SaaS alternative
- Vercel AI SDK π© π¦
- Portkey π₯
- Helicone π₯
- Cloudflare AI Gateway π© π¦
- LangChain π₯
- Claude API overview π© π¦
- OpenAI API π© π¦