> ## 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.

# 对话 API

> 通过同一 Base URL 调用 ChatGPT、Claude、Gemini 与 Responses。

# 对话 API

Omniall AI 在 **`https://api.omniall.ai`** 上提供多种对话协议。`model` 请从[模型广场](https://omniall.ai/pricing)选取。

| 协议 | 方法 | 路径 | 说明 |
| - | - | - | - |
| Chat Completions | `POST` | `/v1/chat/completions` | OpenAI 兼容，支持流式 |
| Claude Messages | `POST` | `/v1/messages` | Anthropic Messages 形态 |
| Gemini | `POST` | `/v1beta/models/{model}:generateContent` | Gemini 原生；另有 `streamGenerateContent` |
| Responses | `POST` | `/v1/responses` | OpenAI Responses API |

鉴权：`Authorization: Bearer sk-...`（Claude 可用 `x-api-key`；Gemini 可用 `x-goog-api-key`）。

## 快速示例（Chat Completions）

```bash theme={null}
curl https://api.omniall.ai/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "你好"}]
  }'
```

完整字段与 Playground 见 **API Reference → 对话**。


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