Skip to main content

LiteLLM

Python SDK and proxy to call 100+ LLMs with one interface

Inference & HostingFreeOpen source

LiteLLM is an open-source Python library and proxy server that provides a unified OpenAI-compatible interface for 100+ LLM providers. Call Anthropic Claude, Google Gemini, Azure OpenAI, Cohere, Groq, and others with the same `completion()` function. The LiteLLM proxy adds load balancing, rate limiting, and cost tracking.

Key specs
63,151 GitHub stars source
as of 2026-11-12

What we know

Open sourceYessource, checked 2026-11-30
PricingFreefrom our original listing, not yet re-checked
GitHub stars64,172source, checked 2026-11-30

Why it matters

  • Single completion() function that works with 100+ providers — swap models by changing one string, not rewriting your code.
  • LiteLLM Proxy turns any codebase that uses the OpenAI SDK into one that can use Anthropic, Gemini, or any other provider instantly.
  • Cost tracking and budget limits across all providers in one place — essential for teams using multiple LLMs.
  • The de facto standard for building multi-provider LLM applications and agent frameworks in Python.

Key capabilities

  • Unified completion API: litellm.completion("anthropic/claude-3-5-sonnet", messages=[...]) — same interface for all providers.
  • 100+ provider support: OpenAI, Anthropic, Google Gemini, Azure OpenAI, AWS Bedrock, Cohere, Groq, Together AI, Replicate, Ollama, and more.
  • Input/output normalization: Translates between provider-specific formats automatically.
  • Streaming support: Unified streaming interface across all providers that support it.
  • Async support: litellm.acompletion() for asyncio-based applications.
  • LiteLLM Proxy: Self-hosted OpenAI-compatible server with load balancing, fallbacks, rate limiting, and virtual API keys.
  • Cost calculation: Built-in cost tracking per model with litellm.completion_cost().
  • Error handling: Consistent error types and retry logic across providers.
  • Embedding support: litellm.embedding() for unified access to embedding models.

Technical notes

  • Language: Python 3.8+; pip install litellm
  • License: MIT — fully open source at github.com/BerriAI/litellm
  • Proxy deployment: Docker (docker pull ghcr.io/berriai/litellm); config via YAML
  • OpenAI compatibility: Full OpenAI API compatibility — any OpenAI SDK client works with LiteLLM Proxy
  • LiteLLM Enterprise: Custom pricing — adds SSO, audit logs, HIPAA compliance, dedicated support
  • Providers: 100+ including all major US and international LLM API providers
  • Founded: 2023 by Krish Dholakia and Ishaan Jaffer; San Francisco; YC backed

Ideal for

  • Python developers building LLM applications who want provider flexibility without rewriting their code.
  • Teams running a self-hosted LLM proxy to add load balancing, rate limiting, and cost controls on top of their LLM API usage.
  • Companies using multiple LLM providers (e.g., Claude for quality, Groq for speed) and wanting a unified interface.

Not ideal for

  • Teams who want a hosted multi-LLM API without self-hosting infrastructure — use OpenRouter instead.
  • Non-Python applications — LiteLLM is a Python library; the proxy has REST API compatibility but needs DevOps.
  • Simple single-provider setups — just use the official SDK; LiteLLM adds complexity if you only use one provider.

See also

  • OpenRouter — Hosted API service for 100+ LLMs — simpler, no self-hosting.
  • Portkey — AI gateway with LLM routing, fallbacks, and observability as a service.
  • LangChain — LLM framework that integrates LiteLLM for multi-provider support.

FAQ

What is LiteLLM?

LiteLLM is a Python library that provides a single `litellm.completion()` function that works with 100+ LLM APIs — OpenAI, Anthropic, Gemini, Azure, Cohere, Hugging Face, Ollama, and many more. It handles input/output normalization so you don't need to change your code when switching between providers.

Is LiteLLM free?

LiteLLM is fully open source under MIT license — the Python library is completely free. LiteLLM Proxy is also free for self-hosting. LiteLLM Enterprise adds SSO, audit logs, and advanced features at custom pricing.

What is the LiteLLM Proxy?

The LiteLLM Proxy is a self-hosted OpenAI-compatible server that routes requests to 100+ LLM providers. Run it in Docker, configure your models, and any OpenAI SDK pointing to it will work with any provider. Features include virtual API keys, load balancing across multiple endpoints, fallbacks, rate limiting, and spend tracking.

How does LiteLLM compare to OpenRouter?

Both provide access to multiple LLMs through one interface. OpenRouter is a hosted API service where you pay per token. LiteLLM is a library and self-hostable proxy where you use your own API keys from each provider. LiteLLM gives more control and potentially lower cost; OpenRouter is simpler with no infrastructure to manage.

Alternatives

Is your tool an alternative to LiteLLM? Sponsor this spot for 30 days, marked Sponsored.

Integrations

None listed.

Built on

None listed.

Good for these tasks

For the team behind LiteLLM

Growth plan: from $399 a month

SEO, AI search (how ChatGPT, Perplexity and Google describe LiteLLM), UX, CRO and support from one account manager, with a monthly report. Includes a Featured launch on db.fyi. Starts with a free audit.

Founding offer: $299 a month for your first 3 months, plus a free case study.

Get a free audit

Listed 2026-02-28 · updated 2026-09-11