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

# Basic chat

> Call /v1/chat/completions for a single turn

<CodeGroup>
  ```bash curl theme={null}
  curl https://tokendog.io/v1/chat/completions \
    -H "Authorization: Bearer $TOKENDOG_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model":"gpt-5","messages":[{"role":"user","content":"Introduce yourself in one sentence."}]}'
  ```

  ```python Python theme={null}
  from openai import OpenAI
  client = OpenAI(base_url="https://tokendog.io/v1", api_key="YOUR_TOKENDOG_API_KEY")
  resp = client.chat.completions.create(
      model="gpt-5",
      messages=[{"role": "user", "content": "Introduce yourself in one sentence."}],
  )
  print(resp.choices[0].message.content)
  ```

  ```javascript Node theme={null}
  import OpenAI from "openai";
  const client = new OpenAI({ baseURL: "https://tokendog.io/v1", apiKey: "YOUR_TOKENDOG_API_KEY" });
  const resp = await client.chat.completions.create({
    model: "gpt-5",
    messages: [{ role: "user", content: "Introduce yourself in one sentence." }],
  });
  console.log(resp.choices[0].message.content);
  ```
</CodeGroup>

<Tip>Switch providers by changing `model` — e.g. Zhipu `glm-5.1` or MiniMax `MiniMax-M2.7`.</Tip>
