> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LiteLLM Proxy

> Route PraisonAI agents through a self-hosted LiteLLM Proxy gateway

## Environment Variables

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import os
from praisonaiagents import Agent

os.environ["LITELLM_PROXY_BASE_URL"] = "http://localhost:4000"
os.environ["LITELLM_PROXY_API_KEY"] = "your-proxy-key"

agent = Agent(
    name="Proxy Agent",
    llm="litellm-proxy/gpt-4",
)
```

Aliases: `litellm-proxy`, `llm-proxy`, `litellm-gateway`. Model IDs are passed through unchanged (no prefix added).

## Python

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# export LITELLM_PROXY_BASE_URL=http://localhost:4000
# export LITELLM_PROXY_API_KEY=your-key
from praisonaiagents import Agent

agent = Agent(
    instructions="You are a helpful assistant",
    llm="llm-proxy/gpt-4o",
)
agent.start("Summarise LiteLLM Proxy benefits")
```

## Self-Hosted vs Cloud

| Deployment    | `LITELLM_PROXY_BASE_URL`   |
| ------------- | -------------------------- |
| Local dev     | `http://localhost:4000`    |
| Docker / k8s  | Your service URL           |
| LiteLLM cloud | Provider-supplied endpoint |

<Note>
  For programmatic configuration, custom headers, and multi-gateway patterns, see [LLM Gateways](/docs/features/llm-gateways).
</Note>
