Skip to main content

The most widely used open‑source AI gateway.

LiteLLM is one gateway for all your models, tools, and agents. It gives one API to 100+ LLM providers, MCP tools, and A2A agents. It controls keys and budgets, and it records the cost of each request.

Who calls
Developer
Coding agent
Your app
LiteLLM
LLM APIs
MCP tools
A2A agents
Quick Start
curl -fsSL https://raw.githubusercontent.com/BerriAI/litellm/main/scripts/quickstart.sh | sh

Why developers love LiteLLM

Python SDK

Use one Python function for 100+ LLM providers.

The completion() function uses the same arguments for OpenAI, Anthropic, Bedrock, and 100+ other providers. It always gives the result in the OpenAI format. To use a different model, you replace one string. The SDK also gives streaming, retries, fallbacks, and the cost of each call.

from litellm import completion

messages = [{"role": "user", "content": "Hello"}]

completion(model="openai/gpt-5.6-terra", messages=messages)
completion(model="anthropic/claude-sonnet-5", messages=messages)

AI Gateway

One endpoint for all models, with keys, budgets, and costs for each team.

Apps in all programming languages send requests to the gateway in the OpenAI format. Each app or person gets a virtual key with a budget and a rate limit. The gateway records each request and its cost. Your provider keys stay in the gateway.

curl http://localhost:4000/v1/chat/completions \
-H "Authorization: Bearer sk-<virtual-key>" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-5.6-terra",
"messages": [{"role": "user", "content": "Hello"}]}'

Built on the gateway

When your apps call the gateway, the same deployment can also give MCP tools and agents to your apps. It can select the correct model for each request. You can operate it from your terminal or from your coding agent.

Tools and agents

MCP Gateway

Make all MCP tools available from one endpoint.

Add MCP servers to the gateway one time. You do not connect them to each app. Select which keys and teams can use each server.

MCP serverSearch teamSupport team
GitHuballowedno access
Jiraallowedallowed
Read the guide

Agent Gateway

Send agent-to-agent calls through the gateway.

Register your A2A agents on the gateway. Each call to these agents then uses a virtual key and shows in your logs with its cost. Only the teams that you select can call these agents.

POST /a2a/support-agentsearch-teamlogged
POST /a2a/billing-agentsearch-teamnot allowed
Read the guide

Models and harnesses

Auto Router (add-on)

Send each request to the model with the lowest cost that can do the task.

Easy prompts go to a model with a lower cost. Your app stays the same.

RequestRouted to
Fix the typo in this sentencea small, cheap model
Plan a zero-downtime migrationa frontier model
Read the guide

LiteAgents (preview)

Use a different agent harness and keep your agent code.

Replace one parameter to move between Deep Agents, Pydantic AI, the Claude Agent SDK, Codex, and OpenCode. Your tools and MCP connections stay the same.

ProfileOptions(
harness="deepagents", # or "claude-sdk", "codex", "pydantic-ai"
model="my-model",
)
Read the guide

Your terminal and your agent

lite CLI

Run Claude Code and Codex through your gateway.

The lite CLI signs in to your gateway and starts the tool through it. No person uses a provider API key. Budgets, logs, and guardrails apply to each person.

lite login    # sign in to your gateway
lite claude # Claude Code, through the gateway
Read the guide

LiteAdmin MCP

Control the gateway with instructions to your agent.

Connect Claude or Codex to your gateway. Then tell the agent to create keys, add models, control teams and budgets, or find a request with an error.

YouCreate a key for the search team with a $200 monthly budget.
ClaudeDone. The key belongs to team search, with a $200 budget per month.
Read the guide

Enterprise

Single sign-on, audit logs, and admin roles for all the teams in your company.

A license key adds Enterprise features to the same gateway. These features are SSO, SCIM, audit logs of all admin changes, and admins for each team. Enterprise also gives deployment in more than one region, and the LiteLLM engineers help your team.

jane@acme.com via Oktacreated keyteam: search
raj@acme.com via Oktaraised budgetteam: support

Most-read guides