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

# Create Chat Completion

> OpenAI-compatible chat completions endpoint with multi-provider routing.

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.arouter.ai/v1/chat/completions \
    -H "Authorization: Bearer lr_live_xxxx" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "openai/gpt-5.4",
      "messages": [{"role": "user", "content": "Hello!"}]
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://api.arouter.ai/v1",
      api_key="lr_live_xxxx",
  )

  response = client.chat.completions.create(
      model="openai/gpt-5.4",
      messages=[{"role": "user", "content": "Hello!"}],
  )
  ```

  ```typescript Node.js theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    baseURL: "https://api.arouter.ai/v1",
    apiKey: "lr_live_xxxx",
  });

  const response = await client.chat.completions.create({
    model: "openai/gpt-5.4",
    messages: [{ role: "user", content: "Hello!" }],
  });
  ```
</RequestExample>
