LogoTrendingDevTools
icon of LiteLLM

LiteLLM

LiteLLM is an open-source, self-hosted AI gateway and Python SDK that calls 100+ LLM providers in OpenAI format, with keys, budgets and logging.

Visit Website

Introduction

What is LiteLLM?

LiteLLM is an open-source project by BerriAI that lets you call many large language model providers using the OpenAI API format. It comes in two forms: a Python SDK for calling models from code, and a proxy server (AI gateway) that teams deploy centrally to manage access, spend and routing for all their LLM traffic. Switching from one provider to another becomes a configuration change instead of a code rewrite.

Key features

  • One API for many providers: OpenAI, Anthropic, Google, AWS Bedrock, Azure, Mistral, local models and more.
  • OpenAI-compatible proxy: existing OpenAI clients work by changing the base URL.
  • Virtual keys and budgets: issue keys per team or project with spend limits and rate limits.
  • Routing and fallbacks: load-balance across deployments and fall back when a provider fails.
  • Cost tracking: log usage and spend per key, user and model.
  • Observability integrations: send logs to tools such as Langfuse and others.
  • Admin UI: manage models, keys and teams from a dashboard.

Who is it for?

LiteLLM is for platform teams, ML engineers and developers who use more than one model provider, or who need central control over LLM access and costs within an organization.

Use cases

  • A company-wide LLM gateway with per-team budgets
  • Swapping models without changing application code
  • Automatic failover between providers
  • Tracking AI spend across projects
  • Serving local and cloud models behind one endpoint

Pricing

The open-source SDK and proxy are free to self-host. BerriAI also offers an enterprise edition with additional features and support; see the official LiteLLM site for current enterprise terms.

LiteLLM releases very frequently; v1.106.4 was published on October 25, 2026 (release). New models and providers are typically added within days of launch, which is a key reason for its popularity.

Getting started

  1. For the SDK: pip install litellm, then call litellm.completion(model="...", messages=[...]).
  2. For the proxy: run the official Docker image with a config.yaml listing your models.
  3. Set provider API keys as environment variables.
  4. Point your OpenAI client at the proxy URL with a LiteLLM virtual key.
  5. Read the LiteLLM docs for budgets, routing and logging.

Alternatives

OpenRouter is a hosted router offering many models through one API and billing account. The AI SDK provides a unified TypeScript interface at the application level. For observability alongside a gateway, see Langfuse, Arize Phoenix and LangSmith. To run models locally behind LiteLLM, try Ollama.

FAQ

Is LiteLLM free? Yes, the open-source version is free to self-host. An enterprise edition is available for extra features and support.

What is the LiteLLM proxy? It is a self-hosted gateway that exposes an OpenAI-compatible API and forwards requests to many providers with keys, budgets and logging.

Does LiteLLM work with the OpenAI SDK? Yes. Point the OpenAI client's base URL at your LiteLLM proxy.

Can LiteLLM use local models? Yes, for example models served through Ollama or vLLM.

What is the difference between LiteLLM and OpenRouter? LiteLLM is software you host and use with your own provider keys; OpenRouter is a hosted service with its own billing.

ℹ️

Affiliate Disclosure: TrendingDevTools may earn a commission if you sign up through links on this page, at no extra cost to you.

Information

Are you the creator of LiteLLM?

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates