PageSourceSearch

https://static.taotoken.net/release/taotoken_fe/dist/assets/%E6%96…AF%B9%E8%AF%9DAPI-1789990486687-B6_6JU3z.js

js taotoken.net collected 2026-10-06 14:10:09 UTC 1,196 bytes, 19 lines download raw bytes

1const n=`## 文本对话 API
2
3向模型发送消息,获取 AI 回复。支持三种协议——按你使用的 SDK 或框架选择对应文档。
4
5| 协议 | 适合场景 | 路径 |
6|------|----------|------|
7| [OpenAI 兼容](/doc/文本对话/OpenAI兼容) | 大多数场景,生态最丰富 | \`POST /v1/chat/completions\` |
8| [Anthropic 兼容](/doc/文本对话/Anthropic兼容) | 使用 Claude SDK / Claude Code | \`POST /v1/messages\` |
9| [Gemini 兼容](/doc/文本对话/Gemini兼容) | 使用 Gemini SDK | \`POST /v1/models/{modelId}:streamGenerateContent\` |
10
11**通用配置:**
12- Base URL:根据 Coding Plan、Token Plan 或按量付费选择对应入口,见[选择 API 入口](/doc/准备工作/选择API入口)
13- API Key:在[控制台](/console/api-keys)创建,请求头带 \`Authorization: Bearer <API_KEY>\`
14- Model ID:填写套餐或[模型广场](https://taotoken.net/models)中的真实 Model ID
15
16> 不知道选哪个?从 [OpenAI 兼容](/doc/文本对话/OpenAI兼容) 开始。
17
18各协议接入页(OpenAI / Anthropic / Gemini)与本节说明一致。CLI 工具配置见 [快速接入](/doc/API接入/ClaudeCodeAnthropic) 各篇。
19`;export{n as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.