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

# Chat Completions 对话接口

> 完全兼容 OpenAI 标准格式的文本对话与推理接口

### 请求参数

<ParamField body="model" type="string" required>
  模型标识符，例如 `claude-3-7-sonnet-20250219`、`gpt-4o`、`deepseek-chat`。
</ParamField>

<ParamField body="messages" type="array" required>
  对话消息列表，每项包含 `role` ("system" | "user" | "assistant") 与 `content`。
</ParamField>

<ParamField body="stream" type="boolean" default="false">
  是否使用 Server-Sent Events (SSE) 流式返回。
</ParamField>

<ParamField body="temperature" type="number" default="0.7">
  采样温度，介于 0 和 2 之间。
</ParamField>

<ParamField body="max_tokens" type="integer">
  最大生成 Token 数。
</ParamField>

***

### 请求示例

```bash theme={null}
curl https://api.socialvision.tisyk.xyz/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-sv-YOUR_API_KEY" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'
```
