---
title: "LiteLLM AI Gateway"
url: "/docs/simple_proxy"
canonical_url: "https://docs.litellm.ai/docs/simple_proxy"
type: "docs"
last_updated: "2026-10-10"
summary: "The LiteLLM AI Gateway is a self-hosted server that gives your applications one OpenAI-compatible endpoint for 100+ LLM providers, MCP tools, and A2A agents."
related:
  - "/docs/agent_resources"
  - "/docs/proxy/docker_quick_start"
---
# LiteLLM AI Gateway

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


The LiteLLM AI Gateway is a self-hosted server. It gives your applications one OpenAI-compatible endpoint for 100+ LLM providers, MCP tools, and A2A agents.

Your applications send requests to the gateway. The gateway sends each request to the provider of the model. Then the gateway sends the response back to your application in the OpenAI format. If a client can use the OpenAI API, the client can also use the gateway. You do not change the client code.

**Start the gateway now**

macOS and Linux:

```bash
curl -fsSL https://raw.githubusercontent.com/BerriAI/litellm/main/scripts/quickstart.sh | sh
```

Windows (PowerShell):

```powershell
irm https://raw.githubusercontent.com/BerriAI/litellm/main/scripts/quickstart.ps1 | iex
```

When the command completes, open the Admin UI at `http://localhost:4000/ui`. For each step, refer to the [Quickstart](/docs/proxy/docker_quick_start).

## What the gateway does

- **Access control.** Give each user, team, and project a virtual key. Each key has its models, budgets, and rate limits.
- **Spend tracking.** The gateway records the cost of each request. You can see the spend for each key, team, user, and tag.
- **Reliability.** Load balancing, fallbacks, and retries move traffic between deployments when a provider has a problem.
- **Guardrails.** Apply content filters, PII masking, and policies to requests and responses.
- **Logging.** Send logs and metrics to Langfuse, Datadog, OpenTelemetry, Prometheus, and other tools.
- **Admin UI.** Add models, add keys, and look at spend and logs in a browser.
- **MCP and agents.** The same gateway also gives access to [MCP tools](/docs/mcp) and [A2A agents](/docs/a2a). It uses the same keys and spend records.

## Set up the gateway

The pages in this section follow the steps of a new deployment. Do the steps in the table that follows:

| Step | What you do | Start here |
|---|---|---|
| 1. Deploy | Start the gateway with Docker, Helm, or Terraform. Connect a Postgres database. | [Quickstart](/docs/proxy/docker_quick_start), [Production deployment](/docs/proxy/deploy) |
| 2. Add models and providers | Add the models that your users can call. Add MCP tools and agents if necessary. | [Model management](/docs/proxy/model_management), [Providers](/docs/providers) |
| 3. Connect clients | Set the gateway URL and a virtual key in your applications and coding tools. | [Client setup](/docs/proxy/client_setup/overview) |
| 4. Set up authentication | Add virtual keys. Connect your identity provider for single sign-on. | [Virtual keys](/docs/proxy/virtual_keys), [Admin UI SSO](/docs/proxy/admin_ui_sso) |
| 5. Track spend and set budgets | Assign costs to teams and projects. Set budgets and rate limits. | [Spend tracking](/docs/proxy/cost_tracking), [Budgets](/docs/proxy/users) |

## Call the gateway

After you start the gateway, use the OpenAI client with the gateway URL and a virtual key:

```python
import openai

client = openai.OpenAI(api_key="sk-your-virtual-key", base_url="http://localhost:4000")

response = client.chat.completions.create(
    model="gpt-5.6-luna",
    messages=[{"role": "user", "content": "Write a short poem"}],
)
print(response.choices[0].message.content)
```

## Admin UI

The Admin UI is part of the gateway. Use it to set up and monitor the gateway in a browser:

**Models**

Add models from each provider. The table shows the price of input and output tokens for each model.

[Image: Models page with five models from OpenAI, Anthropic, and Google, and the token price of each model]

**Virtual keys**

Give each application or person a virtual key. Each key has a team, a budget, and a list of models.

[Image: Virtual Keys page with five keys, the team of each key, and the spend of each key against its budget]

**MCP servers**

Add MCP servers. Agents use the tools of these servers through the gateway, with the same virtual keys.

[Image: MCP Servers page with two connected MCP servers and their health status]

**Guardrails**

Add guardrails that examine requests before the model receives them, for example PII masking.

[Image: Guardrails page with a PII masking guardrail and a harmful content guardrail]

**Usage**

Look at the spend, the requests, and the tokens for all teams, keys, and models.

[Image: Usage page with total spend, request counts, token counts, and a daily spend chart]

**Logs**

Find each request with its cost, duration, team, key, and model.

[Image: Request Logs page with a table of requests, the cost of each request, and the team and key that sent it]

## Gateway or Python SDK

Use the gateway if more than one application or person sends requests to LLMs. Also use the gateway if virtual keys, spend tracking, logs in one location, or guardrails are necessary. Use the [Python SDK](/docs/python_sdk) if you send requests from one Python application and these controls are not necessary.

## Next steps

- [Quickstart](https://docs.litellm.ai/docs/proxy/docker_quick_start): Start the gateway and send your first request in approximately five minutes.
- [Production deployment](https://docs.litellm.ai/docs/proxy/deploy): Deploy with Helm or Terraform, and size the database and Redis.
- [Client setup](https://docs.litellm.ai/docs/proxy/client_setup/overview): Connect Claude Code, Codex, and other clients to the gateway.
- [MCP Gateway](https://docs.litellm.ai/docs/mcp): Give agents access to MCP tools through one endpoint.
- [Agent Gateway](https://docs.litellm.ai/docs/a2a): Add and call A2A agents through the gateway.
- [Enterprise](https://docs.litellm.ai/docs/enterprise): SSO, audit logs, and support for production deployments.

## Related pages

- [Agent resources](https://docs.litellm.ai/docs/agent_resources.md)
- [Quickstart](https://docs.litellm.ai/docs/proxy/docker_quick_start.md)
