Try describing what you need:

LiteLLM logo

LiteLLM

★ 62.8k
MIT LicenseOpen Core — Some Features Paid3 Containers — 3 containers — light hosting footprintPackage · BinaryNeeds Postgres3 documented maintainers

About

LiteLLM is an open source AI gateway and Python SDK designed for teams that need a single interface to work with many LLM providers. It abstracts provider-specific SDKs and request formats so...

Community Ratings

No ratings yet
LiteLLM AI Gateway

Features

  • Unified API for 100+ LLMs
  • OpenAI-compatible requests
  • Python SDK
  • AI Gateway / proxy server
  • Virtual keys
  • Spend tracking
  • Guardrails
  • Load balancing
  • Admin dashboard
  • A2A agent support

Details

Last Updated
Nov 6, 2026
Created
Jul 27, 2023
Install Methods
package-managerbinary
Requirements
PythonLLM provider API keys
Default Port
4000AI Gateway / proxy server
Authentication
local
API
REST
Privacy & Independence
Cloud: Optional
User Model
Multi-User
Deployment

Deployment: Docker Compose ✓3 Containers — light hosting footprintRuns as 3 containers

Run LiteLLM yourself

Pick how much you want to manage.

4 more ways to host

Some links earn us a commission. netcup pays us one and is our preferred VPS host.

Is this your project? Sponsor a listing

Run LiteLLM with Docker Compose

Compose file from the LiteLLM project repository.

3 services · database: postgres · infra: postgres · 1 unclassified (prometheus)

no resource limits declared

needs persistent storage (3 volumes)

docker-compose.yml · @ e1717c5 · scanned Nov 3, 2026

services:
  litellm:
    build:
      context: .
      args:
        target: runtime
    image: docker.litellm.ai/berriai/litellm:main-stable
    #########################################
    ## Uncomment these lines to start proxy with a config.yaml file ##
    # volumes:
    #  - ./config.yaml:/app/config.yaml
    # command:
    #  - "--config=/app/config.yaml"
    ##############################################
    ports:
      - "4000:4000" # Map the container port to the host, change the host port if necessary
    environment:
      DATABASE_URL: "postgresql://llmproxy:dbpassword9090@db:5432/litellm"
      # Optional: route read-only queries (find_*, count, group_by, query_raw/_first)
      # to a separate reader endpoint, e.g. an Aurora reader. Leave unset for
      # single-DB deployments. With IAM_TOKEN_DB_AUTH enabled, the reader URL
      # is auto-refreshed alongside the writer.
      # DATABASE_URL_READ_REPLICA: "postgresql://llmproxy:dbpassword9090@db-reader:5432/litellm"
      STORE_MODEL_IN_DB: "True" # allows adding models to proxy via UI
    env_file:
      - .env # Load local .env file
    depends_on:
      - db  # Indicates that this service depends on the 'db' service, ensuring 'db' starts first
    healthcheck:  # Defines the health check configuration for the container
      test:
        - CMD-SHELL
        - python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:4000/health/liveliness')"  # Command to execute for health check
      interval: 30s  # Perform health check every 30 seconds
      timeout: 10s   # Health check command times out after 10 seconds
      retries: 3     # Retry up to 3 times if health check fails
      start_period: 40s  # Wait 40 seconds after container start before beginning health checks

  db:
    image: postgres:16
    restart: always
    container_name: litellm_db
    environment:
      POSTGRES_DB: litellm
      POSTGRES_USER: llmproxy
      POSTGRES_PASSWORD: dbpassword9090
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data # Persists Postgres data across container restarts
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -d litellm -U llmproxy"]
      interval: 1s
      timeout: 5s
      retries: 10

  prometheus:
    image: prom/prometheus
    volumes:
      - prometheus_data:/prometheus
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"
    command:
      - "--config.file=/etc/prometheus/prometheus.yml"
      - "--storage.tsdb.path=/prometheus"
      - "--storage.tsdb.retention.time=15d"
    restart: always

volumes:
  prometheus_data:
    driver: local
  postgres_data:
    name: litellm_postgres_data # Named volume for Postgres data persistence

This file may be out of date. Check the LiteLLM documentation for current setup steps.

Track your self-hosted stack

Bookmark software to try, rate tools you've used, and keep your collection in one place.

Metadata extracted from README on Aug 7, 2026

Alternatives to LiteLLM

GoModel logo

GoModel

1.3k
GoModel is an AI gateway for routing, caching, tracking, and controlling access to LLM requests through an OpenAI- and Anthropic-compatible API.
Artificial IntelligenceGenerative AIAPI Management+4
6 ContainersOpen Core
Details
Kong logo

Kong

44.4k
Kong Gateway is a cloud-native API, LLM, and MCP gateway for proxying, routing, load balancing, authentication, and plugin-based traffic control.
API ManagementArtificial IntelligencePermissive License+3
2 ContainersOpen Core
Details
Manifest logo

Manifest

7.6k
Manifest is an OpenClaw plugin that routes requests to the most cost-effective LLM and provides a dashboard for tracking usage and costs.
Low Code DevelopmentArtificial IntelligencePermissive License+4
Telemetry: Opt-Out
Details
LLM logo

LLM

12.7k
A CLI tool and Python library for interacting with large language models from remote APIs or locally installed models.
Artificial IntelligenceLocal LLMsAI Tooling+1
Details
private-gpt logo

private-gpt

57.6k
PrivateGPT is an open-source API layer that turns local models into production AI applications.
Artificial IntelligenceAI RAG SystemsPermissive License+2
Details

Related Software

Dify.ai logo

Dify.ai

160.5k
An open-source platform for building, testing, and operating LLM-powered applications with workflows, RAG, agents, and observability.
Low Code DevelopmentArtificial IntelligencePermissive License+6
36 ContainersOpen CoreFOSS with Issues
Details
Langfuse logo

Langfuse

37.1k
Langfuse is an open source LLM engineering platform for teams to develop, monitor, evaluate, and debug AI applications.
IDE ToolsArtificial IntelligencePermissive License+5
6 ContainersFOSS with Issues
Details
Text Generation Inference logo

Text Generation Inference

10.9k
A Rust, Python, and gRPC server for deploying and serving large language models with high-performance text generation.
Inference ServingArtificial IntelligenceLocal LLMs+1
2 Containers
Details
vLLM logo

vLLM

96.4k
A fast, easy-to-use library for LLM inference and serving.
Inference ServingLocal LLMsAI Tooling
2 Containers
Details
Ollama logo

Ollama

186.0k
Ollama is a tool for running open models locally and exposing them through a REST API for apps, agents, and integrations.
Artificial IntelligenceLocal LLMsGenerative AI+3
Details
LocalAI logo

LocalAI

50.2k
LocalAI is an open-source AI engine for running LLMs and other model types locally on a wide range of hardware, with drop-in API compatibility for several popular AI APIs.
Generative AIPermissive LicenseArtificial Intelligence+4
Single Container
Details
LLM Harbor logo

LLM Harbor

3.3k
Harbor is a CLI and companion app for spinning up and managing a local LLM stack with pre-wired services like Open WebUI, Ollama, llama.cpp, SearXNG, Speaches, and ComfyUI.
Artificial IntelligenceLocal LLMsAI Tooling+5
Details
onecli logo

onecli

3.6k
OneCLI is an open-source gateway that sits between AI agents and external services to inject and manage API credentials securely.
AI AgentsSecret ManagementModel Context Protocol+1
2 Containers
Details
Agenta logo

Agenta

4.9k
Agenta is an open-source LLMOps platform for building production-grade LLM applications with prompt management, evaluation, and observability.
Artificial IntelligenceGenerative AIPermissive License+4
Details
Composio logo

Composio

30.9k
Composio SDK provides TypeScript and Python libraries for integrating AI agents with external apps and services.
API ManagementAI AgentsAutomation Tools+2
Cloud Required
Details
agent-vault logo

agent-vault

2.5k
An open-source HTTP credential proxy and vault that brokers API credentials for AI agents without exposing the secrets directly to the agents.
Secret ManagementProxy ServersSelf Hosting Solutions+2
2 Containers
Details
Pi logo

Pi

120.3k
Pi Agent Harness is a mono-repo for a self-extensible coding agent, including an interactive coding agent CLI, agent runtime, and a unified multi-provider LLM API.
AI HarnessAI AgentsAI Coding Assistant+1
Details