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

# Chat Completions

> POST /v1/chat/completions, OpenAI Chat Completions-compatible.

`POST https://asklethe.ai/v1/chat/completions` accepts the same request shape as OpenAI's Chat Completions API. Your request body is forwarded as-is (after LETHE resolves `model` to the upstream model), so any parameter the OpenAI API accepts, `temperature`, `max_tokens`, `tools`, `tool_choice`, `stream`, etc., passes through.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://asklethe.ai/v1/chat/completions \
    -H "Authorization: Bearer $LETHE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "lethe",
      "messages": [{ "role": "user", "content": "Say hi in five words." }]
    }'
  ```

  ```ts TypeScript theme={null}
  const res = await client.chat.completions.create({
    model: "lethe",
    messages: [{ role: "user", content: prompt }],
  });
  ```

  ```python Python theme={null}
  resp = client.chat.completions.create(
      model="lethe",
      messages=[{"role": "user", "content": prompt}],
  )
  ```
</CodeGroup>

## Streaming

Set `"stream": true` to receive server-sent events, same as the OpenAI API. Model names in streamed chunks are rewritten to the public `lethe` / `lethe-vision` id, you will never see an upstream provider name in the stream.

## Vision input

To send image or video content parts, use `model: "lethe-vision"`. Sending vision content to `lethe` (text-only) returns an `invalid_model` error. See [Models](/api-reference/models).

## Statelessness

LETHE does not store or merge conversation history between calls. Send the full `messages` array on every request.

## Response headers

Every response includes:

| Header              | Meaning                                                      |
| ------------------- | ------------------------------------------------------------ |
| `X-Lethe-Remaining` | Requests left in your current quota window.                  |
| `X-Lethe-Limit`     | Your total quota for the window (3 guest, 50 wallet-linked). |

See [Rate Limits & Quotas](/api-reference/rate-limits) for details, and [Errors](/api-reference/errors) for failure responses.
