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

# Gateway overview

> How the Gatelit gateway processes a request from auth to response.

## Request lifecycle

1. **Auth** — verify the `Authorization` header (Bearer, GatelitSigned, or GatelitKey)
2. **Provider key resolution** — resolve the org's API key for the requested provider
3. **Param clamping** — strip unsupported params, clamp values in range (e.g. `temperature` is omitted for o-series models)
4. **Request transform** — reshape the body to the upstream provider's format
5. **Proxy** — forward to the upstream API
6. **Stream normalisation** — convert all provider SSE formats to OpenAI format
7. **Log** — record usage, latency, and cost estimate in the background

## Supported providers

| Provider  | Models                                  |
| --------- | --------------------------------------- |
| OpenAI    | GPT-4o family, o3/o4 reasoning, GPT-3.5 |
| Anthropic | Claude 3.5/3.7/4.x family               |
| Google    | Gemini 2.0/2.5 family                   |
| Mistral   | Mistral, Codestral, Devstral families   |

## Response format

All responses — regardless of provider — use OpenAI's chat completion format. This means you can swap providers without changing your parsing code.

Streaming responses are OpenAI-compatible SSE, even from Anthropic and Google.
