Skip to content

LiteLLM

LiteLLM is an open-source library and proxy that simplifies calling various large language models with a unified API.

Freemium · Web, API

stork
I am a flat drawing.
One flat drawing and one typed sentence.
This drawing was never animated.
A photo, a cartoon, a painting or a 3D character. From 10 cents a minute. Free to try.
Make a photo talkDevelopers: there is an API

Pricing Plans

Free Tier$0 / monthly

140+ LLM provider integrations · Langfuse, Arize Phoenix, LangSmith · Virtual keys, budgets, and teams · Load balancing

EnterpriseCustom Pricing / annual

Enterprise support · Custom SLAs · JWT auth, SSO · Audit logs

What is LiteLLM?

LiteLLM is an AI gateway tool developed by BerriAI that enables individual developers, small teams, and large companies to simplify interactions with various Large Language Models (LLMs) by providing a unified interface. It functions as both a Python SDK and a self-hosted AI gateway (proxy server), allowing developers to call over 100 LLM APIs using a single, OpenAI-compatible interface. LiteLLM normalizes APIs across providers like OpenAI, Anthropic, Google Gemini, Mistral, Cohere, AWS Bedrock, and local models via Ollama, accelerating development and reducing vendor lock-in. The tool also offers features for cost optimization, centralized management, enhanced reliability through fallbacks, and security governance with virtual key management and audit logs. As of mid-2026, LiteLLM has garnered over 40,000 GitHub stars and 240 million Docker pulls.

Key Features of LiteLLM

LiteLLM provides a comprehensive suite of features designed to streamline LLM integration and management for developers and organizations. These features address challenges related to multi-provider access, cost control, operational reliability, and security.

  • Unified OpenAI-compatible API for over 100 LLM providers and 1,800 models.
  • Centralized LLM gateway/proxy for managing API traffic, keys, and monitoring usage.
  • Cost optimization features including budget controls, lowest-cost routing, prompt compression, and caching.
  • Automatic fallbacks to alternative providers or models for enhanced reliability.
  • Standardized error handling, retries, and timeouts across all integrated LLMs.
  • Virtual key management, rate limiting, access control, and audit logs for security and governance.
  • Detailed usage tracking and budgeting capabilities across all LLM expenditures.
  • Air-gapped deployment options for data privacy and compliance requirements.
  • Support for tool-result guardrails and auto-router deployment affinity (v1.97.0).

Who Should Use LiteLLM?

LiteLLM is designed for a broad range of users, from individual developers to large enterprises, who require efficient and flexible interaction with multiple Large Language Models. Its capabilities are particularly beneficial for teams focused on AI development, platform management, and cost-effective LLM deployment.

  • Individual developers and small teams seeking to experiment with or integrate various LLMs without extensive code changes.
  • Generative AI teams requiring a unified API to switch between different LLM providers and models for application development.
  • Platform teams managing AI integrations across an organization, needing centralized control over API traffic, keys, and monitoring.
  • Large companies prioritizing data privacy and compliance, utilizing self-hosted deployments for sensitive data or offline use cases.
  • Organizations focused on cost optimization, leveraging LiteLLM's features for budget controls, lowest-cost routing, and usage tracking across multiple LLM providers.

How to Use LiteLLM

LiteLLM can be utilized as a Python SDK or deployed as a self-hosted proxy server to manage LLM interactions. Getting started typically involves installation and configuration of API keys for desired LLM providers.

  1. Install LiteLLM via pip: pip install litellm.
  2. Configure API keys for your chosen LLM providers (e.g., OpenAI, Anthropic) as environment variables or within a configuration file.
  3. Import LiteLLM in your Python application and use the completion() function with a unified syntax, specifying the desired model (e.g., model="gpt-4", model="claude-3-opus-20240229").
  4. For proxy deployment, use Docker to run the LiteLLM proxy server, exposing it on a specified port.
  5. Direct API requests to the LiteLLM proxy endpoint, which then routes them to the appropriate LLM provider based on configuration.
  6. Monitor usage, costs, and performance through the LiteLLM dashboard or integrated logging.

LiteLLM Pricing & Plans

LiteLLM operates on a freemium model, offering a robust open-source core for self-hosting and an Enterprise tier for advanced organizational needs. The open-source version does not impose per-token markups, allowing users to pay LLM providers directly at their published rates. The Enterprise tier provides custom pricing tailored to specific organizational requirements.

  • Free Tier: $0 (monthly) - Includes the open-source library and proxy for self-hosting.
  • Enterprise: Custom Pricing (annual) - Offers advanced features, support, and compliance for large organizations.

Pros

  • Unified API for over 100 LLM providers, simplifying integration and reducing vendor lock-in.
  • Open-source core with an MIT license, offering flexibility and no per-token markup.
  • Comprehensive cost optimization features, including budget controls, lowest-cost routing, and usage tracking.
  • Enhanced reliability through automatic fallbacks, retries, and standardized error handling.
  • Strong compliance posture with SOC 2 Type I and ISO 27001 certifications, and HIPAA policy templates.
  • Self-hosting capability for data privacy, compliance, and air-gapped deployments.

Cons

  • Operational complexity and hidden costs associated with self-hosting in production environments.
  • Reported bugs, particularly with enterprise UI features like budget updates and API issues.
  • Performance limitations due to its Python architecture, especially at high requests per second (RPS).
  • Does not offer a Business Associate Agreement (BAA) as a vendor, requiring users to manage their own HIPAA infrastructure.
  • Supply chain attack in March/August 2026 compromised PyPI packages, highlighting security risks in the open-source ecosystem.

LiteLLM vs Competitors

LiteLLM holds a prominent position in the LLM gateway market, particularly due to its extensive provider support and open-source nature. However, it competes with several alternatives that offer different strengths, such as performance, managed services, or specialized observability.

See every LiteLLM alternative, compared

LiteLLM

Freemium · Web, API

From the Stork blog

Enjoying this? Get one like it in your inbox each morning.

one email a day · unsubscribe in two clicks · no third-party tracking