---
title: "Gateway Quickstart"
url: "/docs/learn/gateway_quickstart"
canonical_url: "https://docs.litellm.ai/docs/learn/gateway_quickstart"
type: "docs"
last_updated: "2026-10-06"
summary: "Start LiteLLM Gateway, add models and keys, then connect applications and SDKs to one shared endpoint."
related:
  - "/docs/learn/sdk_quickstart"
  - "/docs/learn/enterprise_quickstart"
---
# Gateway Quickstart

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

Use this path if you need one shared OpenAI-compatible endpoint for a team or platform.

If you need a Docker or database-first setup, use the [Quickstart](/docs/proxy/docker_quick_start). Otherwise, use the steps below to get to a working request fast.

## 1. Install The Gateway

```bash
uv tool install 'litellm[proxy]'
```

## 2. Set One Provider Key

```bash
export OPENAI_API_KEY="your-api-key"
```

## 3. Create `config.yaml`

```yaml
model_list:
  - model_name: gpt-5.6-luna
    litellm_params:
      model: openai/gpt-5.6-luna
      api_key: os.environ/OPENAI_API_KEY

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
  database_url: postgresql://llmproxy:dbpassword9090@db:5432/litellm
```

## 4. Start The Gateway

```bash
litellm --config config.yaml
```

You should see the proxy start on `http://0.0.0.0:4000`.

## 5. Send Your First Request

```bash
curl -X POST 'http://0.0.0.0:4000/chat/completions' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -d '{
    "model": "gpt-5.6-luna",
    "messages": [
      {"role": "user", "content": "Hello from LiteLLM Gateway"}
    ]
  }'
```

## 6. Check The Response

If the request succeeds, the proxy returns `200 OK` with an OpenAI-style response.

The assistant text will be in:

```text
choices[0].message.content
```

If your gateway is routing to OpenAI, a real response can look like this:

```json
{
  "id": "chatcmpl-abc123",
  "created": 1677858242,
  "model": "gpt-5.6-luna",
  "object": "chat.completion",
  "system_fingerprint": "fp_406d6473f8",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I assist you today?",
        "tool_calls": null,
        "function_call": null,
        "annotations": []
      }
    }
  ],
  "usage": {
    "completion_tokens": 9,
    "prompt_tokens": 13,
    "total_tokens": 22,
    "completion_tokens_details": {
      "accepted_prediction_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 0,
      "rejected_prediction_tokens": 0
    },
    "prompt_tokens_details": {
      "audio_tokens": 0,
      "cached_tokens": 0
    }
  },
  "service_tier": "default"
}
```

`id`, `created`, the resolved model version, token counts, and message text will vary by request. Other providers may return a smaller or slightly different set of fields, but `choices[0].message.content` is the main field to read.

## 7. Add Keys And The UI

If you need virtual keys, spend tracking, or the admin UI, add a database next.

- Add `database_url` under `general_settings`
- Use [Virtual keys](/docs/proxy/virtual_keys) for key creation and budgets
- Use [Admin UI](/docs/proxy/ui) to manage models and keys
- Use the [Quickstart](/docs/proxy/docker_quick_start) if you want a fuller setup

## 8. Pick Your Next Step

- [Make LLM Requests](https://docs.litellm.ai/docs/proxy/user_keys): Point LiteLLM or OpenAI-compatible clients to the gateway.
- [Model Config](https://docs.litellm.ai/docs/proxy/configs): Add more models and gateway settings.
- [Virtual Keys](https://docs.litellm.ai/docs/proxy/virtual_keys): Create keys, budgets, and access controls.
- [Add Logging](https://docs.litellm.ai/docs/proxy/logging): Capture logs, spend, and traces.
- [Load Balance](https://docs.litellm.ai/docs/proxy/load_balancing): Route across deployments, regions, or providers.
- [Add Guardrails](https://docs.litellm.ai/docs/proxy/guardrails/quick_start): Add safety checks and policy enforcement.
- [Reliability](https://docs.litellm.ai/docs/proxy/reliability): Configure retries, fallbacks, and timeouts.

## When To Use The SDK Path Instead

If you only need to call models from one application and do not need centralized auth or shared infrastructure, start with the [SDK Quickstart](/docs/learn/sdk_quickstart) instead.

## Related pages

- [SDK Quickstart](https://docs.litellm.ai/docs/learn/sdk_quickstart.md)
- [Enterprise Quickstart](https://docs.litellm.ai/docs/learn/enterprise_quickstart.md)
