LiteLLM is an open-source AI gateway for calling 100+ LLM providers in the OpenAI format. It runs as a Python SDK or self-hosted proxy with virtual keys, spend tracking, guardrails and load balancing
Overview
LiteLLM gives developers and platform teams a single interface for calling more than 100 LLM providers, including OpenAI, Anthropic, Gemini, Bedrock, Azure, Vertex AI, vLLM and Nvidia NIM. Requests use the OpenAI format, so switching providers does not require rewriting application code. It covers endpoints such as chat completions, responses, embeddings, images, audio, batches and rerank.
It can be used in two ways. The Python SDK is imported directly into application code, and a separate litellm-core distribution offers the same API without the proxy, CLI or dashboard. The AI Gateway (proxy server) is a central service for a team or organization. It adds virtual keys, SSO, per-team and per-key budgets and rate limits, spend tracking, guardrails, load balancing, fallbacks, logging and an admin dashboard.
Beyond LLM calls, the gateway can front MCP servers and A2A agents, so tools and agents are reached through the same keys and access controls. An auto-router can choose a model for each prompt. The SDK can also route Claude Code, Codex, OpenCode and other agent harnesses through the gateway, and it has helpers for evaluating agents.
LiteLLM is open source and self-hosted, including in air-gapped setups, and also offers a hosted proxy and an enterprise tier. P95 latency is 8ms at 1k requests per second, and its core includes Rust components.
Key features
- Unified OpenAI-format API for 100+ providers
- Python SDK and proxy server
- Virtual keys with budgets and rate limits
- Spend tracking per team, key and tag
- Guardrails such as PII masking and prompt-injection checks
- Load balancing and fallbacks
- MCP gateway and A2A agent gateway
- Admin dashboard with SSO, audit logs and request logs
Use cases
- Central LLM gateway for an organization
- Swapping model providers without code changes
- Tracking and capping LLM spend per team
- Exposing MCP servers and agents through one endpoint
- Routing coding agents through a managed gateway
Does the same job as
LiteLLM doesn't name these products itself, but its own description shows it does the same job.