Key Capabilities
Drop-In OpenAI Replacement
import litellm
litellm.completion(model="gpt-4o", messages=[...])
litellm.completion(model="claude-sonnet-4-20250514", messages=[...])
litellm.completion(model="gemini/gemini-pro", messages=[...])
litellm.completion(model="bedrock/meta.llama3-70b", messages=[...])Proxy Server (Gateway Mode)
litellm --model gpt-4 --port 8000Point any OpenAI SDK client to http://localhost:8000 — works with Cursor, Continue, and other AI tools.
Load Balancing & Fallbacks
from litellm import Router
router = Router(model_list=[
{"model_name": "gpt-4", "litellm_params": {"model": "azure/gpt-4", "api_key": "..."}},
{"model_name": "gpt-4", "litellm_params": {"model": "openai/gpt-4", "api_key": "..."}},
])
response = router.completion(model="gpt-4", messages=[...]) # auto-failoverSpend Tracking & Budget Controls
Track token usage and costs per user, team, or API key with built-in PostgreSQL logging.
Key Stats
- 18,000+ GitHub stars
- 100+ supported LLM providers
- 500+ supported models
- OpenAI-compatible API spec
- Used by 5,000+ companies
FAQ
Q: What is LiteLLM? A: LiteLLM is a unified Python SDK and proxy server that lets you call 100+ LLM providers using a single OpenAI-compatible API interface.
Q: Is LiteLLM free? A: Yes, the open-source version is free under MIT license. Enterprise features available through BerriAI.
Q: Can LiteLLM replace my OpenAI SDK calls? A: Yes, it is a drop-in replacement. Change one import and switch between any LLM provider without modifying code.