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

# ChatGPT（Chat Completions）

> Omniall AI 上的 OpenAI Chat Completions 格式。

# ChatGPT（Chat Completions）

OpenAI **Chat Completions** 格式：

```http theme={null}
POST https://api.omniall.ai/v1/chat/completions
Authorization: Bearer sk-...
```

适用于经典 `messages` 对话结构，以及大多数 OpenAI SDK（`client.chat.completions.create`）。

如需新版 OpenAI **Responses** 格式，见 [Responses](/zh-CN/api-reference/responses)。

| 场景 | 用法 |
| - | - |
| 文本对话 / 流式 | `messages` + 可选 `stream` |
| 图像识别 | `content` 中的 `image_url` |
| 文件 / PDF 分析 | `content` 中的 `file` |
| 联网搜索 | `web_search_options` / 支持搜索的模型 |
| Agent / 工具调用 | `tools` + `tool_choice` |
| 结构化 JSON | `response_format` |

`model` 请从[模型广场](https://omniall.ai/pricing)或 `GET /v1/models` 选取。

官方文档：[Chat Completions](https://platform.openai.com/docs/api-reference/chat)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.