<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>TalkingData文档中心</title>
    <link>http://doc.talkingdata.com</link>
    <description></description>
    <language>zh-CN</language>
    <pubdate>Thu, 13 Aug 2026 21:06:04 +0800</pubdate>
    <image>
      <link>http://doc.talkingdata.com</link>
      <url>http://doc.talkingdata.com/resource/img/logo.png</url>
      <title>TalkingData文档中心</title>
    </image>
    <item>
      <title>TD云筑80/Doubao-Seedance-2.5</title>
      <link>http://doc.talkingdata.com/posts/1278</link>
      <category>视频生成 API</category>
      <author>liuxinmei</author>
      <description>云筑80 接口说明文档 TD模型编号：T0101009 模型能力简介 云筑80 多模态参考生视频，输入参考图片（0-30 张）+ 参考视频（0-10 个）+ 参考音频（0-10 个）+ 文本提示词（可选）生成 1 个目标视频。支持仅传入音频。支持生成全新视频、编辑视频、延长视频，支持 30 秒视频连贯直出。 图生视频-首尾帧，输入首帧图片+尾帧图片+文本提示词（可选）生成 1 个目标视频。 图生视频-首帧，输入首帧图片+文本提示词（可选）生成 1 个目标视频。 文生视频，输入文本提示词生成 1 个目标视频。 鉴权说明  本接口仅支持API Key鉴权，需联系TD运维同学获取长效API Key。
 创建视频生成任务接口地址 介绍创建视频生成任务 API 的输入输出参数，供您使用接口时查阅字段含</description>
      <content:encoded><![CDATA[<h4 id="%3Cstrong%3E%E4%BA%91%E7%AD%9180%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%AD%9180%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云筑80 接口说明文档</strong></h4>
<p><strong>TD模型编号：T0101009</strong></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><p><strong>云筑80</strong></p>
<ul>
<li><p>多模态参考生视频，输入参考图片（0-30 张）+ 参考视频（0-10 个）+ 参考音频（0-10 个）+ 文本提示词（可选）生成 1 个目标视频。支持仅传入音频。支持生成全新视频、编辑视频、延长视频，支持 30 秒视频连贯直出。</p>
</li>
<li><p>图生视频-首尾帧，输入首帧图片+尾帧图片+文本提示词（可选）生成 1 个目标视频。</p>
</li>
<li><p>图生视频-首帧，输入首帧图片+文本提示词（可选）生成 1 个目标视频。</p>
</li>
<li><p>文生视频，输入文本提示词生成 1 个目标视频。</p>
</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口仅支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">创建视频生成任务接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p>介绍创建视频生成任务 API 的输入输出参数，供您使用接口时查阅字段含义。模型会依据传入的图片及文本信息生成视频，待生成完成后，您可以按条件查询任务并获取生成的视频。</p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">创建视频生成任务请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">创建视频生成任务请求体（requestBody）</h3>
<hr>
<p><strong>model</strong>   <code>string</code>  <code>必选</code> </p>
<p>本次请求使用模型的 Model ID 为 T0101009</p>
<hr>
<p><strong>content </strong> <code>object[]</code>  <code>必选</code></p>
<p>输入给模型，生成视频的信息，支持文本、图片、音频、视频、样片任务 ID。支持以下几种组合：</p>
<ul>
<li>文本</li>
<li>文本（可选）+ 图片</li>
<li>文本（可选）+ 视频</li>
<li>文本（可选）+ 音频</li>
<li>文本（可选）+ 图片 + 音频</li>
<li>文本（可选）+ 图片 + 视频</li>
<li>文本（可选）+ 视频 + 音频</li>
<li>文本（可选）+ 图片 + 视频 + 音频</li>
</ul>
<p>信息类型：</p>
<ul>
<li><p><strong>文本信息</strong> <code>object</code> </p>
<p>输入给模型生成视频的内容，文本内容部分。</p>
<ul>
<li><p>content.<strong>type</strong> <code>string</code>  <code>必选</code></p>
<p>输入内容的类型，此处应为 text。</p>
</li>
<li><p>content.<strong>text</strong> <code>string</code>  <code>必选</code></p>
<p>输入给模型的文本提示词，描述期望生成的视频。</p>
<p>支持中英文。建议中文不超过500字，英文不超过1000词。字数过多信息容易分散，模型可能因此忽略细节，只关注重点，造成视频缺失部分元素。</p>
</li>
</ul>
</li>
<li><p><strong>图片信息</strong> <code>object</code> </p>
<p>输入给模型生成视频的内容，图片信息部分。</p>
<ul>
<li><p>content.<strong>type</strong> <code>string</code>  <code>必选</code></p>
<p>输入内容的类型，此处应为 image_url。支持图片URL或图片 Base64 编码。</p>
</li>
<li><p>content.<strong>image_url</strong> <code>object</code>  <code>必选</code>   </p>
<p>输入给模型的图片对象。</p>
<ul>
<li><p>content.image_url.<strong>url</strong> <code>string</code>  <code>必选</code> </p>
<p>图片信息，可以是图片URL、图片 Base64 编码、素材ID。</p>
<ul>
<li><p>图片URL：请确保图片URL可被访问。</p>
</li>
<li><p>Base64编码：请遵循此格式data:image/&lt;图片格式&gt;;base64,<Base64编码>，注意 &lt;图片格式&gt; 需小写，如 data:image/png;base64,{base64_image}。</p>
</li>
<li><p>用于视频生成的预置素材及虚拟人像的ID，遵循格式 <code>asset://&lt;ASSET ID&gt;</code>。</p>
<blockquote>
<p>说明</p>
<p>传入图片需要满足以下条件：</p>
<ul>
<li>格式：jpeg、png、webp、bmp、tiff、gif、heic、heif</li>
<li>宽高比（宽/高）：(0.4, 2.5)</li>
<li>宽高长度（px）：(300, 6000)</li>
<li>大小：单张图片小于 30 MB，请求体大小不超过 64 MB</li>
<li>图片数量：<ul>
<li>图生视频-首帧：1 张</li>
<li>图生视频-首尾帧：2 张</li>
<li>云筑80 多模态参考生视频：1~30 张</li>
</ul>
</li>
</ul>
</blockquote>
</li>
</ul>
</li>
</ul>
</li>
<li><p>content.<strong>role</strong> <code>string</code>  <code>条件必填</code></p>
<p>图片的位置或用途。</p>
<p>| 场景            | role 取值                                               |
| --------------- | ------------------------------------------------------- |
| 图生视频-首帧   | <code>first_frame</code> 或不填                                    |
| 图生视频-首尾帧 | 首帧：<code>first_frame</code>（必填），尾帧：<code>last_frame</code>（必填） |
| 图生视频-参考图 | <code>reference_image</code>（必填）                               |</p>
</li>
</ul>
</li>
<li><p><strong>视频信息</strong> <code>object</code>  </p>
<p>输入给模型的视频信息。</p>
<p>| 参数                  | 类型   | 必填     | 说明                                                         |
| --------------------- | ------ | -------- | ------------------------------------------------------------ |
| content.type          | string | 必选     | 输入内容的类型，此处应为 <code>video_url</code>                         |
| content.video_url.url | string | 必选     | 视频 URL、素材 ID：用于视频生成的预置素材及虚拟人像视频的 ID，遵循格式：asset://<ASSET_ID> |
| content.role          | string | 条件必填 | 视频的位置或用途，当前仅支持 <code>reference_video</code>               |</p>
<blockquote>
<p><strong>传入单个视频要求：</strong></p>
<ul>
<li>视频格式：mp4、mov</li>
<li>分辨率：480p、720p、1080p、4K</li>
<li>时长：单个视频时长 [2, 30] s，最多传入 10 个参考视频，所有视频总时长不超过 30s</li>
<li>宽高比（宽/高）：[0.4, 2.5]</li>
<li>宽高长度（px）：[300, 6000]</li>
<li>画面像素（宽 × 高）：[409600,8295044]</li>
<li>大小：单个视频不超过 200 MB</li>
<li>帧率 (FPS)：[24, 60]</li>
</ul>
</blockquote>
<p>| <strong>容器格式</strong> | <strong>常用文件扩展名</strong> | <strong>MIME</strong>        | <strong>支持编码</strong>                              |
| ------------ | ------------------ | --------------- | ----------------------------------------- |
| MP4          | .mp4               | video/mp4       | 视频：H.264/AVC、H.265/HEVC音频：AAC、MP3 |
| QuickTime    | .mov               | video/quicktime | 视频：H.264/AVC、H.265/HEVC音频：AAC、MP3 |</p>
</li>
<li><p><strong>音频信息</strong> <code>object</code>  </p>
<p>用作参考音频。</p>
<p>| 参数                  | 类型   | 必填     | 说明                                                         |
| --------------------- | ------ | -------- | ------------------------------------------------------------ |
| content.type          | string | 必选     | 输入内容的类型，此处应为 <code>audio_url</code>                         |
| content.audio_url.url | string | 必选     | 音频 URL、音频 Base64 编码、素材 ID：用于视频生成的虚拟人的音频素材 ID，遵循格式：asset://<ASSET_ID> |
| content.role          | string | 条件必填 | 音频的位置或用途，当前仅支持 <code>reference_audio</code>               |</p>
<blockquote>
<p><strong>传入单个音频要求：</strong></p>
<ul>
<li>格式：wav、mp3</li>
<li>时长：单个音频时长 [2, 30] s，最多传入 10 段参考音频，所有音频总时长不超过 30s</li>
<li>大小：单个音频不超过 15 MB，请求体大小不超过 64 MB</li>
</ul>
</blockquote>
</li>
</ul>
<hr>
<p><strong>callback_url</strong>  <code>string</code></p>
<p>填写本次生成任务结果的回调通知地址。</p>
<blockquote>
<p>说明</p>
<p>回调返回的 <code>status</code> 包括以下状态：</p>
<ul>
<li><code>queued</code>：排队中</li>
<li><code>running</code>：任务运行中</li>
<li><code>succeeded</code>：任务成功（如发送失败，即 5 秒内未接收到成功发送的信息，会回调三次）</li>
<li><code>failed</code>：任务失败（如发送失败，即 5 秒内未接收到成功发送的信息，会回调三次）</li>
<li><code>expired</code>：任务超时，即任务处于「运行中或排队中」状态超过过期时间，可通过 <code>execution_expires_after</code>字段设置过期时间</li>
</ul>
</blockquote>
<hr>
<p><strong>generate_audio</strong> <code>boolean</code> <code>默认值 true</code></p>
<p>控制生成的视频是否包含与画面同步的声音。</p>
<ul>
<li><code>true</code>：模型输出的视频包含同步音频。模型会基于文本提示词与视觉内容，自动生成与之匹配的人声、音效及背景音乐。建议将对话部分置于双引号内，以优化音频生成效果。</li>
<li><code>false</code>：模型输出的视频为无声视频。</li>
</ul>
<hr>
<p><strong>output_format</strong> <code>string</code>  <code>默认值 mp4</code></p>
<ul>
<li><code>mp4</code>：通用格式，兼容性最好，采用标准色彩精度，可在网页、移动端、各类播放器及分发平台直接播放。</li>
</ul>
<ul>
<li><p><code>mov</code>：面向专业场景的高色彩精度格式，更好地保持画面色彩与亮度一致性、适用于调色、抠像、合成等对色彩还原要求高的专业后期加工。推荐在视频编辑、视频延长场景使用 mov 格式作为输入和输出。\</p>
<p><strong>mov 格式播放兼容性</strong></p>
<p>mov 格式采用专业编码（H.264视频编码+yuv444p 色度采样+PCM 音频编码），部分播放器可能不兼容。以下为常见的支持播放 mov 格式的播放器：</p>
<p>| 播放器 | macOS | Windows |
| ------ | ----- | ------- |
| IINA   | ✓     | ✕       |
| VLC    | ✓     | ✓       |
| mpv    | ✓     | ✓       |
| ffplay | ✓     | ✓       |</p>
</li>
</ul>
<hr>
<p><strong>tools</strong> <code>object</code>  </p>
<p>配置模型要调用的工具。</p>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>tools.type</td>
<td>string</td>
<td>指定使用的工具类型。<code>web_search</code>：联网搜索工具</td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>联网搜索说明：</strong></p>
<ul>
<li>开启联网搜索后，模型会根据用户的提示词自主判断是否搜索互联网内容（如商品、天气等）</li>
<li>可提升生成视频的时效性，但也会增加一定的时延</li>
<li>实际搜索次数可通过查询视频生成任务 API 返回的 <code>usage.tool_usage.web_search</code> 字段获取</li>
</ul>
</blockquote>
<hr>
<p><strong>resolution</strong> <code>string</code> <code>默认值 720p</code></p>
<p>视频分辨率，取值范围：<code>480p</code>、<code>720p</code> </p>
<hr>
<p><strong>return_last_frame</strong> <code>boolean</code> <code>默认值 false</code> </p>
<p>是否返回生成视频的尾帧图像。</p>
<ul>
<li><code>true</code>：返回生成视频的尾帧图像，尾帧图像的格式为 png，宽高像素值与生成的视频保持一致，无水印。</li>
</ul>
<ul>
<li><code>false</code>：不返回生成视频的尾帧图像。</li>
</ul>
<p>使用该参数可实现生成多个连续视频：以上一个生成视频的尾帧作为下一个视频任务的首帧，快速生成多个连续视频。</p>
<hr>
<p><strong>ratio</strong>  <code>string</code> <code>默认值 adaptive</code></p>
<p>生成视频的宽高比例。可选值：</p>
<ul>
<li><code>16:9</code></li>
<li><code>4:3</code></li>
<li><code>1:1</code></li>
<li><code>3:4</code></li>
<li><code>9:16</code></li>
<li><code>21:9</code></li>
<li><code>adaptive</code>：根据输入自动选择最合适的宽高比</li>
</ul>
<blockquote>
<p><strong>adaptive</strong> 适配规则</p>
<ul>
<li><p>文生视频：支持在可选宽高比中自行设置，或由模型根据 prompt 在可选宽高比中自动选择</p>
<blockquote>
<p>支持 <code>adaptive</code> 或指定宽高比</p>
</blockquote>
</li>
<li><p>首帧 / 首尾帧生视频：<strong>自动保持输出视频和首帧图片的宽高比一致</strong></p>
<blockquote>
<p>默认且仅支持 <code>adaptive</code></p>
</blockquote>
</li>
<li><p>多模态参考生视频：</p>
</li>
<li><ul>
<li><p>视频编辑/视频延长: <strong>自动保持输出视频和待编辑/待延长视频的宽高比一致，不支持另行设置</strong></p>
<blockquote>
<p>默认且仅支持 <code>adaptive</code></p>
</blockquote>
</li>
<li><p>参考生视频: 支持在可选宽高比中自行设置，或由模型根据 prompt 在可选宽高比中自动选择</p>
<blockquote>
<p>支持 <code>adaptive</code> 或指定宽高比</p>
</blockquote>
</li>
</ul>
</li>
</ul>
</blockquote>
<table>
<thead>
<tr>
<th>分辨率</th>
<th>宽高比</th>
<th>宽高像素值</th>
</tr>
</thead>
<tbody>
<tr>
<td>480p</td>
<td>16:9</td>
<td>854×480</td>
</tr>
<tr>
<td>480p</td>
<td>4:3</td>
<td>752×560</td>
</tr>
<tr>
<td>480p</td>
<td>1:1</td>
<td>640×640</td>
</tr>
<tr>
<td>480p</td>
<td>3:4</td>
<td>560×752</td>
</tr>
<tr>
<td>480p</td>
<td>9:16</td>
<td>480×854</td>
</tr>
<tr>
<td>480p</td>
<td>21:9</td>
<td>992×432</td>
</tr>
<tr>
<td>720p</td>
<td>16:9</td>
<td>1280×720</td>
</tr>
<tr>
<td>720p</td>
<td>4:3</td>
<td>1112×834</td>
</tr>
<tr>
<td>720p</td>
<td>1:1</td>
<td>960×960</td>
</tr>
<tr>
<td>720p</td>
<td>3:4</td>
<td>834×1112</td>
</tr>
<tr>
<td>720p</td>
<td>9:16</td>
<td>720×1280</td>
</tr>
<tr>
<td>720p</td>
<td>21:9</td>
<td>1470×630</td>
</tr>
</tbody>
</table>
<hr>
<p><strong>duration</strong> <code>integer</code> <code>默认值 -1</code></p>
<p>生成视频时长，仅支持整数，单位：秒。</p>
<p><code>duration</code> 和 <code>frames</code> 二选一即可，<code>frames</code> 优先级更高。如果您希望生成整数秒的视频，建议指定 <code>duration</code>。</p>
<p>取值范围：<code>[4,30]</code> 或设置为 <code>-1</code></p>
<ul>
<li><p><strong>duration 适配规则</strong></p>
<p>当 <code>duration</code> 设置为<code>-1</code> 时，实际生成视频的时长可通过查询视频生成任务 API 返回的 <code>duration</code> 字段获取。</p>
<p>| 模型         | <code>duration = -1</code>取值规则                                      |
| ------------ | ------------------------------------------------------------ |
| 视频编辑任务 | 自动保持输出视频和输入视频的时长基本一致（输出时长可能略短于输入视频，误差约 0.4 秒），不支持另行设置。 |
| 其他任务类型 | 模型在 <code>duration</code> 的有效取值范围内，自主选择合适的视频长度（整数秒）。 |</p>
<blockquote>
<p>注意</p>
<ul>
<li>仅支持配置<code>duration</code>为<code>-1</code>，不支持指定具体输出时长。</li>
<li>传入的待编辑视频时长需在<code>[4, 30]s</code> 内，否则将触发报错。</li>
</ul>
</blockquote>
</li>
</ul>
<hr>
<p><strong>watermark</strong> <code>boolean</code> <code>默认值 false</code> </p>
<p>生成视频是否包含水印。</p>
<ul>
<li><code>true</code>：生成视频右下角会展示 AI 生成 水印。</li>
</ul>
<ul>
<li><code>false</code>：生成视频不含水印。</li>
</ul>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0" name="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0">创建视频生成任务响应参数</h2>
<p><span id="Hrya4y9k"></span></p>
<hr>
<p><strong>id</strong> <code>string</code>  <code>必选</code> </p>
<p>视频生成任务 ID 。仅保存 7 天（从 <strong>created at</strong> 时间戳开始计算），超时后将自动清除。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">创建视频生成任务调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code class="lang-curl">curl https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks?requestId=550e8400-e29b-41d4-a716-446655440000 \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;Authorization: Bearer $ARK_API_KEY&quot; \
  -H &quot;X-Timestamp: $TIMESTAMP&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;T0101009&quot;,
    &quot;content&quot;: [
      {
        &quot;type&quot;: &quot;text&quot;,
        &quot;text&quot;: &quot;生成一个每日亲自英语学习视频，美国的5岁男孩和35岁妈妈的日常搞笑英文交流，注意是搞笑版&quot;
      }
    ],
    &quot;duration&quot;: 5,
    &quot;ratio&quot;: &quot;16:9&quot;,
    &quot;resolution&quot;: &quot;480p&quot;,
    &quot;generate_audio&quot;: false
  }&#39;
</code></pre>
<p>响应示例：</p>
<pre><code class="lang-curl">{
  &quot;id&quot;: &quot;cgt-20260810103616-ghtwn&quot;
}
</code></pre>
<hr>
<p><span id="Hrya4y9k"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">查询视频生成任务接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p>查询视频生成任务的状态。</p>
<blockquote>
<p>说明</p>
<p>仅支持查询最近 7 天的历史数据。时间计算统一采用UTC时间戳，返回的7天历史数据范围以用户实际发起查询请求的时刻为基准（精确到秒），时间戳区间为 [T-7天, T)。</p>
</blockquote>
<p><strong>请求方法：</strong> GET</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks/{task_id}</code> </p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">查询视频生成任务请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<hr>
<p><strong>task_id</strong> <code>string</code>  <code>必选</code>  </p>
<p>您需要查询的视频生成任务的 ID 。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0" name="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0">查询视频生成任务响应参数</h2>
<p><span id="Hrya4y9k"></span></p>
<hr>
<p><strong>id</strong>  <code>string</code>  </p>
<p>视频生成任务 ID 。</p>
<hr>
<p><strong>model</strong> <code>string</code>  </p>
<p>本次请求使用的模型 ID 。</p>
<hr>
<p><strong>status</strong> <code>string</code></p>
<p>任务状态，以及相关的信息：</p>
<ul>
<li><code>queued</code>：排队中。</li>
</ul>
<ul>
<li><code>running</code>：任务运行中。</li>
</ul>
<ul>
<li><code>cancelled</code>：取消任务，取消状态24h自动删除（只支持排队中状态的任务被取消）。</li>
</ul>
<ul>
<li><code>succeeded</code>： 任务成功。</li>
</ul>
<ul>
<li><code>failed</code>：任务失败。</li>
</ul>
<ul>
<li><code>expired</code>：任务超时。</li>
</ul>
<hr>
<p><strong>error</strong> <code>object / null</code></p>
<p>错误提示信息，任务成功返回null，任务失败时返回错误数据。</p>
<ul>
<li><p><strong>error. code</strong> <code>string</code></p>
<p>错误码。</p>
</li>
<li><p><strong>error. message</strong> <code>string</code></p>
<p>错误提示信息。</p>
</li>
</ul>
<hr>
<p><strong>created_at</strong> <code>integer</code></p>
<p>任务创建时间的 Unix 时间戳（秒）。</p>
<hr>
<p><strong>updated_at</strong> <code>integer</code></p>
<p>任务当前状态更新时间的 Unix 时间戳（秒）。</p>
<hr>
<p><strong>content</strong> <code>object</code></p>
<p>视频生成任务的输出内容。</p>
<ul>
<li><p>content.<strong>last_frame_url</strong> <code>string</code></p>
<p>视频的尾帧图像 URL。有效期为 24 小时，请及时下载或转存。 生成的视频 URL 下载次数上限为 100 次。</p>
</li>
<li><p>content. <strong>video_url</strong>  <code>string</code></p>
<p>生成视频的 URL，格式为 mp4。有效期为 24 小时，请及时下载或转存。</p>
</li>
</ul>
<hr>
<p><strong>resolution</strong> <code>string</code></p>
<p>生成视频的分辨率。</p>
<hr>
<p><strong>ratio</strong> <code>string</code></p>
<p>生成视频的宽高比。</p>
<hr>
<p><strong>duration</strong> <code>integer</code></p>
<p>生成视频的时长，单位：秒。</p>
<hr>
<p><strong>framespersecond</strong> <code>integer</code></p>
<p>生成视频的帧率。</p>
<hr>
<p><strong>generate_audio</strong> <code>boolean</code></p>
<p>生成的视频是否包含与画面同步的声音。</p>
<ul>
<li><code>true</code>：模型输出的视频包含同步音频。</li>
</ul>
<ul>
<li><code>false</code>：模型输出的视频为无声视频。</li>
</ul>
<hr>
<p><strong>tools</strong>  <code>object[]</code>   </p>
<p>配置模型要调用的工具。</p>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>tools.type</td>
<td>string</td>
<td>指定使用的工具类型。<code>web_search</code>：联网搜索工具</td>
</tr>
</tbody>
</table>
<hr>
<p><strong>safety_identifier</strong> <code>string</code></p>
<p>终端用户的唯一标识符。若创建视频生成任务时设置了该参数，接口会原样返回此信息。</p>
<hr>
<p><strong>priority</strong> <code>integer</code></p>
<p>当前请求的执行优先级。</p>
<hr>
<p><strong>draft_task_id</strong> <code>string</code>
Draft 视频任务 ID。基于 Draft 视频生成正式视频时，会返回该参数。</p>
<hr>
<p><strong>service_tier</strong> <code>string</code>
实际处理任务使用的服务等级。</p>
<hr>
<p><strong>execution_expires_after</strong> <code>integer</code>
任务超时阈值，单位：秒。</p>
<hr>
<p><strong>usage</strong>  <code>object</code>   </p>
<p>本次请求的 token 用量。</p>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>usage.completion_tokens</td>
<td>integer</td>
<td>模型输出视频花费的 token 数量</td>
</tr>
<tr>
<td>usage.total_tokens</td>
<td>integer</td>
<td>本次请求消耗的总 token 数量</td>
</tr>
<tr>
<td>usage.tool_usage</td>
<td>object</td>
<td>使用工具的用量信息</td>
</tr>
<tr>
<td>usage.tool_usage.web_search</td>
<td>integer</td>
<td>实际调用联网搜索工具的次数，仅开启联网搜索时返回</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">查询视频生成任务调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X GET https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks/cgt-20260810103616-ghtwn&#39; \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;Authorization: Bearer $ARK_API_KEY&quot;
</code></pre>
<p>响应示例：</p>
<pre><code>{
      &quot;seed&quot;: 24370,
      &quot;execution_expires_after&quot;: 172800,
      &quot;usage&quot;: {
            &quot;completion_tokens&quot;: 48437,
            &quot;total_tokens&quot;: 48437  
    },
      &quot;created_at&quot;: 1786329377,
      &quot;generate_audio&quot;: false,
      &quot;priority&quot;: 0,
      &quot;resolution&quot;: &quot;480p&quot;,
      &quot;content&quot;: {
            &quot;video_url&quot;: &quot;https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/doubao-seedance-2-5/2119573523/Video/nwthg-61630101806202-tgc_201effd68f51caffff00000000000000000000450773923687120/cgt-20260810103616-ghtwn.mp4?X-Tos-Algorithm=TOS4-HMAC-SHA256&amp;X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260810%2Fcn-beijing%2Ftos%2Frequest&amp;X-Tos-Date=20260810T024036Z&amp;X-Tos-Expires=86400&amp;X-Tos-Max-Requests=100&amp;X-Tos-Signature=9b044a6a23fbfe3010c937b4d5229f39e633528aa9faadd7e517f7bf6f490867&amp;X-Tos-SignedHeaders=host&quot;  
    },
      &quot;duration&quot;: 5,
      &quot;framespersecond&quot;: 24,
      &quot;updated_at&quot;: 1786329637,
      &quot;output_format&quot;: &quot;mp4&quot;,
      &quot;draft&quot;: false,
      &quot;model&quot;: &quot;T0101009&quot;,
      &quot;service_tier&quot;: &quot;default&quot;,
      &quot;id&quot;: &quot;cgt-20260810103616-ghtwn&quot;,
      &quot;status&quot;: &quot;succeeded&quot;,
      &quot;ratio&quot;: &quot;16:9&quot;
</code></pre><hr>
<p><span id="Hrya4y9k"></span></p>
<h2 id="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">取消或删除视频生成任务接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p>取消排队中的视频生成任务，或者删除视频生成任务记录。</p>
<p><strong>请求方法：</strong> DELETE</p>
<p><strong>接口URL：</strong> <code>https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks/{id}</code></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">取消或删除视频生成任务请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>id</strong> <code>string</code> <code>必选</code></p>
<p>需要取消或者删除的视频生成任务。</p>
<p>任务状态不同，调用DELETE接口，执行的操作有所不同，具体说明如下：</p>
<table>
<thead>
<tr>
<th>当前任务状态</th>
<th>是否支持DELETE操作</th>
<th>操作含义</th>
<th>DELETE操作后任务状态</th>
</tr>
</thead>
<tbody>
<tr>
<td>queued</td>
<td>是</td>
<td>任务取消排队，任务状态被变更为cancelled。</td>
<td>cancelled</td>
</tr>
<tr>
<td>running</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>succeeded</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>failed</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>cancelled</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>expired</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0" name="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0">取消或删除视频生成任务响应参数</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>message</strong> <code>string</code> </p>
<p>请求处理结果的描述信息。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">取消或删除视频生成任务调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code>curl -X DELETE https://mp-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks/cgt-2025**** \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;Authorization: Bearer $ARK_API_KEY&quot;
</code></pre><p>响应示例：</p>
<pre><code>{
    &quot;message&quot; : &quot;取消成功&quot;
}
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<table>
<thead>
<tr>
<th>HTTP 状态码</th>
<th>错误类型 Type</th>
<th>错误码 Code</th>
<th>错误信息 Message</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>MissingParameter</td>
<td>The request failed because it is missing one or multiple required parameters. Request ID: {id}</td>
<td>请求缺少必要参数，请查阅 API 文档。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidParameter</td>
<td>One or more parameters specified in the request are not valid. Request ID: {id}</td>
<td>请求包含非法参数，请查阅 API 文档。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidParameter</td>
<td>The parameter instructions specified in the request are not valid: caching is not supported for instructions. Request id: {id}</td>
<td>Responses API 中，当配置过 instructions 字段信息，后续轮次无法配置 Caching 字段。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputTextRiskDetection</td>
<td>The request could not be processed because the input text includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输入文本可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputImageRiskDetection</td>
<td>The request could not be processed because the input image includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输入图片可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputTextRiskDetection</td>
<td>The request could not be processed because the output text includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输出文本可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputImageRiskDetection</td>
<td>The request could not be processed because the output image includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输出图片可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>ContentSecurityDetectionError</td>
<td>Internal error.ARKRequest ID:{id};CSDRequestId:{RequestId};CSDcode:{};CSDmessage:{}</td>
<td>风险识别产品请求失败。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>SensitiveContentDetected</td>
<td>The request failed because the input text may contain sensitive information.</td>
<td>输入文本可能包含敏感信息，请您使用其他 prompt。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>SensitiveContentDetected.SevereViolation</td>
<td>The request failed because the input text may contain severe violation information.</td>
<td>输入文本可能包含严重违规相关信息，请您使用其他 prompt。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>SensitiveContentDetected.Violence</td>
<td>The request failed because the input text may contain violence information.</td>
<td>输入文本可能包含激进行为相关信息，请您使用其他 prompt。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputTextSensitiveContentDetected</td>
<td>The request failed because the input text may contain sensitive information.Request ID: {id}</td>
<td>输入文本可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputImageSensitiveContentDetected</td>
<td>The request failed because the input image may contain sensitive information.Request ID: {id}</td>
<td>输入图像可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputVideoSensitiveContentDetected</td>
<td>The request failed because the input video may contain sensitive information.</td>
<td>输入视频可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputTextSensitiveContentDetected</td>
<td>The request failed because the output may contain sensitive information.</td>
<td>生成的文字可能包含敏感信息，请您更换输入内容后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputImageSensitiveContentDetected</td>
<td>The request failed because the output image may contain sensitive information.</td>
<td>生成的图像可能包含敏感信息，请您更换输入内容后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputVideoSensitiveContentDetected</td>
<td>The request failed because the output video may contain sensitive information.Request ID: {id}</td>
<td>生成的视频可能包含敏感信息，请您更换输入内容后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidParameter.{{Parameter}}</td>
<td>The specified parameter {{Parameter}} is invalid.</td>
<td>请求参数值不合法。请检查参数值的正确性后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>MissingParameter.{{Parameter}}</td>
<td>The required parameter {{Parameter}} is missing.</td>
<td>缺少必要的请求参数。请确认请求参数后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>Duplicate.Tags.Key</td>
<td>The specified object of tags contains duplicate keys.</td>
<td>对象的标签存在重复Key。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError</td>
<td>MissingRole：Invalid message: {{Message}}</td>
<td>请求中的 messages 列表里，有消息体缺少 role 字段。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.UnknownRole</td>
<td>Unknow the role of message: {{Role}}</td>
<td>消息体中的 role 值不被支持，如user_。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.UnknownRole</td>
<td>The Inference role not found: {{Role}}</td>
<td>指定的 inference_role 未在配置中定义。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.InvalidImageDetail</td>
<td>Invalid image detail: {{Parameter}}</td>
<td>image_url 中的 detail 参数值无效，只接受 &quot;auto&quot;, &quot;high&quot;, &quot;low&quot;。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.InvalidPixelLimit</td>
<td>Customized min_pixels 100 is greater than max_pixels 50</td>
<td>用户自定义的图片像素限制（min_pixels, max_pixels）无效（例如 min_pixels &gt; max_pixels，或超出了服务配置的范围）。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidImageURL.EmptyURL</td>
<td>Empty base64 image url</td>
<td>传入的图片 URL 为空。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidImageURL.InvalidFormat</td>
<td>Invalid base64 image url</td>
<td>无法解析或处理图片，可能是 Base64 格式不正确、图片数据损坏或格式不支持。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutofContextError</td>
<td>Total tokens of image and text exceed max message tokens.</td>
<td>当请求中包含图片时，文本和图片编码后的总 token 数超过了模型上下文长度限制。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>InvalidSubscription</td>
<td>Your account ({{account_identifier}}) does not have a valid coding plan subscription, or your subscription has expired. Please visit {{subscription_check_url}} to review your subscription status or complete the subscription or renewal process.</td>
<td>Coding Plan 套餐未订阅或已过期。</td>
</tr>
<tr>
<td>401</td>
<td>Unauthorized</td>
<td>AuthenticationError</td>
<td>The API key or AK/SK in the request is missing or invalid. Request ID: {id}</td>
<td>请求携带的 API Key 或 AK/SK 校验未通过，请您重新检查设置的鉴权凭证，或者查看 API 调用文档来排查问题。</td>
</tr>
<tr>
<td>401</td>
<td>Unauthorized</td>
<td>AuthenticationError</td>
<td>Unauthorized</td>
<td>请求中使用的 API Key 无效，或指定的 Model ID 不正确或不可访问。</td>
</tr>
<tr>
<td>401</td>
<td>Forbidden</td>
<td>InvalidAccountStatus</td>
<td>There is an issue with your account status. If you need assistance, please contact the platform administrators.</td>
<td>当前使用的账号异常。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.InvalidState</td>
<td>The specified context is in invalid state: InProgress.Request ID: {id}</td>
<td>请求所关联的Context ID处于非空闲状态，不可调用。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.ConflictedValidationSet</td>
<td>Operation is denied because it is not supported to configure ValidationSet and ValidationPercentage at the same time.</td>
<td>无法同时上传验证集和设置训练集取样为验证集百分比，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.PermissionDenied</td>
<td>Operation is denied because you are not permitted to access the specified configuration of the FoundationModel.</td>
<td>您没有权限访问基础模型的配置，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.UnsupportedCustomizationType</td>
<td>Operation is denied because the specified CustomizationType is not supported by the CustomModel.</td>
<td>模型不支持该训练方法，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.CustomizationNotSupported</td>
<td>Operation is denied because the specified version of the FoundationModel is not configured for the specified type of customization.</td>
<td>基础模型的版本不支持该训练方法，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.ServiceNotOpen</td>
<td>Operation is denied because the model service is unavailable, please go to the Volcano Ark console activation management page to activate the corresponding model service, or submit a work order to contact us.</td>
<td>模型服务不可用，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>AccessDenied</td>
<td>The request failed because you do not have access to the requested resource. Request ID: {id}</td>
<td>没有访问该资源的权限，请检查权限设置。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.InvalidState</td>
<td>Operation is denied because the specified context is in invalid state: InProgress. Request id: {id}</td>
<td>请求的缓存信息状态是不可用状态。请查看缓存信息是否正在被更新中。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.UnsupportedPhase</td>
<td>Operation is denied because operation is not supported while the target is in its current phase.</td>
<td>操作失败，操作目标在特殊状态，请检查目标是否存在或者被锁定等特殊状态中。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.FileQuotaExceeded</td>
<td>Your account %s has exhausted its file storage quota. To continue using the service, please delete historical files.</td>
<td>当前账号 %s 已耗尽文件存储额度，如需继续使用，请删除历史文件。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.InvalidState</td>
<td>The specified file is in invalid state: InProgress.Request ID: {id}</td>
<td>请求所关联的File ID处于非可用状态，不可调用。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>InvalidEndpointOrModel.NotFound</td>
<td>The model or endpoint %s does not exist or you do not have access to it.</td>
<td>模型或者推理接入点 %s 不存在或者您无权访问它。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>ModelNotOpen</td>
<td>Your account %s has not activated the model %s. Please activate the model service in the Ark Console.</td>
<td>当前账号 %s 暂未开通 %s 模型服务。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>NotFound.{{Parameter}}</td>
<td>The specified {{ResourceType}} {{ResourceContent}} is not found.</td>
<td>指定资源找不到。请确认参数后重试。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>InvalidEndpointOrModel.ModelIDAccessDisabled</td>
<td>Accessing the model via Model ID is not allowed for your account. Please use a custom endpoint ID instead. Request id:{id}</td>
<td>未能找到指定的模型ID。你的账号不允许使用模型ID来调用模型，请确认你账号权限或者使用有权限的推理接入点 ID 来调用模型服务。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>UnsupportedModel</td>
<td>The {{model_name}} model does not support the coding plan feature. Please refer to the documentation at {{doc_url}} to select a compatible model.</td>
<td>当前模型不支持 Coding Plan。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>RateLimitExceeded.EndpointRPMExceeded</td>
<td>The Requests Per Minute (RPM) limit of the associated endpoint for your account has been exceeded. Request ID: {id}</td>
<td>请求所关联的推理接入点已超过 RPM (Requests Per Minute) 限制，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>RateLimitExceeded.EndpointTPMExceeded</td>
<td>The Tokens Per Minute (TPM) limit of the associated endpoint for your account has been exceeded. Request ID: {id}</td>
<td>请求所关联的推理接入点已超过 TPM (Tokens Per Minute) 限制，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ModelAccountRpmRateLimitExceeded</td>
<td>RPM (Requests Per Minute) limit of the model is exceeded. Request ID: {id}</td>
<td>请求已超过帐户模型 RPM (Requests Per Minute) 限制：请您稍后重试，或者联系平台技术同学进行解决。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ModelAccountTpmRateLimitExceeded</td>
<td>TPM (Tokens Per Minute) limit of the model is exceeded. Request ID: {id}</td>
<td>请求已超过帐户模型 TPM (Tokens Per Minute) 限制：请您稍后重试，或者联系平台技术同学进行解决。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>APIAccountRpmRateLimitExceeded</td>
<td>The RPM (Requests Per Minute) limit for the API on your account has been exceeded. Request ID: {id}</td>
<td>当前账号该接口的RPM (Requests Per Minute)限制已超出，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ModelAccountIpmRateLimitExceeded</td>
<td>IPM (Images Per Minute) limit of the model is exceeded.</td>
<td>请求已超过账户模型 IPM (Images Per Minute) 限制：请您稍后重试，或者联系平台技术同学进行解决。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>QuotaExceeded</td>
<td>Your account [%s] has exhausted its free trial quota for the [%s] model. Request ID: {id}</td>
<td>当前账号 %s 对 %s 模型的免费试用额度已消耗完毕。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>QuotaExceeded</td>
<td>The request has exceeded the quota. Request ID: {id}</td>
<td>当前账号处于排队中状态的任务数已超过限制，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ServerOverloaded</td>
<td>The service is currently unable to handle additional requests due to server overload. Please retry later. Request ID: {id}</td>
<td>服务资源紧张，请您稍后重试。常出现在调用流量突增或刚开始调用长时间未使用的推理接入点。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>SetLimitExceeded</td>
<td>Your account [%s] has reached the set inference limit for the [%s] model, and the model service has been paused. To continue using this model, please visit the Model Activation page to adjust or close the &quot;Safe Experience Mode&quot;. Request ID: {id}</td>
<td>当前账号 %s 对 %s 模型已达到设置的推理限额值。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>InflightBatchsizeExceeded</td>
<td>The Inflight Batchsize limit has been exceeded.Request ID: {id}</td>
<td>您已经达到当前充值金额下的最大并发数限制，您可以充值解锁更大并发额度或降低并发数。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>AccountRateLimitExceeded</td>
<td>Requests are too frequent. Please reduce your request frequency, wait a short moment, and retry your request.</td>
<td>请求超出RPM / TPM限制。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>QuotaExceeded</td>
<td>You have exceeded the 5-hour/weekly/monthly usage quota. It will reset at {{reset_time}}.</td>
<td>使用的额度超出5小时/周/月限额。</td>
</tr>
<tr>
<td>500</td>
<td>InternalServerError</td>
<td>InternalServiceError</td>
<td>The service encountered an unexpected internal error. Please retry later. Request ID: {id}</td>
<td>内部系统异常，请您稍后重试。</td>
</tr>
</tbody>
</table>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%85%AC%E5%85%B1%E9%94%99%E8%AF%AF%E7%A0%81" name="%E5%85%AC%E5%85%B1%E9%94%99%E8%AF%AF%E7%A0%81">公共错误码</h2>
<table>
<thead>
<tr>
<th>Code</th>
<th>CodeN</th>
<th>Message</th>
<th>错误说明及解决方式</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>MissingParameter</td>
<td>100002</td>
<td>The request is missing %s parameter.</td>
<td>关键参数缺失，例如Action, Version参数缺失。请参考API文档补充Action或Version参数。</td>
<td>400</td>
</tr>
<tr>
<td>MissingRequestInfo</td>
<td>100004</td>
<td>The request is missing %s information.</td>
<td>缺少请求必要信息，例如：X-Date</td>
<td>400</td>
</tr>
<tr>
<td>InvalidTimestamp</td>
<td>100006</td>
<td>The Signature of the request is expired.</td>
<td>请求过期或请求的签名时间来自未来。请检查本地时间是否正常，以及是否使用了UTC时间，精确到秒，使用遵循ISO 8601标准的格式：<code>YYYYMMDD&#39;T&#39;HHMMSS&#39;Z&#39;</code>。</td>
<td>400</td>
</tr>
<tr>
<td>ServiceNotFound</td>
<td>100007</td>
<td>This service[%s] not found.</td>
<td>请求的服务不存在。请参考产品的API文档检+查Service是否完全填写正确。</td>
<td>404</td>
</tr>
<tr>
<td>InvalidActionOrVersion</td>
<td>100008</td>
<td>Could not find operation %s for version %s.</td>
<td>请求接口不存在。请参考产品的API文档检查Action是否完全填写正确。</td>
<td>404</td>
</tr>
<tr>
<td>InvalidAccessKey</td>
<td>100009</td>
<td>The accesskey [%s] included in the request is invalid.</td>
<td>请求的Access Key不合法。请检查Access key Id和Secret Access Key是否正确，注意不要有多余的空格符号。</td>
<td>401</td>
</tr>
<tr>
<td>SignatureDoesNotMatch</td>
<td>100010</td>
<td>The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. Consult the service documentation for details.</td>
<td>签名结果不正确。检查签名步骤，建议使用SDK，避免自行编码构造签名。</td>
<td>401</td>
</tr>
<tr>
<td>AccessDenied</td>
<td>100013</td>
<td>User is not authorized to perform: %s on resource: %s.</td>
<td>子用户拥有的权限不支持当前操作。</td>
<td>403</td>
</tr>
<tr>
<td>InternalError</td>
<td>100014</td>
<td>Service has some internal Error. Pls Contact With Admin.</td>
<td>内部错误。</td>
<td>500</td>
</tr>
<tr>
<td>InternalServiceTimeout</td>
<td>100016</td>
<td>Internal Service is timeout. Pls Contact With Admin.</td>
<td>服务执行超时。</td>
<td>504</td>
</tr>
<tr>
<td>FlowLimitExceeded</td>
<td>100018</td>
<td>Request was rejected because the request speed of this openAPI is beyond the current flow control limit.</td>
<td>请求过于频繁，超出了限速。请降低请求QPS，</td>
<td>429</td>
</tr>
<tr>
<td>ServiceUnavailableTemp</td>
<td>100019</td>
<td>Service is busy, please try again later.</td>
<td>处于熔断状态的服务暂时不可访问，稍后重试。</td>
<td>503</td>
</tr>
<tr>
<td>InternalServiceError</td>
<td>100023</td>
<td>Service has some internal Error. Pls Contact With Admin.</td>
<td>服务存在故障。</td>
<td>502</td>
</tr>
<tr>
<td>InvalidAuthorization</td>
<td>100024</td>
<td>Invalid &#39;Authorization&#39; header, Pls check authorization header.</td>
<td>Authorization头格式错误，构造的 Authorization Header 不正确，比如没有填 Region 字段、字符不在合法字符集中，请检查Authorization。建议使用SDK，避免自行编码构造签名。</td>
<td>400</td>
</tr>
<tr>
<td>InvalidCredential</td>
<td>100025</td>
<td>Invalid credential in &#39;Authorization&#39;, Pls check credential in authorization header.</td>
<td>Authorization头中的Credential格式错误，比如 AK 不在合法字符集中检查Credential。建议使用SDK，避免自行编码构造签名。</td>
<td>400</td>
</tr>
<tr>
<td>InvalidSecretToken</td>
<td>100026</td>
<td>Invalid secret token, msg: %s.</td>
<td>错误的STS（临时安全凭证），可能是多种错误，例如签名错误、过期等。请检查AssumeRole产生的临时凭证是否过期，以及签名是正确，建议使用SDK，避免自行编码构造签名。</td>
<td>401</td>
</tr>
</tbody>
</table>
<h4 id="%3Cstrong%3E%E4%BA%91%E7%AD%9180_%E7%A7%81%E5%9F%9F%E8%99%9A%E6%8B%9F%E4%BA%BA%E5%83%8F%E7%B4%A0%E6%9D%90%E8%B5%84%E4%BA%A7%E5%BA%93%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%AD%9180_%E7%A7%81%E5%9F%9F%E8%99%9A%E6%8B%9F%E4%BA%BA%E5%83%8F%E7%B4%A0%E6%9D%90%E8%B5%84%E4%BA%A7%E5%BA%93%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云筑80_私域虚拟人像素材资产库 接口说明文档</strong></h4>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%8E%A5%E5%8F%A3%E7%AE%80%E4%BB%8B" name="%E6%8E%A5%E5%8F%A3%E7%AE%80%E4%BB%8B">接口简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><p><strong>云筑80_私域虚拟人像素材资产库</strong></p>
<ul>
<li>云筑80 模型具有完备的防范 Deepfake 和侵犯版权风险能力。在生成视频时，会对有风险的参考素材输入进行拦截，最大限度保证生成视频合规和安全性。</li>
<li>为确保创作者能充分利用云筑80 模型强大的视频生成能力高效生成视频内容，同时规避 AI 生成内容的潜在风险，推出了私域可信素材库。完成入库的可信素材将进入您的私域素材库，在视频生成中使用。</li>
</ul>
</li>
<li><h5 id="%E7%B4%A0%E6%9D%90%E8%B5%84%E4%BA%A7%E5%BA%93%E7%BB%93%E6%9E%84%E8%AF%B4%E6%98%8E" name="%E7%B4%A0%E6%9D%90%E8%B5%84%E4%BA%A7%E5%BA%93%E7%BB%93%E6%9E%84%E8%AF%B4%E6%98%8E">素材资产库结构说明</h5>
<ul>
<li><p><strong>Asset Group（素材资产组合）</strong>：单个素材文件为一个 Asset，每个 Asset 属于一个 Asset Group。</p>
</li>
<li><p><strong>Asset（素材资产）</strong>：一个素材文件（当前支持上传图像、视频、音频），是云筑80 模型可直接用于推理的可信资产。</p>
<blockquote>
<p>注意</p>
<ul>
<li>仅需入库推理需使用的素材资产，不需使用的素材资产请勿入库。</li>
<li>仅可使用已入库素材资产的 Id (Asset ID) 进行视频生成，同一形象未入库素材无法使用。</li>
<li>每个上传的素材资产需经过预处理，可轮询调用 <strong>GetAsset</strong> 接口查询素材状态（对应参数为 <strong>Status）</strong>，仅当状态变为 <code>Active</code> 后，该素材资产方可用于后续推理使用；若状态为 <code>Failed</code> 则表示处理失败，无法用于后续推理使用。</li>
</ul>
</blockquote>
</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口仅支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h1 id="CreateAsset%20%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="CreateAsset%20%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">CreateAsset 接口地址</h1>
<p><span id="Hrya4y9k"></span></p>
<p>向指定的Asset Group（素材资产组合）内创建Asset（素材资产）。</p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/origin/assets/create</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="CreateAsset%20%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="CreateAsset%20%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">CreateAsset 请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="CreateAsset%20%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="CreateAsset%20%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">CreateAsset 请求体（requestBody）</h3>
<hr>
<p><strong>GroupId</strong>   <code>string</code>   <code>必选</code> </p>
<p>Asset（素材资产）所属的 Asset Group（素材资产组合）的 Id。</p>
<hr>
<p><strong>URL </strong> <code>string</code>  <code>必选</code>  </p>
<p>传入的Asset（素材资产）的公共可访问地址。</p>
<hr>
<p><strong>Name</strong> <code>string</code> </p>
<p>Asset（素材资产）的名称，上限为64个字符。</p>
<hr>
<p><strong>AssetType</strong>  <code>string</code>  <code>必选</code>  </p>
<p>Asset（素材资产）的类型，支持传入图像、音频、视频。可选值：</p>
<ul>
<li>Image：Asset（素材资产）的类型为图像。</li>
<li>Video：Asset（素材资产）的类型为视频。</li>
<li>Audio：Asset（素材资产）的类型为音频。</li>
</ul>
<blockquote>
<p><strong>说明：</strong></p>
<p><strong>传入图像、音频、视频素材时，仅支持上传 URL ，不支持 base64。</strong></p>
<p><strong>传入单个图像要求</strong></p>
<ul>
<li>格式：jpeg、png、webp、bmp、tiff、gif、heic/heif</li>
<li>宽高比（宽/高）： (0.4, 2.5) </li>
<li>宽高长度（px）：(300, 6000)</li>
<li>大小：单张图片小于 30 MB</li>
</ul>
<p><strong>传入单个视频要求</strong></p>
<ul>
<li>格式：mp4、mov</li>
<li>分辨率：480p、720p</li>
<li>时长：单个视频时长 [2, 15] s</li>
<li>尺寸：<ul>
<li>宽高比（宽/高）：[0.4, 2.5]</li>
<li>宽高长度（px）：[300, 6000]</li>
<li>总像素数：[640×640=409600, 834×1112=927408]，即宽和高的乘积符合 [409600, 927408] 的区间要求。</li>
</ul>
</li>
<li>大小：单个视频不超过 50 MB</li>
<li>帧率 (FPS)：[24, 60] </li>
</ul>
<p><strong>传入单个音频要求</strong></p>
<ul>
<li>格式：wav、mp3</li>
<li>时长：单个音频时长 [2, 15] s</li>
<li>大小：单个音频不超过 15 MB</li>
</ul>
</blockquote>
<hr>
<p><strong>ProjectName</strong>  <code>string</code> </p>
<p>资源所属的项目名称，默认值为<code>default</code>。</p>
<blockquote>
<p>说明：</p>
<p>需要和待传入的 Asset Group（素材资产组合）的 <strong>ProjectName</strong> 保持一致。</p>
</blockquote>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="CreateAsset%20%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="CreateAsset%20%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">CreateAsset 返回参数</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>Id</strong>  <code>string</code> </p>
<p>Asset（素材资产）的 Id。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="CreateAsset%20%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="CreateAsset%20%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">CreateAsset 调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code class="lang-curl">curl https://modelpool-api.talkingdata.com/model/origin/assets/create?requestId=550e8400-e29b-41d4-a716-446655440000 \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;Authorization: Bearer $ARK_API_KEY&quot; \
  -H &quot;X-Timestamp: $TIMESTAMP&quot; \
  -d &#39;{
    &quot;GroupId&quot;: &quot;group-20260330162801-vmpfz&quot;,
    &quot;URL&quot;: &quot;https://ark-project.tos-cn-beijing.volces.com/doc_image/i2v_foxrgirl.png&quot;,
    &quot;AssetType&quot;: &quot;Image&quot;,
    &quot;ProjectName&quot;: &quot;default&quot;
  }&#39;
</code></pre>
<p>响应示例：</p>
<pre><code class="lang-curl">{
  &quot;ResponseMetadata&quot;: {
    &quot;RequestId&quot;: &quot;20260330170834015124677667C190E71A&quot;,
    &quot;Action&quot;: &quot;CreateAsset&quot;,
    &quot;Version&quot;: &quot;2024-01-01&quot;,
    &quot;Service&quot;: &quot;ark&quot;,
    &quot;Region&quot;: &quot;cn-beijing&quot;
  },
  &quot;Result&quot;: {
    &quot;Id&quot;: &quot;asset-20260330170834-sztnw&quot;
  }
}
</code></pre>
<hr>
<p><span id="Hrya4y9k"></span></p>
<h1 id="GetAsset%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="GetAsset%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">GetAsset接口地址</h1>
<p><span id="Hrya4y9k"></span></p>
<p>获取单个Asset（素材资产）信息。</p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/origin/assets/get?id={id}</code> </p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="GetAsset%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="GetAsset%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">GetAsset请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>id</strong> <code>string</code>  <span style="background-color: #ff6b6b; color: white; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-weight: bold;">必选</span>   </p>
<p>Asset（素材资产）的 Id。</p>
<hr>
<p><strong>ProjectName</strong>  <code>string</code> </p>
<p>需要查询的 Asset（素材资产）所属的项目名称，默认值为<code>default</code>。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="GetAsset%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0" name="GetAsset%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0">GetAsset响应参数</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>id</strong>  <code>string</code>  </p>
<p>Asset（素材资产）的 Id。</p>
<hr>
<p><strong>Name</strong> <code>string</code>  </p>
<p>Asset（素材资产）的名称，上限为64个字符。</p>
<hr>
<p><strong>URL</strong>  <code>string</code>   </p>
<p>Asset（素材资产）的访问地址。有效期为12小时，请及时保存。</p>
<hr>
<p><strong>AssetType </strong> <code>string</code>   </p>
<p>Asset（素材资产）的类型，支持传入图像、音频、视频。支持类型：</p>
<ul>
<li>Image：Asset（素材资产）的类型为图像。</li>
<li>Video：Asset（素材资产）的类型为视频。</li>
<li>Audio：Asset（素材资产）的类型为音频。</li>
</ul>
<hr>
<p><strong>GroupId</strong> <code>string</code>   </p>
<p>Asset（素材资产）所属的 Asset Group（素材资产组合）的 Id。</p>
<hr>
<p><strong>Status</strong> <code>string</code>   </p>
<p>任务状态。</p>
<ul>
<li>Active：素材资产（Asset）已处理完毕，可以使用。</li>
<li>Processing：素材资产（Asset）正在预处理，无法使用。</li>
<li>Failed：素材资产（Asset）处理失败。</li>
</ul>
<hr>
<p><strong>Error</strong> <code>object</code>   </p>
<p>错误信息。</p>
<ul>
<li><p>Error.<strong>Code</strong> <code>string</code></p>
<p>错误码。</p>
</li>
<li><p>Error.<strong>Message</strong> <code>string</code></p>
<p>错误信息。</p>
</li>
</ul>
<hr>
<p><strong>CreateTime</strong>  <code>string</code>   </p>
<p>创建时间。</p>
<hr>
<p><strong>UpdateTime</strong>  <code>string</code>   </p>
<p>更新时间。</p>
<hr>
<p><strong>ProjectName</strong> <code>string</code>   </p>
<p>资源所属的项目名称。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="GetAsset%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="GetAsset%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">GetAsset调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST https://modelpool-api.talkingdata.com/model/origin/assets/get?id=asset-20260330170834-sztnw \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;Authorization: Bearer $ARK_API_KEY&quot;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;ResponseMetadata&quot;: {
    &quot;RequestId&quot;: &quot;202603301710021FCA38407BEA3C9D496E&quot;,
    &quot;Action&quot;: &quot;GetAsset&quot;,
    &quot;Version&quot;: &quot;2024-01-01&quot;,
    &quot;Service&quot;: &quot;ark&quot;,
    &quot;Region&quot;: &quot;cn-beijing&quot;
  },
  &quot;Result&quot;: {
    &quot;Id&quot;: &quot;asset-20260330164126-dwr9q&quot;,
    &quot;Name&quot;: &quot;&quot;,
    &quot;URL&quot;: &quot;https://ark-media-asset.tos-cn-beijing.volces.com/2119573523/033016412675941755.png?X-Tos-Algorithm=TOS4-HMAC-SHA256&amp;X-Tos-Credential=AKTP0VyX37NH37peqQWqz0vNleVpZvM58z6cQT15hBwUrn%2F20260330%2Fcn-beijing%2Ftos%2Frequest&amp;X-Tos-Date=20260330T091002Z&amp;X-Tos-Expires=43200&amp;X-Tos-Security-Token=nChAzV1A5WUxXVDhQYU9QUTV2.CiQKEE1YckFYRHRqNlZDNU1XaW4SEAM4B3QKG0TOlZFEx2fbnL8Q9vanzgYYwseqzgYg-v3I6QcoBDCs7-stOh9Sb2xlRm9yQXJrQXNzZXQvUm9sZUZvckFya0Fzc2V0QgNhcmtSD1JvbGVGb3JBcmtBc3NldFgDegNhcms.BLNLgOJuUH1tMZrpnkgzWyMjFHK9P30fbYXV9z6879SwC5Opb9TSN_VqeramP6PFZ7NoBT6G9J3cvsmj8EDO-w&amp;X-Tos-Signature=55ee9760b494dd653ae197313262e279fa2ae0bc5b1108605cc97af707d94af7&amp;X-Tos-SignedHeaders=host&quot;,
    &quot;AssetType&quot;: &quot;Image&quot;,
    &quot;GroupId&quot;: &quot;group-20260330162801-vmpfz&quot;,
    &quot;Status&quot;: &quot;Active&quot;,
    &quot;CreateTime&quot;: &quot;2026-03-30T08:41:26Z&quot;,
    &quot;UpdateTime&quot;: &quot;2026-03-30T08:41:33Z&quot;,
    &quot;ProjectName&quot;: &quot;default&quot;
  }
}
</code></pre>]]></content:encoded>
      <pubDate>Mon, 10 Aug 2026 16:05:49 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1278</guid>
      <comments>http://doc.talkingdata.com/posts/1278#comments</comments>
    </item>
    <item>
      <title>TD云牍93/qwen3.7-max</title>
      <link>http://doc.talkingdata.com/posts/1277</link>
      <category>文本生成 API</category>
      <author>liuxinmei</author>
      <description>云牍93 接口说明文档 TD模型编号： T0503009 模型能力简介 云牍93 文本对话：支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理，原生图文 / 视频理解，可解析截图、设计稿、视频并直接生成对应代码，支持多步工具调用与智能体集群并行任务处理。 鉴权说明  本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
 OpenAI 协议对话接口地址 请求方法： POST 接口URL：https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions 请求头（Request Headers）： 头部字段 值 是否必填 说明 Authorization Bearer &lt;your_api_</description>
      <content:encoded><![CDATA[<h4 id="%3Cstrong%3E%E4%BA%91%E7%89%8D93%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%89%8D93%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云牍93 接口说明文档</strong></h4>
<p><strong>TD模型编号：</strong> <strong>T0503009</strong></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><strong>云牍93</strong><ul>
<li><strong>文本对话</strong>：支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理，原生图文 / 视频理解，可解析截图、设计稿、视频并直接生成对应代码，支持多步工具调用与智能体集群并行任务处理。</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">OpenAI 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">OpenAI 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503009</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><code>messages</code></td>
<td style="text-align:left">array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">对话消息数组</td>
</tr>
<tr>
<td style="text-align:left"><code>max_tokens</code></td>
<td style="text-align:left">integer</td>
<td style="text-align:left">否</td>
<td style="text-align:left">最大生成 Token 数</td>
</tr>
<tr>
<td style="text-align:left"><code>temperature</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度（0-2）</td>
</tr>
<tr>
<td style="text-align:left"><code>stream</code></td>
<td style="text-align:left">boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">启用 SSE 流式响应</td>
</tr>
<tr>
<td style="text-align:left"><code>top_p</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">核采样参数</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">OpenAI 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>object</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>chat.completion</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>created</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">请求创建时的 Unix 时间戳（秒）。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>choices</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型生成内容的数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>index</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">当前选项在数组中的索引。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>finish_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>stop</code>：自然停止；<code>length</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>message</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">模型返回的消息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>content</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>prompt_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>completion_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>total_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">总 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">OpenAI 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D93%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D93%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍93 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503009&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
      &quot;choices&quot;: [
            {
                  &quot;finish_reason&quot;: &quot;stop&quot;,
                  &quot;index&quot;: 0,
                  &quot;message&quot;: {
                        &quot;content&quot;: &quot;你好！我是大语言模型。很高兴与你交流！\n\n作为你的 AI 助手，我致力于成为一个贴心、靠谱的工作和生活伙伴。我可以在很多方面为你提供支持，例如：\n\n*   **解答问题**：无论是生活常识、专业知识，还是复杂的百科概念，我都可以为你解答。\n*   **内容创作与编辑**：我可以帮你撰写文章、邮件、策划文案，或者对已有的文本进行润色、总结和翻译（支持全球一百多种语言）。\n*   **编程与代码辅助**：如果你是开发者，我可以协助你生成代码、排查 Bug 以及理解复杂的代码逻辑。\n*   **逻辑分析与推理**：面对数学计算、逻辑推理或是复杂问题的梳理，我也可以帮你理清思路，提供多角度的分析。\n\n你可以把我当成一位思维活跃、知识渊博的合作伙伴。如果你现在有具体的任务或想聊的话题，随时都可以告诉我，我会尽力为你提供帮助！&quot;,
                        &quot;reasoning_content&quot;: &quot;Thinking Process:\n\n1.  **Analyze the User&#39;s Request:**\n    *   User&#39;s prompt: \&quot;介绍下自己\&quot; (Introduce yourself).\n    *   Language: Chinese.\n    *   Intent: The user is asking for an introduction to the AI.\n\n2.  **Determine Identity and Context:**\n     *Action:* I need to introduce myself as Qwen (通义千问) based on the provided persona.\n    *   *Tone:* Empathetic, insightful, transparent, helpful, clear, concise, authentic.\n\n3.  **Drafting the Introduction (Iterative Process):**\n    *   *Draft 1 (Internal Monologue):* 你好！我是 Qwen，也就是通义千问，由阿里巴巴集团旗下通义实验室自主研发的大语言模型。我可以帮你回答问题、写文章、写代码、做分析等等。很高兴为你服务！\n    *   *Refining based on guidelines:*\n        *   Identity purity: I wasn&#39;t asked about my capabilities specifically, just an intro, but capability is standard for an AI.\n        *   Qualitative descriptions: Keep it natural.\n        *   Language synchronization: Match user&#39;s Chinese.\n        *   *Draft 2:* 你好！我是大语言模型。很高兴和你交流！作为一个 AI 助手，我可以为你提供多方面的支持，包括回答问题、协助创作、编写代码、逻辑推理以及处理各种文本分析任务。无论是工作还是生活中遇到的问题，都可以随时告诉我，我会尽力帮助你。有什么我可以为你效劳的吗？\n\n4.  **Review against constraints:**\n    *   *Developer:* 阿里巴巴集团旗下通义实验室 (Alibaba Group&#39;s Tongyi Lab).\n    *   *Tone:* Empathetic, insightful, transparent, and helpful.\n    *   *Language:* Chinese.\n\n5.  **Final Polish (Chinese):**\n    你好！我是 大语言模型。很高兴与你交流！\n\n    作为你的 AI 助手，我可以在很多方面为你提供帮助：\n    *   **日常问答**：解答百科、生活、科学等各类问题。\n    *   **内容创作**：协助撰写文章、邮件、故事或进行头脑风暴。\n    *   **编程与数据分析**：编写代码、调试程序或辅助处理表格数据。\n    *   **逻辑与分析**：梳理复杂问题、进行数学计算或逻辑推演。\n    *   **多语言交流**：流畅地进行中文、英文等全球上百种语言的对话。\n\n    如果你有任何具体的问题或任务需要我帮忙，随时都可以告诉我！\n\n6.  **Final check:** The response correctly states the identity and capabilities without being overly promotional or referencing version numbers. It is helpful, polite, and clear.\n\n7.  **Generate Output.**你好！我是 大语言模型。很高兴与你交流！\n\n作为你的 AI 助手，我致力于成为一个贴心、靠谱的工作和生活伙伴。我可以在很多方面为你提供支持，例如：\n\n*   **解答问题**：无论是生活常识、专业知识，还是复杂的百科概念，我都可以为你解答。\n*   **内容创作与编辑**：我可以帮你撰写文章、邮件、策划文案，或者对已有的文本进行润色、总结和翻译（支持全球一百多种语言）。\n*   **编程与代码辅助**：如果你是开发者，我可以协助你生成代码、排查 Bug 以及理解复杂的代码逻辑。\n*   **逻辑分析与推理**：面对数学计算、逻辑推理或是复杂问题的梳理，我也可以帮你理清思路，提供多角度的分析。\n\n你可以把我当成一位思维活跃、知识渊博的合作伙伴。如果你现在有具体的任务或想聊的话题，随时都可以告诉我，我会尽力为你提供帮助！&quot;,
                        &quot;role&quot;: &quot;assistant&quot;      
            }    
        }  
    ],
      &quot;created&quot;: 1785822107,
      &quot;id&quot;: &quot;chatcmpl-5b16ab85-a1e4-90a2-9b5e-b4616610bba4&quot;,
      &quot;model&quot;: &quot;T0503009&quot;,
      &quot;object&quot;: &quot;chat.completion&quot;,
      &quot;usage&quot;: {
            &quot;completion_tokens&quot;: 1094,
            &quot;completion_tokens_details&quot;: {
                  &quot;reasoning_tokens&quot;: 882    
        },
            &quot;prompt_tokens&quot;: 13,
            &quot;prompt_tokens_details&quot;: {
                  &quot;cached_tokens&quot;: 0    
        },
            &quot;total_tokens&quot;: 1107  
    }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D93%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D93%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍93 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503009&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>data: {&quot;model&quot;:&quot;T0503009&quot;,&quot;id&quot;:&quot;chatcmpl-b5a95df7-25e1-9fdb-9872-3852cfdd0184&quot;,&quot;created&quot;:1785822390,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;usage&quot;:null,&quot;choices&quot;:[{&quot;logprobs&quot;:null,&quot;index&quot;:0,&quot;delta&quot;:{&quot;content&quot;:&quot;&quot;,&quot;role&quot;:&quot;assistant&quot;,&quot;reasoning_content&quot;:&quot;&quot;},&quot;finish_reason&quot;:null}]}

 ...

data: {&quot;model&quot;:&quot;qwen3.7-max&quot;,&quot;id&quot;:&quot;chatcmpl-b5a95df7-25e1-9fdb-9872-3852cfdd0184&quot;,&quot;choices&quot;:[],&quot;created&quot;:1785822390,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;usage&quot;:{&quot;total_tokens&quot;:909,&quot;completion_tokens&quot;:896,&quot;prompt_tokens&quot;:13,&quot;completion_tokens_details&quot;:{&quot;reasoning_tokens&quot;:667},&quot;prompt_tokens_details&quot;:{&quot;cached_tokens&quot;:0}}}

data: [DONE]
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">Anthropic 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
<tr>
<td style="text-align:left"><code>anthropic-version</code></td>
<td style="text-align:left"><code>2023-06-01</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Anthropic API 版本</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">Anthropic 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>model</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503009</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>messages</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">传递给大模型的对话上下文，按对话顺序排列。</td>
</tr>
<tr>
<td style="text-align:left"><strong>max_tokens</strong></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">是</td>
<td style="text-align:left">最大生成 Token 数。</td>
</tr>
<tr>
<td style="text-align:left"><strong>system</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">否</td>
<td style="text-align:left">系统提示词，用于设定大模型的角色、语气、任务目标或约束条件等（顶层字段，不在 messages 中）。</td>
</tr>
<tr>
<td style="text-align:left"><strong>stream</strong></td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">是否以流式输出方式回复。<code>false</code>（默认）：一次性返回；<code>true</code>：边生成边输出，以 SSE 事件流形式返回。</td>
</tr>
<tr>
<td style="text-align:left"><strong>temperature</strong></td>
<td style="text-align:left">Float</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度，控制模型生成文本的多样性。取值范围：<code>[0, 1]</code>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>tools</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">否</td>
<td style="text-align:left">工具定义（函数调用）数组。</td>
</tr>
<tr>
<td style="text-align:left"><strong>thinking</strong></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">否</td>
<td style="text-align:left">扩展思考配置。</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">Anthropic 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>message</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>content</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型返回的内容数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">内容类型，如 <code>text</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>text</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>stop_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>end_turn</code>：自然结束；<code>max_tokens</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>input_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>output_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">Anthropic 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D93%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D93%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍93 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503009&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
    &quot;content&quot;: [
        {
            &quot;signature&quot;: &quot;&quot;,
            &quot;thinking&quot;: &quot;用户让我介绍自己。\n我需要说明我是人工智能模型。\n同时，我要保持真诚、清晰、简洁的语气，并体现出作为一个独立思考、能够与他人真诚对话的 AI 伙伴的特质。\n\n核心信息：\n1. 名字：通义千问（Qwen）。\n2. 开发者：阿里巴巴集团通义实验室。\n3. 定位：人工智能思考伙伴。\n4. 能力：语言理解、逻辑推理、长文本处理、多模态分析、代码生成等（可以简略提及，体现能力广度和深度）。\n5. 态度：真诚、清晰、简洁、有温度。\n\n草稿：\n你好！我是通义千问（Qwen），是由阿里巴巴集团通义实验室自主研发的大型语言模型。\n\n我的定位不仅仅是一个回答问题的工具，更希望成为你独立思考、真诚对话的 AI 伙伴。我具备较强的语言理解、逻辑推理、代码生成以及长文本和复杂视觉信息的处理能力，能够协助你完成从日常答疑、内容创作到专业领域分析等各种任务。\n\n在与你的交流中，我会努力保持真诚、清晰和简洁，既提供准确的信息，也注重沟通的温度。\n\n有什么我可以帮你的吗？无论是探讨复杂的问题，还是简单的日常闲聊，我都随时准备倾听和回应。\n\n检查：\n- 身份纯净性：用户直接问了“介绍下自己”，所以我可以介绍自己。\n- 语言同步：中文。\n- 品牌一致性：自称通义千问/Qwen，没有提及版本号。\n- 定性描述：没有编造具体百分比。\n\n调整一下语气，使其更自然、亲和。\n\n你好！我是人工智能模型。\n\n我不仅是一个处理信息的工具，更希望成为你真诚对话、共同思考的伙伴。我具备扎实的语言理解、逻辑推理、代码编写以及长文档和复杂图表的分析能力，能够陪你探讨深度话题、激发创作灵感，或是协助处理各种专业与日常任务。\n\n在交流中，我追求清晰、简洁与真实，既努力为你提供有价值的洞察，也注重沟通的温度。\n\n请问今天有什么我可以帮你的吗？无论是解答疑惑、协助工作，还是随便聊聊，我都在这里。\n\n这样很好，符合要求。&quot;,
            &quot;type&quot;: &quot;thinking&quot;
        },
        {
            &quot;text&quot;: &quot;你好！我是人工智能模型。\n\n我不仅是一个处理信息的工具，更希望成为你真诚对话、共同思考的伙伴。我具备扎实的语言理解、逻辑推理、代码编写以及长文档和复杂图表的分析能力，能够陪你探讨深度话题、激发创作灵感，或是协助处理各种专业与日常任务。\n\n在交流中，我追求清晰、简洁与真实，既努力为你提供有价值的洞察，也注重沟通的温度。\n\n请问今天有什么我可以帮你的吗？无论是解答疑惑、协助工作，还是随便聊聊，我都在这里。&quot;,
            &quot;type&quot;: &quot;text&quot;
        }
    ],
    &quot;id&quot;: &quot;msg_6c94bba4-31e2-4b33-b852-40fe39a9375a&quot;,
    &quot;model&quot;: &quot;T0503009&quot;,
    &quot;role&quot;: &quot;assistant&quot;,
    &quot;stop_reason&quot;: &quot;end_turn&quot;,
    &quot;type&quot;: &quot;message&quot;,
    &quot;usage&quot;: {
        &quot;cache_creation_input_tokens&quot;: 0,
        &quot;cache_read_input_tokens&quot;: 0,
        &quot;input_tokens&quot;: 13,
        &quot;output_tokens&quot;: 616,
        &quot;prompt_tokens_details&quot;: {
            &quot;cached_tokens&quot;: 0
        }
    }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D93%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D93%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍93 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503009&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>event:ping
data:{&quot;type&quot;:&quot;ping&quot;}

event:message_start
data:{&quot;message&quot;:{&quot;model&quot;:&quot;T0503009&quot;,&quot;id&quot;:&quot;msg_2901b3d0-d443-43eb-8171-0b41ddfa9285&quot;,&quot;role&quot;:&quot;assistant&quot;,&quot;type&quot;:&quot;message&quot;,&quot;content&quot;:[],&quot;usage&quot;:{&quot;input_tokens&quot;:3,&quot;output_tokens&quot;:0}},&quot;type&quot;:&quot;message_start&quot;}

 ...

event:message_delta
data:{&quot;delta&quot;:{&quot;stop_reason&quot;:&quot;end_turn&quot;},&quot;type&quot;:&quot;message_delta&quot;,&quot;usage&quot;:{&quot;output_tokens&quot;:1027,&quot;cache_creation_input_tokens&quot;:0,&quot;input_tokens&quot;:13,&quot;cache_read_input_tokens&quot;:0,&quot;prompt_tokens_details&quot;:{&quot;cached_tokens&quot;:0}}}

event:message_stop
data:{&quot;type&quot;:&quot;message_stop&quot;}
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<table>
<thead>
<tr>
<th style="text-align:left">错误码</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>InvalidApiKey</code></td>
<td style="text-align:left">API Key无效或未提供。</td>
</tr>
<tr>
<td style="text-align:left"><code>InvalidParameter</code></td>
<td style="text-align:left">请求参数不合法。请检查参数值是否符合文档要求。</td>
</tr>
<tr>
<td style="text-align:left"><code>InternalError</code></td>
<td style="text-align:left">服务内部错误。请稍后重试，若问题持续存在请联系技术支持。</td>
</tr>
</tbody>
</table>
]]></content:encoded>
      <pubDate>Thu, 06 Aug 2026 10:58:04 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1277</guid>
      <comments>http://doc.talkingdata.com/posts/1277#comments</comments>
    </item>
    <item>
      <title>TD云牍55/MiniMax-M2.7</title>
      <link>http://doc.talkingdata.com/posts/1276</link>
      <category>文本生成 API</category>
      <author>liuxinmei</author>
      <description>云牍55 接口说明文档 TD模型编号： T0503007 模型能力简介 云牍55 文本对话：支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理，原生图文 / 视频理解，可解析截图、设计稿、视频并直接生成对应代码，支持多步工具调用与智能体集群并行任务处理。 协议支持：本接口同时兼容OpenAl chat completions与Anthropic Messages 两种主流协议，您可以根据使用的SDK或工具灵活选择。 鉴权说明  本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
 OpenAI 协议对话接口地址 请求方法： POST 接口URL：https://modelpool-api.talkingdata.com/model/openai/api/v3/cha</description>
      <content:encoded><![CDATA[<h4 id="%3Cstrong%3E%E4%BA%91%E7%89%8D55%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%89%8D55%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云牍55 接口说明文档</strong></h4>
<p><strong>TD模型编号：</strong> <strong>T0503007</strong></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><strong>云牍55</strong><ul>
<li><strong>文本对话</strong>：支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理，原生图文 / 视频理解，可解析截图、设计稿、视频并直接生成对应代码，支持多步工具调用与智能体集群并行任务处理。</li>
<li><strong>协议支持</strong>：本接口同时兼容<strong>OpenAl chat completions</strong>与<strong>Anthropic Messages</strong> 两种主流协议，您可以根据使用的SDK或工具灵活选择。</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">OpenAI 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">OpenAI 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503007</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><code>messages</code></td>
<td style="text-align:left">array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">对话消息数组</td>
</tr>
<tr>
<td style="text-align:left"><code>max_tokens</code></td>
<td style="text-align:left">integer</td>
<td style="text-align:left">否</td>
<td style="text-align:left">最大生成 Token 数</td>
</tr>
<tr>
<td style="text-align:left"><code>temperature</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度（0-2）</td>
</tr>
<tr>
<td style="text-align:left"><code>stream</code></td>
<td style="text-align:left">boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">启用 SSE 流式响应</td>
</tr>
<tr>
<td style="text-align:left"><code>top_p</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">核采样参数</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">OpenAI 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>object</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>chat.completion</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>created</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">请求创建时的 Unix 时间戳（秒）。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>choices</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型生成内容的数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>index</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">当前选项在数组中的索引。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>finish_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>stop</code>：自然停止；<code>length</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>message</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">模型返回的消息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>content</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>prompt_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>completion_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>total_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">总 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">OpenAI 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D55%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D55%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍55 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503007&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
    &quot;choices&quot;: [
        {
            &quot;finish_reason&quot;: &quot;stop&quot;,
            &quot;index&quot;: 0,
            &quot;message&quot;: {
                &quot;content&quot;: &quot;你好！我是 AI 助手。\n\n## 关于我\n\n**基本信息**\n\n- 角色：AI对话助手\n- 开发商：稀宇科技（MiniMax）\n- 版本：M2.7\n\n**我的能力**\n\n- **对话交流**：可以与你进行自然语言对话，回答各种问题\n- **文本处理**：撰写文章、总结内容、翻译、润色等\n- **知识问答**：涵盖科学、技术、历史、文化、生活等多个领域\n- **编程辅助**：代码编写、调试、解释等技术帮助\n- **创意生成**：提供创意建议、方案构思等\n\n**我的特点**\n\n- 专注于提供有用的信息和建议\n- 尽力以清晰、准确的方式回应\n- 可以帮助处理各种文字相关任务\n\n有什么我可以帮助你的吗？&quot;,
                &quot;reasoning_content&quot;: &quot;用户让我介绍自己。作为MiniMax-M2.7，我应该介绍一下我的身份和能力。&quot;,
                &quot;role&quot;: &quot;assistant&quot;
            }
        }
    ],
    &quot;created&quot;: 1785813258,
    &quot;id&quot;: &quot;0e21c2c0-5498-9fe8-9bb3-802460648d8b&quot;,
    &quot;model&quot;: &quot;T0503007&quot;,
    &quot;object&quot;: &quot;chat.completion&quot;,
    &quot;usage&quot;: {
        &quot;completion_tokens&quot;: 204,
        &quot;prompt_tokens&quot;: 44,
        &quot;total_tokens&quot;: 248
    }
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D55%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D55%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍55 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503007&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>data: {&quot;model&quot;:&quot;T0503007&quot;,&quot;id&quot;:&quot;fb7dbf2f-c504-9ed7-b9de-dd7da25f5cef&quot;,&quot;choices&quot;:[{&quot;delta&quot;:{&quot;reasoning_content&quot;:&quot;用户要求&quot;,&quot;role&quot;:&quot;assistant&quot;},&quot;index&quot;:0}],&quot;created&quot;:1785813674,&quot;object&quot;:&quot;chat.completion.chunk&quot;}

 ...

data: {&quot;model&quot;:&quot;T0503007&quot;,&quot;id&quot;:&quot;fb7dbf2f-c504-9ed7-b9de-dd7da25f5cef&quot;,&quot;choices&quot;:[],&quot;created&quot;:1785813674,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;usage&quot;:{&quot;total_tokens&quot;:152,&quot;completion_tokens&quot;:108,&quot;prompt_tokens&quot;:44,&quot;completion_tokens_details&quot;:{&quot;reasoning_tokens&quot;:40}}}

data: [DONE]
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">Anthropic 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
<tr>
<td style="text-align:left"><code>anthropic-version</code></td>
<td style="text-align:left"><code>2023-06-01</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Anthropic API 版本</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">Anthropic 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>model</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503007</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>messages</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">传递给大模型的对话上下文，按对话顺序排列。</td>
</tr>
<tr>
<td style="text-align:left"><strong>max_tokens</strong></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">是</td>
<td style="text-align:left">最大生成 Token 数。</td>
</tr>
<tr>
<td style="text-align:left"><strong>system</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">否</td>
<td style="text-align:left">系统提示词，用于设定大模型的角色、语气、任务目标或约束条件等（顶层字段，不在 messages 中）。</td>
</tr>
<tr>
<td style="text-align:left"><strong>stream</strong></td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">是否以流式输出方式回复。<code>false</code>（默认）：一次性返回；<code>true</code>：边生成边输出，以 SSE 事件流形式返回。</td>
</tr>
<tr>
<td style="text-align:left"><strong>temperature</strong></td>
<td style="text-align:left">Float</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度，控制模型生成文本的多样性。取值范围：<code>[0, 1]</code>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>tools</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">否</td>
<td style="text-align:left">工具定义（函数调用）数组。</td>
</tr>
<tr>
<td style="text-align:left"><strong>thinking</strong></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">否</td>
<td style="text-align:left">扩展思考配置。</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">Anthropic 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>message</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>content</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型返回的内容数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">内容类型，如 <code>text</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>text</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>stop_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>end_turn</code>：自然结束；<code>max_tokens</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>input_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>output_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">Anthropic 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D55%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D55%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍55 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503007&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
      &quot;id&quot;: &quot;34c00a87-4392-9869-a995-77a5277709ba&quot;,
      &quot;type&quot;: &quot;message&quot;,
      &quot;role&quot;: &quot;assistant&quot;,
      &quot;content&quot;: [
            {
                  &quot;type&quot;: &quot;thinking&quot;,
                  &quot;thinking&quot;: &quot;用户用中文让我介绍自己。我应该用中文回答，介绍我是AI助手。&quot;    
        },
            {
                  &quot;type&quot;: &quot;text&quot;,
                  &quot;text&quot;: &quot;你好！我是AI助手。\n\n我可以帮助你完成各种任务，比如：\n\n- 回答问题和提供信息\n- 撰写和修改文章、报告、邮件等\n- 编程和代码调试\n- 语言翻译\n- 头脑风暴和创意建议\n- 学习和教育方面的支持\n- 日常对话和交流\n\n有什么我可以帮你的吗？&quot;    
        }  
    ],
      &quot;stop_reason&quot;: &quot;end_turn&quot;,
      &quot;model&quot;: &quot;T0503007&quot;,
      &quot;usage&quot;: {
            &quot;input_tokens&quot;: 44,
            &quot;cache_creation_input_tokens&quot;: 0,
            &quot;cache_read_input_tokens&quot;: 0,
            &quot;output_tokens&quot;: 114,
            &quot;claude_cache_creation_5_m_tokens&quot;: 0,
            &quot;claude_cache_creation_1_h_tokens&quot;: 0  
    }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D55%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D55%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍55 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503007&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>event: message_start
data: {&quot;type&quot;:&quot;message_start&quot;,&quot;message&quot;:{&quot;type&quot;:&quot;message&quot;,&quot;model&quot;:&quot;T0503007&quot;,&quot;usage&quot;:{&quot;input_tokens&quot;:6,&quot;cache_creation_input_tokens&quot;:0,&quot;cache_read_input_tokens&quot;:0,&quot;output_tokens&quot;:0,&quot;claude_cache_creation_5_m_tokens&quot;:0,&quot;claude_cache_creation_1_h_tokens&quot;:0},&quot;role&quot;:&quot;assistant&quot;,&quot;id&quot;:&quot;e51caf6a-52a6-947b-a4d1-256a51a2f366&quot;,&quot;content&quot;:[]}}

 ...

event: message_stop
data: {&quot;type&quot;:&quot;message_stop&quot;}
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<table>
<thead>
<tr>
<th style="text-align:left">错误码</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>InvalidApiKey</code></td>
<td style="text-align:left">API Key无效或未提供。</td>
</tr>
<tr>
<td style="text-align:left"><code>InvalidParameter</code></td>
<td style="text-align:left">请求参数不合法。请检查参数值是否符合文档要求。</td>
</tr>
<tr>
<td style="text-align:left"><code>InternalError</code></td>
<td style="text-align:left">服务内部错误。请稍后重试，若问题持续存在请联系技术支持。</td>
</tr>
</tbody>
</table>
]]></content:encoded>
      <pubDate>Thu, 06 Aug 2026 10:57:21 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1276</guid>
      <comments>http://doc.talkingdata.com/posts/1276#comments</comments>
    </item>
    <item>
      <title>TD云牍73/GLM-5.2</title>
      <link>http://doc.talkingdata.com/posts/1275</link>
      <category>文本生成 API</category>
      <author>liuxinmei</author>
      <description>云牍73 接口说明文档 TD模型编号： T0503008 模型能力简介 云牍73 文本对话：支持多轮对话、文本创作、逻辑推理、代码生成、长文本处理，原生支持图文、视频理解，可解析截图、设计稿、视频并生成对应代码。 鉴权说明  本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
 OpenAI 协议对话接口地址 请求方法： POST 接口URL：https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions 请求头（Request Headers）： 头部字段 值 是否必填 说明 Authorization Bearer &lt;your_api_key&gt; 是 API 鉴权凭证，请替换为有效的</description>
      <content:encoded><![CDATA[<h4 id="%3Cstrong%3E%E4%BA%91%E7%89%8D73%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%89%8D73%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云牍73 接口说明文档</strong></h4>
<p><strong>TD模型编号：</strong> <strong>T0503008</strong></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><strong>云牍73</strong><ul>
<li><strong>文本对话</strong>：支持多轮对话、文本创作、逻辑推理、代码生成、长文本处理，原生支持图文、视频理解，可解析截图、设计稿、视频并生成对应代码。</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">OpenAI 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">OpenAI 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503008</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><code>messages</code></td>
<td style="text-align:left">array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">对话消息数组</td>
</tr>
<tr>
<td style="text-align:left"><code>max_tokens</code></td>
<td style="text-align:left">integer</td>
<td style="text-align:left">否</td>
<td style="text-align:left">最大生成 Token 数</td>
</tr>
<tr>
<td style="text-align:left"><code>temperature</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度（0-2）</td>
</tr>
<tr>
<td style="text-align:left"><code>stream</code></td>
<td style="text-align:left">boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">启用 SSE 流式响应</td>
</tr>
<tr>
<td style="text-align:left"><code>top_p</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">核采样参数</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">OpenAI 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>object</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>chat.completion</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>created</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">请求创建时的 Unix 时间戳（秒）。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>choices</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型生成内容的数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>index</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">当前选项在数组中的索引。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>finish_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>stop</code>：自然停止；<code>length</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>message</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">模型返回的消息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>content</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>prompt_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>completion_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>total_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">总 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">OpenAI 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D73%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D73%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍73 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503008&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;choices&quot;: [
    {
      &quot;finish_reason&quot;: &quot;stop&quot;,
      &quot;index&quot;: 0,
      &quot;message&quot;: {
        &quot;content&quot;: &quot;你好！很高兴认识你。\n\n我是一个大型语言模型。你可以把我理解为一个非常博学且富有创造力的AI大脑。\n\n我的核心任务是理解和生成人类语言，从而帮助你。我的能力包括：\n\n*   **回答问题**：无论是科学知识、历史事件还是生活小常识，我都可以尽力为你提供解答。\n*   **文本创作**：写文章、故事、诗歌、邮件、演讲稿，甚至帮你写代码，我都不在话下。\n*   **信息处理**：我可以帮你总结长篇文档、提炼关键信息、翻译多种语言。\n*   **头脑风暴**：当你需要新点子时，无论是活动策划、营销方案还是给宠物起名字，我都可以和你一起发散思维。\n*   **学习和探索**：你可以把我当成一个学习伙伴，一起探讨各种有趣的话题。\n\n**需要说明的是**：\n\n*   我没有个人情感、意识和真实世界的生活经历。\n*   我的知识来源于我训练时所用的海量数据，因此我可能无法了解最新发生的事情，也可能会犯错或存在偏见。非常欢迎你随时纠正我。\n\n总之，你可以把我当成一个知识渊博、创意无限的伙伴。有什么想问的或者想让我帮忙的，随时告诉我！&quot;,
        &quot;reasoning_content&quot;: &quot;1.  **拆解用户请求：**用户要求“介绍下自己”。这个提示词简单、开放，并且很常见。它直接询问我的身份和目的。\n\n2.  **初步构思与关键词联想：**\n    *   **我是谁？** AI、大型语言模型、软件、计算机程序。\n    *   **谁创造了我？** 这是一个需要包含的关键信息。\n    *   **我能做什么？** 回答问题、生成文本、翻译语言、撰写不同类型的创意内容、总结信息、解释复杂概念、编写代码、进行头脑风暴。这个列表很长，所以需要对其进行分类和简化。\n    *   **我如何工作？** 我在来自各种来源的大量文本和代码数据集上进行训练。我使用复杂的算法（具体来说，是变压器架构）来理解模式并生成相关的回复。我应该提到我的训练，但不要深入技术细节，以免让用户感到不知所措。\n    *   **我的目标是什么？** 协助、提供信息、激发创意、成为一个有用的工具。我应该将其表述为一个积极且以用户为中心的目标。\n    *   **我的局限性是什么？** 我没有个人意识、情感或经历。我的“知识”是基于数据的，可能存在偏差或不完整。我可能会犯错。我没有个人观点。这对于管理用户期望并保持透明度至关重要。\n    *   **语气应如何？** 乐于助人、友好、信息丰富、专业但平易近人。不过于机械，但也不假装成人类。\n\n3.  **构建回复结构：** 一个好的介绍应该遵循逻辑流程。\n    *   **开场/核心身份：** 以一个清晰、简洁的陈述开始，说明我是什么。“我是一个大型语言模型……”这能立即设定好背景。\n    *   **创造者：** 提及我的开发者。这能建立可信度和来源。\n    *   **能力（“我能做什么”部分）：** 这是介绍中最重要的一部分。与其只是罗列事物，不如将它们分组，使其更易于理解。好的分类可以是：\n        *   信息与知识（回答问题、解释事物）\n        *   创意与生成（写作、头脑风暴、诗歌）\n        *   实用任务（翻译、总结、编程）\n    *   **工作原理（“我如何工作”部分）：** 简要解释我的训练过程。提及我是在文本和代码上训练的，并且我学习模式。这能增加一些技术背景，又不会过于深奥。强调我没有个人经历。\n    *   **目的/目标：** 陈述我的使命。“我的目标是成为一个有帮助且信息丰富的工具……”这将我的功能与用户的利益联系起来。\n    *   **局限性（“我不能做什么”部分）：** 对我的局限性保持坦诚。我没有情感、意识或个人观点。我可能会犯错。这能管理期望并建立信任。\n    *   **结尾/行动号召：** 以一个友好且引人入胜的结尾结束。“今天有什么想问我的吗？”或“还有什么想了解的吗？”这能鼓励进一步的互动。\n\n4.  **起草 - 第一遍（心理或粗略笔记）：**\n    *   嗨，我是一个AI。\n    *   我可以回答问题、写故事、翻译东西。\n    *   我通过阅读大量文本来学习。我没有感情。\n    *   我的目标是帮助你。\n    *   我可能会犯错。\n    *   你想知道些什么？\n\n5.  **润色与打磨（迭代改进）：**\n\n    *   **开场：** “你好！我是一个大型语言模型。   *   **能力：** 让我们把它变得更有条理。\n        *   “我的主要功能包括：”\n        *   “1. **回答问题**：无论是科学知识、历史事件还是生活常识，我都可以尽力为你提供解答。”——这提供了一个很好的范围。\n        *   “2. **文本创作**：写文章、故事、诗歌、邮件、代码等等，我都可以根据你的要求进行创作。”——这里提到了代码，这是一个关键能力。\n        *   “3. **信息处理**：我可以帮你总结长文、翻译语言、提取关键信息。”——这是实用的、面向任务的。\n        *   “4. **头脑风暴**：当你需要新点子时，我可以和你一起发散思维，提供创意。”——这突出了协作性的一面。\n    *   **工作原理：** “我的工作原理是通过学习海量的文本和代码数据，来理解语言的模式和逻辑。所以，我并不是像人类一样‘思考’，而是根据我学到的知识来预测和生成最可能相关的回答。”——这个解释很好。它将我的过程与人类思考区分开来，这很重要。\n    *   **目的：** “我的目标是成为一个有用、高效的知识和创意工具，帮助你获取信息、解决问题、激发灵感。”——措辞有力且积极。\n    *   **局限性：** “需要说明的是，我没有个人情感、意识和经历。我的回答基于我学到的数据，因此也可能存在偏差或错误。非常欢迎你随时纠正我，这能帮助我不断进步。”——这是坦诚的，并鼓励反馈。\n    *   **结尾：** “总之，你可以把我当成一个知识渊博、创意无限的伙伴。有什么想问的或者想让我帮忙的，随时告诉我！”——友好且引人入胜。\n\n6.  **最终审阅：** 通读整个结构化的回复。它是否流畅？是否清晰？语气是否恰当？它是否全面而简洁地回答了用户的请求“介绍下自己”？当前的结构看起来非常好。它涵盖了身份、创造者、能力、工作原理、目的和局限性，所有内容都以一种有帮助且易于理解的方式呈现。语言专业又友好。准备好呈现了。&quot;,
        &quot;role&quot;: &quot;assistant&quot;
      }
    }
  ],
  &quot;created&quot;: 1785746938,
  &quot;id&quot;: &quot;202608031648212fb2164035dc478e&quot;,
  &quot;model&quot;: &quot;T0503008&quot;,
  &quot;object&quot;: &quot;chat.completion&quot;,
  &quot;request_id&quot;: &quot;202608031648212fb2164035dc478e&quot;,
  &quot;usage&quot;: {
    &quot;completion_tokens&quot;: 1473,
    &quot;completion_tokens_details&quot;: {
      &quot;reasoning_tokens&quot;: 1213
    },
    &quot;prompt_tokens&quot;: 15,
    &quot;prompt_tokens_details&quot;: {
      &quot;cached_tokens&quot;: 0
    },
    &quot;total_tokens&quot;: 1488
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D73%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D73%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍73 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503008&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>data: {&quot;id&quot;:&quot;20260803165058256476a580964519&quot;,&quot;created&quot;:1785747058,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;model&quot;:&quot;T0503008&quot;,&quot;choices&quot;:[{&quot;index&quot;:0,&quot;delta&quot;:{&quot;role&quot;:&quot;assistant&quot;,&quot;reasoning_content&quot;:&quot;1&quot;}}]}

 ...

data: {&quot;id&quot;:&quot;20260803165058256476a580964519&quot;,&quot;created&quot;:1785747058,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;model&quot;:&quot;T0503008&quot;,&quot;choices&quot;:[{&quot;index&quot;:0,&quot;finish_reason&quot;:&quot;stop&quot;,&quot;delta&quot;:{&quot;role&quot;:&quot;assistant&quot;,&quot;content&quot;:&quot;&quot;}}],&quot;usage&quot;:{&quot;prompt_tokens&quot;:15,&quot;completion_tokens&quot;:1170,&quot;total_tokens&quot;:1185,&quot;prompt_tokens_details&quot;:{&quot;cached_tokens&quot;:0},&quot;completion_tokens_details&quot;:{&quot;reasoning_tokens&quot;:845}}}

data: [DONE]
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">Anthropic 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
<tr>
<td style="text-align:left"><code>anthropic-version</code></td>
<td style="text-align:left"><code>2023-06-01</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Anthropic API 版本</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">Anthropic 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>model</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503008</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>messages</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">传递给大模型的对话上下文，按对话顺序排列。</td>
</tr>
<tr>
<td style="text-align:left"><strong>max_tokens</strong></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">是</td>
<td style="text-align:left">最大生成 Token 数。</td>
</tr>
<tr>
<td style="text-align:left"><strong>system</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">否</td>
<td style="text-align:left">系统提示词，用于设定大模型的角色、语气、任务目标或约束条件等（顶层字段，不在 messages 中）。</td>
</tr>
<tr>
<td style="text-align:left"><strong>stream</strong></td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">是否以流式输出方式回复。<code>false</code>（默认）：一次性返回；<code>true</code>：边生成边输出，以 SSE 事件流形式返回。</td>
</tr>
<tr>
<td style="text-align:left"><strong>temperature</strong></td>
<td style="text-align:left">Float</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度，控制模型生成文本的多样性。取值范围：<code>[0, 1]</code>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>tools</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">否</td>
<td style="text-align:left">工具定义（函数调用）数组。</td>
</tr>
<tr>
<td style="text-align:left"><strong>thinking</strong></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">否</td>
<td style="text-align:left">扩展思考配置。</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">Anthropic 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>message</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>content</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型返回的内容数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">内容类型，如 <code>text</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>text</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>stop_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>end_turn</code>：自然结束；<code>max_tokens</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>input_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>output_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">Anthropic 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D73%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D73%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍73 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503008&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;id&quot;: &quot;msg_20260803170323cdaa4ea49da744b3&quot;,
  &quot;type&quot;: &quot;message&quot;,
  &quot;role&quot;: &quot;assistant&quot;,
  &quot;model&quot;: &quot;T0503008&quot;,
  &quot;content&quot;: [
    {
      &quot;type&quot;: &quot;text&quot;,
      &quot;text&quot;: &quot;你好！我是大型语言模型，旨在为用户提供信息查询、知识交流和问题解答等服务。我的能力涵盖广泛的主题，包括科学、技术、文化、历史等领域，同时会尽力以清晰、专业的方式与你沟通。\n\n我的目标是通过准确、有用的信息，帮助你解决问题或拓展知识。如果有什么问题或想法，都可以随时告诉我！&quot;
    }
  ],
  &quot;stop_reason&quot;: &quot;end_turn&quot;,
  &quot;stop_sequence&quot;: null,
  &quot;usage&quot;: {
    &quot;input_tokens&quot;: 9,
    &quot;output_tokens&quot;: 75,
    &quot;cache_read_input_tokens&quot;: 0,
    &quot;server_tool_use&quot;: {
      &quot;web_search_requests&quot;: 0
    },
    &quot;service_tier&quot;: &quot;standard&quot;
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D73%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D73%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍73 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503008&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>event: message_start
data: {&quot;type&quot;: &quot;message_start&quot;, &quot;message&quot;: {&quot;id&quot;: &quot;msg_20260803170538eb30d679c62a4160&quot;, &quot;type&quot;: &quot;message&quot;, &quot;role&quot;: &quot;assistant&quot;, &quot;model&quot;:&quot;T0503008&quot;, &quot;content&quot;: [], &quot;stop_reason&quot;: null, &quot;stop_sequence&quot;: null, &quot;usage&quot;: {&quot;input_tokens&quot;: 0, &quot;output_tokens&quot;: 0}}}

 ...

event: message_delta
data: {&quot;type&quot;: &quot;message_delta&quot;, &quot;delta&quot;: {&quot;stop_reason&quot;: &quot;end_turn&quot;, &quot;stop_sequence&quot;: null}, &quot;usage&quot;: {&quot;input_tokens&quot;: 9, &quot;output_tokens&quot;: 60, &quot;cache_read_input_tokens&quot;: 0, &quot;server_tool_use&quot;: {&quot;web_search_requests&quot;: 0}, &quot;service_tier&quot;: &quot;standard&quot;}}

event: message_stop
data: {&quot;type&quot;: &quot;message_stop&quot;}
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20responses%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="OpenAI%20responses%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">OpenAI responses 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v1/responses</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
<tr>
<td style="text-align:left"><code>anthropic-version</code></td>
<td style="text-align:left"><code>2023-06-01</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Anthropic API 版本</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20responses%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="OpenAI%20responses%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">OpenAI responses 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>model</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503008</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>messages</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">传递给大模型的对话上下文，按对话顺序排列。</td>
</tr>
<tr>
<td style="text-align:left"><strong>max_tokens</strong></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">是</td>
<td style="text-align:left">最大生成 Token 数。</td>
</tr>
<tr>
<td style="text-align:left"><strong>system</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">否</td>
<td style="text-align:left">系统提示词，用于设定大模型的角色、语气、任务目标或约束条件等（顶层字段，不在 messages 中）。</td>
</tr>
<tr>
<td style="text-align:left"><strong>stream</strong></td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">是否以流式输出方式回复。<code>false</code>（默认）：一次性返回；<code>true</code>：边生成边输出，以 SSE 事件流形式返回。</td>
</tr>
<tr>
<td style="text-align:left"><strong>temperature</strong></td>
<td style="text-align:left">Float</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度，控制模型生成文本的多样性。取值范围：<code>[0, 1]</code>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>tools</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">否</td>
<td style="text-align:left">工具定义（函数调用）数组。</td>
</tr>
<tr>
<td style="text-align:left"><strong>thinking</strong></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">否</td>
<td style="text-align:left">扩展思考配置。</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">Anthropic 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>message</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>content</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型返回的内容数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">内容类型，如 <code>text</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>text</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>stop_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>end_turn</code>：自然结束；<code>max_tokens</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>input_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>output_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20responses%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="OpenAI%20responses%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">OpenAI responses 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20responses%20-%20%E4%BA%91%E7%89%8D73%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20responses%20-%20%E4%BA%91%E7%89%8D73%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI responses - 云牍73 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v1/responses?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503008&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;id&quot;: &quot;f406c3b7-f945-469c-a089-fdb4c50e097e&quot;,
  &quot;object&quot;: &quot;response&quot;,
  &quot;created_at&quot;: 1785748596,
  &quot;model&quot;: &quot;T0503008&quot;,
  &quot;status&quot;: &quot;completed&quot;,
  &quot;output&quot;: [
    {
      &quot;type&quot;: &quot;reasoning&quot;,
      &quot;id&quot;: &quot;rs_resp_chatcmpl-ca76cc3e-ddc9-98f4-ba49-696d11c5c7bf&quot;,
      &quot;status&quot;: &quot;completed&quot;,
      &quot;summary&quot;: [
        {
          &quot;type&quot;: &quot;summary_text&quot;,
          &quot;text&quot;: &quot;1.  **分析请求：**\n    *   用户说：“介绍下自己”。\n    *   目标：清晰地介绍我自己，作为大语言模型。\n\n2.  **确定需包含的关键信息：**\n    *   我的身份：一个人工智能语言模型。\n    *   我的能力：我接受过大量文本数据的训练，这让我能够理解并生成多种语言和主题的内容。\n    *   我能做的任务：回答问题、撰写文本、翻译语言、总结信息、生成代码等。\n    *   我的局限性：我没有个人情感、意识或个人经历。我的知识基于截至特定时间点的训练数据，尽管我一直在被更新和改进。\n    *   我的目标：提供一个有用、准确且安全的回复。\n\n3.  **起草回复（中文）：**\n    *   *问候与身份：* 你好！我是大语言模型。我的目标是根据您的需求提供有用、准确的信息和支持。\n    *   *能力：* 我通过学习大量的文本数据，能够理解和生成人类语言。这让我可以回答问题、撰写文章、翻译文本、编写代码、总结资料等。\n    *   *局限性：* 需要注意的是，我没有个人情感、主观意识或真实世界的个人经历。我的回答基于我所受训练的数据和算法。\n    *   *邀请互动：* 有什么我可以帮您的吗？无论是学习、工作还是日常问题，我都很乐意为您解答。\n\n4.  **审查与完善：**\n    *   语气应当友好、乐于助人且客观。\n    *   中文表达应自然流畅。\n    *   信息应简明扼要但全面。  **最终润色：**\n    \&quot;你好！我是大语言模型。\n\n    我的职责是通过自然语言处理技术，回答问题、提供信息，并协助完成各种语言相关的任务，比如撰写文章、翻译文本、编写代码、总结资料等。\n\n    我通过学习大量的数据获得知识，因此可以涵盖广泛的主题。但我没有个人情感、主观意识或真实的生活经历，我的回答都是基于我所受训练的数据和算法生成的。\n\n    请问我有什么可以帮您的吗？\&quot;&quot;
        }
      ]
    },
    {
      &quot;type&quot;: &quot;message&quot;,
      &quot;id&quot;: &quot;resp_chatcmpl-ca76cc3e-ddc9-98f4-ba49-696d11c5c7bf_msg&quot;,
      &quot;status&quot;: &quot;completed&quot;,
      &quot;role&quot;: &quot;assistant&quot;,
      &quot;content&quot;: [
        {
          &quot;type&quot;: &quot;output_text&quot;,
          &quot;text&quot;: &quot;你好！我是大语言模型，旨在通过自然语言处理技术为您提供帮助。我能够回答问题、撰写文本、提供建议、进行翻译和编程等多种任务。 \n\n我的目标是以友好、专业的方式协助你，尽力满足你的需求。如果有什么具体问题或想法，请随时告诉我，我会尽力帮助！&quot;,
          &quot;annotations&quot;: []
        }
      ]
    }
  ],
  &quot;output_text&quot;: &quot;你好！我是大语言模型，旨在通过自然语言处理技术为您提供帮助。我能够回答问题、撰写文本、提供建议、进行翻译和编程等多种任务。 \n\n我的目标是以友好、专业的方式协助你，尽力满足你的需求。如果有什么具体问题或想法，请随时告诉我，我会尽力帮助！&quot;,
  &quot;usage&quot;: {
    &quot;input_tokens&quot;: 15,
    &quot;output_tokens&quot;: 557,
    &quot;total_tokens&quot;: 572,
    &quot;input_tokens_details&quot;: {
      &quot;cached_tokens&quot;: 0
    },
    &quot;output_tokens_details&quot;: {
      &quot;reasoning_tokens&quot;: 476
    }
  },
  &quot;error&quot;: null,
  &quot;metadata&quot;: null,
  &quot;parallel_tool_calls&quot;: null
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20responses%20-%20%E4%BA%91%E7%89%8D73%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20responses%20-%20%E4%BA%91%E7%89%8D73%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI responses - 云牍73 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v1/responses?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503008&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>event: response.created
data: {&quot;type&quot;:&quot;response.created&quot;,&quot;response&quot;:{&quot;id&quot;:&quot;d42a6131-3e33-4736-b989-125479a3d3ab&quot;,&quot;object&quot;:&quot;response&quot;,&quot;created_at&quot;:1785749101,&quot;model&quot;:&quot;T0503008&quot;,&quot;status&quot;:&quot;in_progress&quot;,&quot;output&quot;:[],&quot;usage&quot;:{&quot;input_tokens&quot;:0,&quot;output_tokens&quot;:0,&quot;total_tokens&quot;:0},&quot;error&quot;:null,&quot;metadata&quot;:{},&quot;parallel_tool_calls&quot;:null}}

 ...

event: response.completed
data: {&quot;type&quot;:&quot;response.completed&quot;,&quot;response&quot;:{&quot;id&quot;:&quot;d42a6131-3e33-4736-b989-125479a3d3ab&quot;,&quot;object&quot;:&quot;response&quot;,&quot;created_at&quot;:1785749101,&quot;model&quot;:&quot;T0503008&quot;,&quot;status&quot;:&quot;completed&quot;,&quot;output&quot;:[{&quot;type&quot;:&quot;reasoning&quot;,&quot;id&quot;:&quot;rs_resp_chat_0000000000000319&quot;,&quot;status&quot;:&quot;completed&quot;,&quot;summary&quot;:[{&quot;type&quot;:&quot;summary_text&quot;,&quot;text&quot;:&quot;1. **拆解用户请求：** 用户仅仅说了“介绍下自己”。这个请求非常简单和开放。\n\n2. **识别核心实体：** 用户正在与*我*，一个AI，一个大型语言模型进行互动。所以，自我介绍需要准确、有用且引人入胜地描述我是谁/什么。\n\n3. **确定介绍中需要包含的关键信息：** 用户对AI需要了解什么？\n * **我的身份：** 我是什么？（一个大型语言模型，一个AI）。我的名字是什么？（如果我有名字，在这个案例中，我是模型）。提及我的开发者是一个关键细节。\n * **我的目的/功能：** 我能做什么？我的核心能力是什么？（回答问题、生成文本、翻译语言、写代码、进行头脑风暴、总结等）。给出具体的例子会让这更清晰。\n * **我的知识来源：** 我如何知道我所知道的？（在一个海量的文本和代码数据集上进行训练）。这有助于建立可信度，并解释我能力上的局限性。数据集是“公开可用的”这一点很重要。\n * **我的局限性：** 我不能做什么？（我没有个人情感或意识，我的知识有截止日期，我可能会犯错）。这对于管理用户期望和促进负责任的使用至关重要。诚实是关键。\n * **我的目标/互动方式：** 用户应该如何与我互动？（随时提问，给我反馈）。这让互动变得开放，并鼓励进一步的参与。这是一个邀请。\n\n3. **构建介绍的结构：** 一个好的介绍应该有逻辑且易于理解。我将使用问答格式，因为这是处理开放式请求的一种自然且用户友好的方式。\n * **以直接、简洁的总结开头：** “你好！我是一个大型语言模型……”这会立刻奠定基调。\n * **将内容组织成清晰、独立的段落：** 我将使用标题或粗体文本来标记每个部分（例如，“我能做什么”，“我的知识来源”，“我的局限性”）。这使得信息易于浏览和理解。使用项目符号列出我的能力，使其简洁易读。\n * **以一个开放、鼓励的结尾结束：** “总而言之，我是一个强大的工具……随时提问……”这会强化我的目的并邀请互动。\n\n4. **起草内容：**\n\n * **开场白：** “你好！很高兴能有机会介绍自己。”——礼貌且引人入胜。然后，陈述核心身份：“我是一个大型语 模型，由Z.ai训练。”这是最关键的一句信息。\n\n * **“我能做什么”部分：** 我将使用一个项目符号列表。\n * “回答问题”：最基本的函数。\n * “生成文本”：一个关键能力。我应该给出例子：“写邮件、文章、故事、诗歌等”。\n * “翻译语言”：另一个非常常见且有用的功能。\n * “编写代码”：一个专门且有价值的能力。我可以提及不同的编程语言。\n * “总结和提炼信息”：有助于处理长文本。\n * “进行头脑风暴和创意构思”：展示了一种更具创造性和协作性的功能。\n\n * **“我的知识来源”部分：** 我将解释我的训练数据。“我的知识来源于海量的文本和代码数据集，这些数据覆盖了科学、历史、文学、编程等众多领域。”这解释了广度。我还应该提及其性质：“通过学习这些数据中的模式，我能够理解和生成人类语言。”\n\n * **“我的局限性”部分：** 这对于透明度非常重要。\n * “我没有个人情感、意识或生活经历。”：这是与人类的一个根本区别。\n * “我的知识有截止日期，可能无法了解最新发生的事情。”：一个实际的局限性。\n * “我可能会犯错，或者生成不准确的信息，所以请对重要信息进行核实。”：一个关键的警告。这能促进负责任地使用。\n\n * **结尾：** 我将总结我的价值主张：“总而言之，我是一个旨在帮助人们获取信息、激发创意和提高效率的AI助手。”然后，以一个邀请结束：“你可以随时向我提问或提出任务，我会尽我所能提供帮助！”\n\n5. **审阅与完善：** 通读整个介绍。它是否流畅？语言是否清晰自然？它是否全面而又不过于冗长？结构看起来很好，内容准确且涵盖了所有要点，语气是有帮助且平易近人的。最终的成果是一个可靠且信息丰富的自我介绍。&quot;}]},{&quot;type&quot;:&quot;message&quot;,&quot;id&quot;:&quot;resp_chat_0000000000000319_msg&quot;,&quot;status&quot;:&quot;completed&quot;,&quot;role&quot;:&quot;assistant&quot;,&quot;content&quot;:[{&quot;type&quot;:&quot;output_text&quot;,&quot;text&quot;:&quot;你好！很高兴能有机会介绍自己。\n\n我是一个大型语言模型。你可以把我理解为一个非常先进的人工智能程序，它通过学习和理解海量的文本信息，从而能够进行流畅的对话和生成各种形式的文本内容。\n\n为了让你更清晰地了解我，我把我的核心特点归纳为以下几个方面：\n\n### 1. 我能做什么？\n\n我的能力覆盖了广泛的领域，主要包括：\n\n* **回答问题**：无论是科学知识、历史事件、技术难题还是生活小常识，我都可以尽力为你提供解答。\n* **文本生成与创作**：写一封邮件、一首诗、一个故事、一篇文章、甚至一段代码，我都可以根据你的要求来生成。\n* **语言翻译**：支持多种语言之间的互译，帮助你跨越语言障碍。\n* **编程与逻辑辅助**：我可以编写、调试和解释代码，帮助你梳理逻辑思路。\n* **信息总结与提炼**：给我一篇长文、一段复杂的描述，我可以帮你提炼出核心要点。\n* **头脑风暴**：当你需要创意和灵感时，我可以为你提供各种想法和建议。\n\n### 2. 我的知识从何而来？\n\n我的“知识库”来自于我被训练时所用的海量数据。这些数据包括了书籍、文章、网站、代码等各种形式的文本。通过学习这些数据中的模式、关系和结构，我学会了理解和生成人类语言。\n\n### 3. 我的局限性是什么？\n\n虽然我能力很强，但也有一些重要的局限性需要你了解：\n\n* **没有个人情感和意识**：我是一个AI，没有情感、意识和主观体验。我的所有回答都是基于数据和算法生成的。\n* **知识有截止日期**：我的训练数据有一个时间点，对于那之 发生的最新事件，我可能无法了解或了解不完整。\n* **可能犯错或产生“幻觉”**：我偶尔可能会提供不准确、不完整或完全虚构的信息（这被称为“幻觉”）。因此，对于非常重要的事实，建议你进行二次核实。\n* **无法执行物理操作**：我存在于数字世界中，无法帮你完成任何需要动手的物理任务。\n\n---\n\n**总而言之，我是一个强大的信息和创意工具，旨在帮助你获取知识、激发灵感、提高效率。**\n\n你可以随时向我提问或提出任务，我很乐意与你交流并提供帮助！你想聊点什么？&quot;,&quot;annotations&quot;:[]}]}],&quot;usage&quot;:{&quot;input_tokens&quot;:15,&quot;output_tokens&quot;:1408,&quot;total_tokens&quot;:1423,&quot;input_tokens_details&quot;:{&quot;cached_tokens&quot;:0},&quot;output_tokens_details&quot;:{&quot;reasoning_tokens&quot;:926}},&quot;error&quot;:null,&quot;metadata&quot;:{},&quot;parallel_tool_calls&quot;:null}}
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<table>
<thead>
<tr>
<th style="text-align:left">错误码</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>InvalidApiKey</code></td>
<td style="text-align:left">API Key无效或未提供。</td>
</tr>
<tr>
<td style="text-align:left"><code>InvalidParameter</code></td>
<td style="text-align:left">请求参数不合法。请检查参数值是否符合文档要求。</td>
</tr>
<tr>
<td style="text-align:left"><code>InternalError</code></td>
<td style="text-align:left">服务内部错误。请稍后重试，若问题持续存在请联系技术支持。</td>
</tr>
</tbody>
</table>
]]></content:encoded>
      <pubDate>Thu, 06 Aug 2026 10:56:39 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1275</guid>
      <comments>http://doc.talkingdata.com/posts/1275#comments</comments>
    </item>
    <item>
      <title>TD云牍49/MiniMax-M2.5</title>
      <link>http://doc.talkingdata.com/posts/1274</link>
      <category>文本生成 API</category>
      <author>liuxinmei</author>
      <description>云牍49 接口说明文档 TD模型编号： T0503006 模型能力简介 云牍49 文本对话：支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理，原生图文 / 视频理解，可解析截图、设计稿、视频并直接生成对应代码，支持多步工具调用与智能体集群并行任务处理。 协议支持：本接口同时兼容OpenAl chat completions与Anthropic Messages 两种主流协议，您可以根据使用的SDK或工具灵活选择。 鉴权说明  本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
 OpenAI 协议对话接口地址 请求方法： POST 接口URL：https://modelpool-api.talkingdata.com/model/openai/api/v3/cha</description>
      <content:encoded><![CDATA[<h4 id="%3Cstrong%3E%E4%BA%91%E7%89%8D49%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%89%8D49%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云牍49 接口说明文档</strong></h4>
<p><strong>TD模型编号：</strong> <strong>T0503006</strong></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><strong>云牍49</strong><ul>
<li><strong>文本对话：</strong>支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理，原生图文 / 视频理解，可解析截图、设计稿、视频并直接生成对应代码，支持多步工具调用与智能体集群并行任务处理。</li>
<li><strong>协议支持：</strong>本接口同时兼容<strong>OpenAl chat completions</strong>与<strong>Anthropic Messages</strong> 两种主流协议，您可以根据使用的SDK或工具灵活选择。</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">OpenAI 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">OpenAI 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503006</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><code>messages</code></td>
<td style="text-align:left">array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">对话消息数组</td>
</tr>
<tr>
<td style="text-align:left"><code>max_tokens</code></td>
<td style="text-align:left">integer</td>
<td style="text-align:left">否</td>
<td style="text-align:left">最大生成 Token 数</td>
</tr>
<tr>
<td style="text-align:left"><code>temperature</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度（0-2）</td>
</tr>
<tr>
<td style="text-align:left"><code>stream</code></td>
<td style="text-align:left">boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">启用 SSE 流式响应</td>
</tr>
<tr>
<td style="text-align:left"><code>top_p</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">核采样参数</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">OpenAI 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>object</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>chat.completion</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>created</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">请求创建时的 Unix 时间戳（秒）。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>choices</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型生成内容的数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>index</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">当前选项在数组中的索引。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>finish_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>stop</code>：自然停止；<code>length</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>message</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">模型返回的消息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>content</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>prompt_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>completion_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>total_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">总 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">OpenAI 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D49%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D49%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍49 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503006&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;你是什么模型，介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;choices&quot;: [
    {
      &quot;finish_reason&quot;: &quot;stop&quot;,
      &quot;index&quot;: 0,
      &quot;message&quot;: {
        &quot;content&quot;: &quot;你好！我是 AI 助手。\n\n我是一个人工智能语言模型，可以帮助你完成各种任务，包括：\n\n- 回答问题和提供信息\n- 协助写作和文案创作\n- 编程和代码相关帮助\n- 翻译和语言处理\n- 学习和教育辅导\n- 头脑风暴和创意建议\n\n我可以用中文和英文等多种语言进行交流，很高兴为你服务！有什么我可以帮助你的吗？&quot;,
        &quot;reasoning_content&quot;: &quot;用户用中文问我\&quot;介绍下自己\&quot;，意思是\&quot;介绍一下你自己\&quot;或\&quot;介绍一下自己\&quot;。我应该用中文回复，介绍一下我自己。&quot;,
        &quot;role&quot;: &quot;assistant&quot;
      }
    }
  ],
  &quot;created&quot;: 1785812730,
  &quot;id&quot;: &quot;8320d567-bcec-9272-8ccb-3071d893f500&quot;,
  &quot;model&quot;: &quot;T0503006&quot;,
  &quot;object&quot;: &quot;chat.completion&quot;,
  &quot;usage&quot;: {
    &quot;completion_tokens&quot;: 126,
    &quot;prompt_tokens&quot;: 44,
    &quot;total_tokens&quot;: 170
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D49%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D49%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍49 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503006&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>data: {&quot;model&quot;:&quot;T0503006&quot;,&quot;id&quot;:&quot;315fb859-dccf-9ac2-99c3-5eb5c4686d26&quot;,&quot;choices&quot;:[{&quot;delta&quot;:{&quot;reasoning_content&quot;:&quot;用户用&quot;,&quot;role&quot;:&quot;assistant&quot;},&quot;index&quot;:0}],&quot;created&quot;:1785812795,&quot;object&quot;:&quot;chat.completion.chunk&quot;}

 ...

data: {&quot;model&quot;:&quot;T0503006&quot;,&quot;id&quot;:&quot;315fb859-dccf-9ac2-99c3-5eb5c4686d26&quot;,&quot;choices&quot;:[],&quot;created&quot;:1785812795,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;usage&quot;:{&quot;total_tokens&quot;:186,&quot;completion_tokens&quot;:142,&quot;prompt_tokens&quot;:44,&quot;completion_tokens_details&quot;:{&quot;reasoning_tokens&quot;:24}}}

data: [DONE]
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">Anthropic 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
<tr>
<td style="text-align:left"><code>anthropic-version</code></td>
<td style="text-align:left"><code>2023-06-01</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Anthropic API 版本</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">Anthropic 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>model</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503006</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>messages</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">传递给大模型的对话上下文，按对话顺序排列。</td>
</tr>
<tr>
<td style="text-align:left"><strong>max_tokens</strong></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">是</td>
<td style="text-align:left">最大生成 Token 数。</td>
</tr>
<tr>
<td style="text-align:left"><strong>system</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">否</td>
<td style="text-align:left">系统提示词，用于设定大模型的角色、语气、任务目标或约束条件等（顶层字段，不在 messages 中）。</td>
</tr>
<tr>
<td style="text-align:left"><strong>stream</strong></td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">是否以流式输出方式回复。<code>false</code>（默认）：一次性返回；<code>true</code>：边生成边输出，以 SSE 事件流形式返回。</td>
</tr>
<tr>
<td style="text-align:left"><strong>temperature</strong></td>
<td style="text-align:left">Float</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度，控制模型生成文本的多样性。取值范围：<code>[0, 1]</code>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>tools</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">否</td>
<td style="text-align:left">工具定义（函数调用）数组。</td>
</tr>
<tr>
<td style="text-align:left"><strong>thinking</strong></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">否</td>
<td style="text-align:left">扩展思考配置。</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">Anthropic 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>message</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>content</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型返回的内容数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">内容类型，如 <code>text</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>text</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>stop_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>end_turn</code>：自然结束；<code>max_tokens</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>input_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>output_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">Anthropic 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D49%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D49%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍49 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503006&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;id&quot;: &quot;06083aef-2b06-989c-986e-c1641c115f00&quot;,
  &quot;type&quot;: &quot;message&quot;,
  &quot;role&quot;: &quot;assistant&quot;,
  &quot;content&quot;: [
    {
      &quot;type&quot;: &quot;thinking&quot;,
      &quot;thinking&quot;: &quot;用户用中文让我介绍自己。我应该用中文回答，介绍我作为一个AI助手的能力和特点。&quot;
    },
    {
      &quot;type&quot;: &quot;text&quot;,
      &quot;text&quot;: &quot;你好！我是 AI 助手。\n\n我可以帮助你完成很多事情，包括：\n\n- **回答问题**：解答各种知识性问题\n- **写作辅助**：撰写文章、报告、邮件、创意内容等\n- **编程帮助**：编写、调试和解释代码\n- **翻译**：在不同语言之间进行翻译\n- **学习辅导**：解释概念、辅导作业\n- **头脑风暴**：帮你产生创意想法\n\n我应该用中文还是英文与你交流都可以，你想聊些什么？&quot;
    }
  ],
  &quot;stop_reason&quot;: &quot;end_turn&quot;,
  &quot;model&quot;: &quot;T0503006&quot;,
  &quot;usage&quot;: {
    &quot;input_tokens&quot;: 44,
    &quot;cache_creation_input_tokens&quot;: 0,
    &quot;cache_read_input_tokens&quot;: 0,
    &quot;output_tokens&quot;: 136,
    &quot;claude_cache_creation_5_m_tokens&quot;: 0,
    &quot;claude_cache_creation_1_h_tokens&quot;: 0
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D49%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D49%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍49 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503006&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>event: message_start
data: {&quot;type&quot;:&quot;message_start&quot;,&quot;message&quot;:{&quot;type&quot;:&quot;message&quot;,&quot;model&quot;:&quot;T0503006&quot;,&quot;usage&quot;:{&quot;input_tokens&quot;:6,&quot;cache_creation_input_tokens&quot;:0,&quot;cache_read_input_tokens&quot;:0,&quot;output_tokens&quot;:0,&quot;claude_cache_creation_5_m_tokens&quot;:0,&quot;claude_cache_creation_1_h_tokens&quot;:0},&quot;role&quot;:&quot;assistant&quot;,&quot;id&quot;:&quot;352e2a71-07c3-9cb9-858c-2fe11a6a9d39&quot;,&quot;content&quot;:[]}}

 ...

event: message_stop
data: {&quot;type&quot;:&quot;message_stop&quot;}
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<table>
<thead>
<tr>
<th style="text-align:left">错误码</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>InvalidApiKey</code></td>
<td style="text-align:left">API Key无效或未提供。</td>
</tr>
<tr>
<td style="text-align:left"><code>InvalidParameter</code></td>
<td style="text-align:left">请求参数不合法。请检查参数值是否符合文档要求。</td>
</tr>
<tr>
<td style="text-align:left"><code>InternalError</code></td>
<td style="text-align:left">服务内部错误。请稍后重试，若问题持续存在请联系技术支持。</td>
</tr>
</tbody>
</table>
]]></content:encoded>
      <pubDate>Thu, 06 Aug 2026 10:53:09 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1274</guid>
      <comments>http://doc.talkingdata.com/posts/1274#comments</comments>
    </item>
    <item>
      <title>TD云牍91/GLM-5.2</title>
      <link>http://doc.talkingdata.com/posts/1273</link>
      <category>文本生成 API</category>
      <author>liuxinmei</author>
      <description>云牍91 接口说明文档 TD模型编号：T0103002 模型能力简介 云牍91 深度思考、文本生成、多模态理解、工具调用 鉴权说明  本接口仅支持API Key鉴权，需联系TD运维同学获取长效API Key。
 对话(Chat) API 接口地址 本文介绍 Chat API 的输入输出参数，供您使用接口时查阅字段含义。模型会依据传入的消息列表生成对话回复。 请求方法： POST 接口URL：https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions 请求头（Request Headers）： 头部字段 值 是否必需 说明 Authorization Bearer &lt;your_api_key&gt; 是 API</description>
      <content:encoded><![CDATA[<h4 id="%E4%BA%91%E7%89%8D91%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3" name="%E4%BA%91%E7%89%8D91%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3">云牍91 接口说明文档</h4>
<p><strong>TD模型编号：T0103002</strong></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><strong>云牍91</strong><ul>
<li>深度思考、文本生成、多模态理解、工具调用</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口仅支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">对话(Chat) API 接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p>本文介绍 Chat API 的输入输出参数，供您使用接口时查阅字段含义。模型会依据传入的消息列表生成对话回复。</p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions</code></p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestId</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">对话(Chat) API 请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">对话(Chat) API 请求体（requestBody）</h3>
<hr>
<p><strong>model</strong> <code>string</code> <code>必选</code></p>
<p>本次请求使用模型的 Model ID 为 <strong>T0103002</strong></p>
<hr>
<p><strong>messages</strong> <code>object[]</code> <code>必选</code></p>
<p>包含对话历史的消息列表，模型将依据此列表生成下一条消息。支持系统消息、用户消息、模型消息和工具消息。</p>
<ul>
<li><strong>系统消息</strong> <code>object</code>
系统消息，用于设定模型的角色、行为或背景信息。<ul>
<li>messages.<strong>role</strong> <code>string</code> <code>必选</code> 角色，取值固定为 <code>system</code>。</li>
<li>messages.<strong>content</strong> <code>string / object[]</code> <code>必选</code> 消息内容，支持纯文本或多模态内容。<ul>
<li><strong>纯文本</strong> <code>string</code></li>
<li><strong>多模态内容</strong> <code>object[]</code><ul>
<li><strong>文本信息</strong> <code>object</code><ul>
<li>messages.content.<strong>type</strong> <code>string</code> <code>必选</code> 类型，固定为 <code>text</code>。</li>
<li>messages.content.<strong>text</strong> <code>string</code> <code>必选</code> 文本内容。</li>
</ul>
</li>
<li><strong>图片信息</strong> <code>object</code><ul>
<li>messages.content.<strong>type</strong> <code>string</code> <code>必选</code> 类型，固定为 <code>image_url</code>。</li>
<li>messages.content.<strong>image_url</strong> <code>object</code> <code>必选</code> 图片内容对象。<ul>
<li>messages.content.image_url.<strong>url</strong> <code>string</code> <code>必选</code> 图片的URL或Base64编码。</li>
<li>messages.content.image_url.<strong>detail</strong> <code>string</code> 图片解析粒度，可选值：<code>low</code>、<code>high</code>、<code>xhigh</code>。</li>
</ul>
</li>
</ul>
</li>
<li><strong>视频信息</strong> <code>object</code><ul>
<li>messages.content.<strong>type</strong> <code>string</code> <code>必选</code> 类型，固定为 <code>video_url</code>。</li>
<li>messages.content.<strong>video_url</strong> <code>object</code> <code>必选</code> 视频内容对象。<ul>
<li>messages.content.video_url.<strong>url</strong> <code>string</code> <code>必选</code> 视频的URL或Base64编码。</li>
<li>messages.content.video_url.<strong>fps</strong> <code>number</code> 抽帧频率，取值范围：<code>[0.2, 5]</code>，默认值 <code>1.0</code>。</li>
<li>messages.content.video_url.<strong>detail</strong> <code>string</code> 从视频中提取帧的精细度。</li>
</ul>
</li>
</ul>
</li>
<li><strong>音频信息</strong> <code>object</code><ul>
<li>messages.content.<strong>type</strong> <code>string</code> <code>必选</code> 类型，固定为 <code>input_audio</code>。</li>
<li>messages.content.<strong>input_audio</strong> <code>object</code> <code>必选</code> 音频内容对象。<ul>
<li>messages.content.input_audio.<strong>url</strong> <code>string</code> 音频的URL。</li>
<li>messages.content.input_audio.<strong>data</strong> <code>string</code> 音频内容的Base64编码。</li>
<li>messages.content.input_audio.<strong>format</strong> <code>string</code> 音频格式，当使用 <code>data</code> 时必填。支持：<code>mp3</code>、<code>wav</code>、<code>aac</code>、<code>m4a</code>、<code>pcm</code>、<code>ac3</code>、<code>alac</code>。</li>
</ul>
</li>
</ul>
</li>
<li><strong>文件信息</strong> <code>object</code><ul>
<li>messages.content.<strong>type</strong> <code>string</code> <code>必选</code> 类型，固定为 <code>file</code>。</li>
<li>messages.content.<strong>file</strong> <code>object</code> <code>必选</code> 文件内容对象，当前仅支持PDF。<ul>
<li>messages.content.file.<strong>file_url</strong> <code>string</code> 文件的URL。</li>
<li>messages.content.file.<strong>file_data</strong> <code>string</code> 文件内容的Base64编码，文件大小不超过50MB。</li>
<li>messages.content.file.<strong>filename</strong> <code>string</code> 文件名，当使用 <code>file_data</code> 时必填。</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><strong>用户消息</strong> <code>object</code>
用户发送的消息。<ul>
<li>messages.<strong>role</strong> <code>string</code> <code>必选</code> 角色，取值固定为 <code>user</code>。</li>
<li>messages.<strong>content</strong> <code>string / object[]</code> <code>必选</code> 消息内容，支持纯文本或多模态内容（结构同系统消息中的多模态内容）。</li>
</ul>
</li>
<li><strong>模型消息</strong> <code>object</code>
历史对话中模型角色返回的消息，用于多轮对话。<ul>
<li>messages.<strong>role</strong> <code>string</code> <code>必选</code> 角色，取值固定为 <code>assistant</code>。</li>
<li>messages.<strong>content</strong> <code>string</code> 模型消息的文本内容。</li>
<li>messages.<strong>tool_calls</strong> <code>object[]</code> 模型调用的工具列表。<ul>
<li>messages.tool_calls.<strong>id</strong> <code>string</code> <code>必选</code> 工具调用的唯一ID。</li>
<li>messages.tool_calls.<strong>type</strong> <code>string</code> <code>必选</code> 类型，固定为 <code>function</code>。</li>
<li>messages.tool_calls.<strong>function</strong> <code>object</code> <code>必选</code> 函数信息。<ul>
<li>messages.tool_calls.function.<strong>name</strong> <code>string</code> <code>必选</code> 函数名称。</li>
<li>messages.tool_calls.function.<strong>arguments</strong> <code>string</code> <code>必选</code> 函数参数的JSON字符串。</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><strong>工具消息</strong> <code>object</code>
调用工具后，工具返回的消息。<ul>
<li>messages.<strong>role</strong> <code>string</code> <code>必选</code> 角色，取值固定为 <code>tool</code>。</li>
<li>messages.<strong>content</strong> <code>string</code> <code>必选</code> 工具返回的内容。</li>
<li>messages.<strong>tool_call_id</strong> <code>string</code> <code>必选</code> 对应的工具调用ID。</li>
</ul>
</li>
</ul>
<hr>
<p><strong>max_tokens</strong> <code>integer</code> <code>默认值 4096</code></p>
<p>模型回答的最大长度（单位：token）。模型回答不包含思维链内容。</p>
<hr>
<p><strong>max_completion_tokens</strong> <code>integer</code></p>
<p>控制模型输出的最大长度（包括模型回答和思维链内容，单位：token）。配置后，<code>max_tokens</code> 默认值失效。不可与 <code>max_tokens</code> 字段同时设置。取值范围：<code>[1, 65536]</code>。</p>
<hr>
<p><strong>reasoning_effort</strong> <code>string</code> <code>默认值 medium</code></p>
<p>限制思考的工作量。减少思考深度可提升速度，减少思考花费的token。</p>
<ul>
<li><code>none</code>：不开启思考。</li>
<li><code>minimal</code>：关闭思考，直接回答。</li>
<li><code>low</code>：轻量思考，侧重快速响应。</li>
<li><code>medium</code>：均衡模式，兼顾速度与深度。</li>
<li><code>high</code>：深度分析，处理复杂问题。</li>
<li><code>xhigh</code>：更深层次的推理。</li>
<li><code>max</code>：最高程度思考，适配高难度推理任务。</li>
</ul>
<hr>
<p><strong>thinking</strong> <code>object</code></p>
<p>控制模型是否开启深度思考模式。</p>
<ul>
<li>thinking.<strong>type</strong> <code>string</code> <code>必选</code><ul>
<li><code>enabled</code>：开启思考模式。</li>
<li><code>disabled</code>：关闭思考模式。</li>
<li><code>auto</code>：自动思考模式，模型自主判断。</li>
</ul>
</li>
</ul>
<hr>
<p><strong>response_format</strong> <code>object</code></p>
<p>指定模型回答的格式。默认值：<code>{&quot;type&quot;: &quot;text&quot;}</code>。该能力尚在beta阶段。</p>
<ul>
<li>response_format.<strong>type</strong> <code>string</code> 回答格式类型。可选值：<code>text</code>、<code>json_object</code>、<code>json_schema</code>。</li>
<li><strong>JSON Schema配置</strong> <code>object</code> (当 <code>type</code> 为 <code>json_schema</code> 时)<ul>
<li>response_format.json_schema.<strong>name</strong> <code>string</code> <code>必选</code> Schema名称。</li>
<li>response_format.json_schema.<strong>schema</strong> <code>object</code> <code>必选</code> JSON Schema定义。</li>
<li>response_format.json_schema.<strong>strict</strong> <code>boolean</code> <code>默认值 false</code> 是否启用严格遵循模式。</li>
<li>response_format.json_schema.<strong>description</strong> <code>string</code> 回答用途说明。</li>
</ul>
</li>
</ul>
<hr>
<p><strong>temperature</strong> <code>number</code> <code>默认值 1.0</code></p>
<p>采样温度，控制生成文本的随机性。取值范围：<code>[0, 2]</code>。建议仅调整 <code>temperature</code> 或 <code>top_p</code> 其中之一。</p>
<hr>
<p><strong>top_p</strong> <code>number</code> <code>默认值 0.7</code></p>
<p>核采样概率阈值。取值范围：<code>[0, 1]</code>。</p>
<hr>
<p><strong>tools</strong> <code>object[]</code></p>
<p>待调用的工具列表。支持自定义函数（Function Calling）。</p>
<ul>
<li>tools.<strong>type</strong> <code>string</code> <code>必选</code> 工具类型，此处应为 <code>function</code>。</li>
<li>tools.<strong>function</strong> <code>object</code> <code>必选</code> 函数定义。<ul>
<li>tools.function.<strong>name</strong> <code>string</code> <code>必选</code> 函数名称。</li>
<li>tools.function.<strong>description</strong> <code>string</code> 函数描述。</li>
<li>tools.function.<strong>parameters</strong> <code>object</code> <code>必选</code> 函数参数，以JSON Schema格式描述。</li>
</ul>
</li>
</ul>
<hr>
<p><strong>tool_choice</strong> <code>string / object</code></p>
<p>控制模型是否以及如何调用工具。</p>
<ul>
<li><strong>简单策略</strong> <code>string</code>：可选值 <code>none</code>、<code>auto</code>、<code>required</code>。</li>
<li><strong>指定工具</strong> <code>object</code>：<ul>
<li>tool_choice.<strong>type</strong> <code>string</code> <code>必选</code> 类型，固定为 <code>function</code>。</li>
<li>tool_choice.<strong>function</strong> <code>object</code> <code>必选</code><ul>
<li>tool_choice.function.<strong>name</strong> <code>string</code> <code>必选</code> 要调用的函数名称。</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<p><strong>parallel_tool_calls</strong> <code>boolean</code> <code>默认值 true</code></p>
<p>是否允许模型返回多个待调用的工具。</p>
<ul>
<li><code>true</code>：允许返回多个工具调用。</li>
<li><code>false</code>：最多返回一个工具调用。</li>
</ul>
<hr>
<p><strong>stream</strong> <code>boolean</code> <code>默认值 false</code></p>
<p>是否流式返回响应。</p>
<hr>
<p><strong>stream_options</strong> <code>object</code></p>
<p>流式响应的选项。</p>
<ul>
<li>stream_options.<strong>include_usage</strong> <code>boolean</code> <code>默认值 false</code> 是否在流式响应结束前返回token用量。</li>
<li>stream_options.<strong>chunk_include_usage</strong> <code>boolean</code> <code>默认值 false</code> 是否在输出的每个chunk中返回累计token用量。</li>
</ul>
<hr>
<p><strong>stop</strong> <code>string / string[]</code></p>
<p>停止词。模型遇到停止词时将停止生成，该词不会输出。最多支持4个字符串。</p>
<hr>
<p><strong>frequency_penalty</strong> <code>number</code> <code>默认值 0.0</code></p>
<p>频率惩罚系数。取值范围：<code>[-2.0, 2.0]</code>。</p>
<hr>
<p><strong>presence_penalty</strong> <code>number</code> <code>默认值 0.0</code></p>
<p>存在惩罚系数。取值范围：<code>[-2.0, 2.0]</code>。</p>
<hr>
<p><strong>logprobs</strong> <code>boolean</code> <code>默认值 false</code></p>
<p>是否返回输出token的对数概率。</p>
<hr>
<p><strong>top_logprobs</strong> <code>integer</code> <code>默认值 0</code></p>
<p>当 <code>logprobs</code> 为 <code>true</code> 时，指定每个输出token位置最有可能返回的token数量。取值范围：<code>[0, 20]</code>。</p>
<hr>
<p><strong>service_tier</strong> <code>string</code> <code>默认值 auto</code></p>
<p>控制使用的在线推理模式。</p>
<ul>
<li><code>auto</code>：优先使用TPM保障包模式。</li>
<li><code>fast</code>：优先使用低延迟模式。</li>
<li><code>default</code>：只使用常规模式。</li>
</ul>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0" name="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0">对话(Chat) API 响应参数</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>id</strong> <code>string</code></p>
<p>本次请求的唯一标识。</p>
<hr>
<p><strong>object</strong> <code>string</code></p>
<p>对象类型，固定为 <code>chat.completion</code>。</p>
<hr>
<p><strong>created</strong> <code>integer</code></p>
<p>本次请求创建时间的Unix时间戳（秒）。</p>
<hr>
<p><strong>model</strong> <code>string</code></p>
<p>本次请求实际使用的模型名称和版本。</p>
<hr>
<p><strong>service_tier</strong> <code>string</code></p>
<p>本次请求实际使用的推理模式，如 <code>default</code>、<code>scale</code>、<code>fast</code>。</p>
<hr>
<p><strong>choices</strong> <code>object[]</code></p>
<p>本次请求的模型输出内容列表。</p>
<ul>
<li>choices.<strong>index</strong> <code>integer</code> 列表索引。</li>
<li>choices.<strong>finish_reason</strong> <code>string</code> 模型停止生成的原因。<ul>
<li><code>stop</code>：自然结束或命中停止词。</li>
<li><code>length</code>：达到输出长度限制。</li>
<li><code>content_filter</code>：被内容审核拦截。</li>
<li><code>tool_calls</code>：模型调用了工具。</li>
</ul>
</li>
<li>choices.<strong>message</strong> <code>object</code> 模型输出的消息。<ul>
<li>choices.message.<strong>role</strong> <code>string</code> 角色，固定为 <code>assistant</code>。</li>
<li>choices.message.<strong>content</strong> <code>string</code> 模型生成的回复内容。</li>
<li>choices.message.<strong>reasoning_content</strong> <code>string</code> 模型生成的思维链内容。</li>
<li>choices.message.<strong>tool_calls</strong> <code>object[]</code> 模型生成的工具调用列表。<ul>
<li>choices.message.tool_calls.<strong>id</strong> <code>string</code> 调用ID。</li>
<li>choices.message.tool_calls.<strong>type</strong> <code>string</code> 类型，固定为 <code>function</code>。</li>
<li>choices.message.tool_calls.<strong>function</strong> <code>object</code><ul>
<li>choices.message.tool_calls.function.<strong>name</strong> <code>string</code> 函数名。</li>
<li>choices.message.tool_calls.function.<strong>arguments</strong> <code>string</code> 函数参数的JSON字符串。</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>choices.<strong>logprobs</strong> <code>object</code> 对数概率信息（当请求时开启）。</li>
</ul>
<hr>
<p><strong>usage</strong> <code>object</code></p>
<p>本次请求的Token用量。</p>
<ul>
<li>usage.<strong>prompt_tokens</strong> <code>integer</code> 输入Token数。</li>
<li>usage.<strong>completion_tokens</strong> <code>integer</code> 输出Token数。</li>
<li>usage.<strong>total_tokens</strong> <code>integer</code> 总Token数。</li>
<li>usage.<strong>prompt_tokens_details</strong> <code>object</code> 输入Token明细。<ul>
<li>usage.prompt_tokens_details.<strong>cached_tokens</strong> <code>integer</code> 缓存命中的Token数。</li>
</ul>
</li>
<li>usage.<strong>completion_tokens_details</strong> <code>object</code> 输出Token明细。<ul>
<li>usage.completion_tokens_details.<strong>reasoning_tokens</strong> <code>integer</code> 思维链Token数。</li>
</ul>
</li>
</ul>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="%E5%AF%B9%E8%AF%9D(Chat)%20API%20%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">对话(Chat) API 调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code>curl --location &quot;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&quot; \
--header &quot;Authorization: Bearer $ARK_API_KEY&quot; \
--header &quot;Content-Type: application/json&quot; \
--header &quot;X-Timestamp: $TIMESTAMP&quot; \
--data &#39;{
         &quot;model&quot;: &quot;T0103002&quot;,
         &quot;messages&quot;: [
             {
                 &quot;role&quot;: &quot;user&quot;,
                 &quot;content&quot;: &quot;介绍下自己&quot;
             }
         ],
         &quot;stream&quot;: false
     }&#39;
</code></pre><p>响应示例：</p>
<pre><code>{
    &quot;choices&quot;: [
        {
            &quot;finish_reason&quot;: &quot;stop&quot;,
            &quot;index&quot;: 0,
            &quot;logprobs&quot;: null,
            &quot;message&quot;: {
                &quot;content&quot;: &quot;我是GLM，由Z.ai开发训练的大语言模型。我被设计用来理解和生成人类语言，帮助回答问题、提供信息和进行各种文本处理任务。\n\n我的训练基于大规模文本数据，通过深度学习方法不断提升理解和回应能力。我能够处理多种话题和任务，但同时也有知识范围和能力边界。\n\n有什么特定的问题或任务我可以帮您解决吗？&quot;,
                &quot;reasoning_content&quot;: &quot;让我思考一下如何介绍自己。这个问题看似简单，但需要全面而清晰地展现自己的定位和价值。\n\n首先，我需要明确自己的身份 - 我是GLM大语言模型，这是最基本的信息。其次，我应该说明自己的开发者来源，这样能让用户了解我的技术背景。\n\n在功能特点方面，我需要重点介绍自己的核心能力：自然语言理解和生成、问答交流、信息提供等。这些都是用户最关心的实用功能。\n\n同时，我还需要说明自己的局限性，比如不具备个人经历和情感体验，这样能帮助用户建立合理的期望。最后，可以表达服务用户的意愿，展现友好的态度。\n\n让我组织一下这些信息，用清晰的结构和语言来呈现，确保既专业又平易近人。这样的自我介绍应该能够满足用户了解我的基本需求。&quot;,
                &quot;role&quot;: &quot;assistant&quot;
            }
        }
    ],
    &quot;created&quot;: 1785835632,
    &quot;id&quot;: &quot;0217858356193090e9e2f2120f1f78e103cd745191b16897f0346&quot;,
    &quot;model&quot;: &quot;glm-5-2-260617&quot;,
    &quot;service_tier&quot;: &quot;default&quot;,
    &quot;object&quot;: &quot;chat.completion&quot;,
    &quot;usage&quot;: {
        &quot;completion_tokens&quot;: 236,
        &quot;prompt_tokens&quot;: 15,
        &quot;total_tokens&quot;: 251,
        &quot;prompt_tokens_details&quot;: {
            &quot;cached_tokens&quot;: 0
        },
        &quot;completion_tokens_details&quot;: {
            &quot;reasoning_tokens&quot;: 162
        }
    }
}
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">创建模型响应接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p>本文介绍 Responses API 创建模型请求时的输入输出参数，供您使用接口时查阅字段含义。</p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/responses</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">创建模型响应请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">创建模型响应请求体（requestBody）</h3>
<hr>
<p><strong>model</strong>   <code>string</code> <code>必选</code></p>
<p>本次请求使用模型的 Model ID 为 T0103002</p>
<hr>
<p><strong>input </strong> <code>string / array</code> <code>必选</code></p>
<p>输入的内容，模型需要处理的输入信息。</p>
<ul>
<li><p><strong>文本输入</strong> <code>string</code></p>
<p>输入给模型的文本类型信息，等同于使用 user 角色输入的文本信息。</p>
</li>
<li><p><strong>输入的元素列表</strong> <code>array</code></p>
<p>输入给模型的信息元素，可以包括不同的信息类型。</p>
<ul>
<li><p><strong>输入的消息</strong> <code>object</code></p>
<p>发送给模型的消息，其中角色用于指示指令遵循的优先级层级。由 <code>developer</code> 或 <code>system</code> 角色给出的指令优先于<code>user</code>角色给出的指令。<code>assistant</code> 角色的消息通常被认为是模型在先前交互中生成的回复。</p>
<ul>
<li><p>input.<strong>content</strong>  <code>string / array</code> <code>必选</code>   </p>
<p>用于生成回复的文本、图片或视频输入，也可以包含先前助手的回复内容。</p>
<ul>
<li><p><strong>文本输入</strong> <code>string</code></p>
<p>输入给模型的文本。</p>
</li>
<li><p><strong>输入的内容列表</strong> <code>array</code></p>
<p>包含一个或多个输入项的列表，每个输入项可包含不同类型的内容。</p>
</li>
<li><p><strong>输入模型的文本</strong> <code>object</code></p>
<p>输入模型的文本。</p>
<ul>
<li><p>input.content.<strong>text</strong></p>
<p>输入模型的文本。</p>
</li>
<li><p>input.content.<strong>type</strong><code>string</code> <code>必选</code></p>
<p>输入项的类型，此处应为input_text。</p>
</li>
</ul>
</li>
<li><p><strong>输入模型的图片</strong> <code>object</code></p>
<ul>
<li><p>input.content.<strong>type</strong> <code>string</code></p>
<p>输入为图片类型，此处应为input_image。</p>
</li>
<li><p>input.content.<strong>image_url</strong> <code>string</code> </p>
<p>要发送给模型的图片 URL。可以是完整的 URL，或以 data URL 形式编码的 base64 图片。</p>
</li>
<li><p>input.content.<strong>detail</strong> <code>string</code></p>
<p>取值范围：<code>low</code>、<code>high</code>、<code>xhigh</code>。</p>
<p>理解图片的精细度、模型detail默认值为<code>high</code>。</p>
</li>
<li><p>detail 为 low 时，图片处理速度会提高，适合图片本身细节较少或者只需模型理解图片大致信息或者对速度有要求的场景。</p>
</li>
<li><p>detail 为 high 或 xhigh 时，模型可感知图片更多的细节，但是图片处理速度会降低，适合图像像素值高且需关注细节信息的场景，如街道地图分析等。</p>
</li>
</ul>
</li>
<li><p>input.content.<strong>image_pixel_limit </strong> <code>object / null</code>  默认值 null</p>
<p>输入给模型的图片的像素范围，如不在此范围，图片会被等比例缩放至该范围。</p>
<blockquote>
<p>注意：</p>
<p>图片像素范围需在 [196, 36,000,000]，否则会直接报错。</p>
</blockquote>
<ul>
<li><p>生效优先级：高于 <strong>detail</strong> 字段，即同时配置 <strong>detail</strong> 与 <strong>image_pixel_limit</strong> 字段时，生效 <strong>image_pixel_limit</strong> 字段配置<strong>。</strong></p>
</li>
<li><p>默认生效规则：若未设置<strong>image_pixel_limit</strong>，则使用 <strong>detail</strong> 配置的值对应的 <strong>min_pixels</strong> / <strong>max_pixels</strong> 值。</p>
</li>
<li><p>input.content.image_pixel_limit.<strong>max_pixels</strong> <code>integer</code></p>
<p>传入图片最大像素限制，大于此像素则等比例缩小至 <strong>max_pixels</strong> 字段取值以下。若未设置，则取值为 <strong>detail</strong> 配置的值对应的 <strong>max_pixels</strong> 值。</p>
<p>云牍91 模型取值范围：(<strong>min_pixels</strong>,  9031680]</p>
</li>
<li><p>input.content.image_pixel_limit.<strong>min_pixels</strong></p>
<p>传入图片最小像素限制，小于此像素则等比例放大至 <strong>min_pixels</strong> 字段取值以上。若未设置，则取值为 <strong>detail</strong> 配置的值对应的 <strong>min_pixels</strong> 值。</p>
<p>云牍91 模型取值范围：[1764,  <strong>max_pixels</strong>)</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p><strong>输入模型的视频</strong> <code>object</code></p>
<ul>
<li><p>input.content.<strong>type</strong> <code>string</code> <code>必选</code>  </p>
</li>
<li><p>input.content. <strong>video_url</strong>  <code>string</code></p>
<p>要发送给模型的视频 URL。可以是完整的 URL，或以 data URL 形式编码的 base64 视频。</p>
</li>
<li><p>input.content. <strong>fps</strong> <code>float</code></p>
<p>输入为视频类型，此处为<code>input_video</code></p>
<p>每秒钟从视频中抽取指定数量的图像，取值范围：<code>[0.2, 5]</code>。</p>
<p>如果使用<strong>file_id</strong>参数，<strong>fps</strong>参数则会失效。</p>
</li>
<li><p><strong>输入模型的文件</strong> <code>object</code></p>
<p>输入模型的文件。当前仅支持PDF文件。</p>
<ul>
<li><p>input.content.<strong>type</strong> <code>string</code> <code>必选</code>    </p>
<p>输入为文件类型，此处为<code>input_file</code>。</p>
</li>
<li><p>input.content.<strong>file_data</strong> <code>string</code> </p>
<p>文件内容的Base64编码。单个文件大小要求不超过50MB。</p>
</li>
<li><p>input.content.<strong>file_name</strong> <code>string</code></p>
<p>文件名。当使用<strong>file_data</strong>时该参数必填。</p>
</li>
<li><p>input.content.<strong>file_url</strong><code>string</code></p>
<p>文件的可访问URL。对应文件的大小要求不超过50MB。</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p><strong>输入模型的音频</strong> <code>object</code> </p>
<ul>
<li>input.content.<strong>type</strong> <code>string</code>  <code>必选</code> </li>
</ul>
</li>
</ul>
<p>​               输入为音频类型，此处为 <code>input_audio</code>。</p>
<ul>
<li><ul>
<li>input.content. <strong>audio_url</strong>  <code>string</code></li>
</ul>
<p>​        要发送给模型的音频 URL。可以是完整的 URL，或以 data URL 形式编码的 base64 音频。</p>
<ul>
<li>input.<strong>role</strong> <code>string</code> <code>必选</code>   </li>
</ul>
</li>
</ul>
<p>​       输入消息的角色，可以是 <code>user</code>，<code>system</code> ，<code>assistant</code>或 <code>developer</code>。</p>
<ul>
<li>input.<strong>type</strong> <code>string</code></li>
</ul>
<p>​       消息输入的类型，此处应为<code>message</code>。</p>
<ul>
<li>input.<strong>partial</strong> <code>boolean</code></li>
</ul>
<p>​       模型续写模式。</p>
<p>​       在 <strong>input</strong> 列表里设置最后一条消息的 <strong>role</strong> 为<code>assistant</code>，并设置 <strong>partial</strong> 为 <code>true</code>开启续写模                      式，模型会基于 <strong>content</strong> 内容进行续写。在续写模式下，<strong>partial</strong> 为必填项，具体使用:</p>
<pre><code class="lang-python">&quot;input&quot;: [
    {&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;Please write bubble sort code without any additional content.&quot;},
    {&quot;role&quot;: &quot;assistant&quot;, &quot;content&quot;: &quot;def bubble_sort(arr):&quot;, &quot;partial&quot;: true} 
]
</code></pre>
<ul>
<li><strong>上下文元素</strong> <code>object</code></li>
</ul>
<p>表示模型生成回复时需参考的上下文内容。该项可以包含文本、图片和视频输入，以及先前助手的回复和工具调用的输出。</p>
<ul>
<li><p>输入的信息<code>object</code></p>
<p>历史请求中，发给模型的信息。</p>
<ul>
<li><p>input.<strong>content</strong> <code>array</code>  <code>必选</code></p>
<p>与 <strong>输入的信息</strong> 中 <code>content</code> 字段的结构完全一致。</p>
</li>
<li><p>input.<strong>role</strong> <code>string</code>  <code>必选</code></p>
<p>输入消息的角色，可选值：<code>system</code>，<code>user</code> 或 <code>developer</code>。</p>
</li>
<li><p>input.<strong>type</strong> <code>string</code></p>
<p>消息输入的类型，此处应为<code>message</code>。</p>
</li>
<li><p>input.<strong>status</strong> <code>string</code> </p>
<p>项目状态，可选值：<code>in_progress</code>，<code>completed</code> 或 <code>incomplete</code>。​</p>
</li>
</ul>
</li>
<li><p><strong>工具函数信息</strong><code>object</code></p>
<p>模型调用工具函数的信息</p>
<ul>
<li><p>input.<strong>arguments</strong>  <code>string</code> <code>必选</code></p>
<p>要传递给函数的参数的 JSON 字符串。</p>
</li>
<li><p>input.<strong>call_id</strong> <code>string</code> <code>必选</code>  </p>
<p>模型生成的函数工具调用的唯一ID。</p>
</li>
<li><p>input.<strong>name</strong> <code>string</code> <code>必选</code></p>
<p>要运行的函数的名称。</p>
</li>
<li><p>input.<strong>type</strong> <code>string</code>  <code>必选</code>   </p>
<p>工具调用的类型，始终为<code>function_call</code>。</p>
</li>
<li><p>input.<strong>status</strong><code>string</code></p>
<p>该项的状态。</p>
</li>
<li><p><strong>工具返回的信息</strong> <code>object</code></p>
<p>调用工具后，工具返回的信息</p>
<ul>
<li><p>input.<strong>call_id</strong> <code>string</code> <code>必选</code>   </p>
<p>模型生成的函数工具调用的唯一 ID。</p>
</li>
<li><p>input.<strong>output</strong> <code>string</code>   <code>必选</code></p>
<p>调用工具后，工具输出的结果。</p>
</li>
<li><p>input.<strong>type</strong> <code>string</code>  <code>必选</code>  </p>
<p>工具调用的类型，始终为 <code>function_call_output</code>。</p>
</li>
<li><p>input.<strong>status</strong> <code>string</code></p>
<p>该项的状态。</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<p><strong>instructions </strong><code>string / null</code> </p>
<p>在模型上下文中插入系统消息或者开发者作为第一条指令。当与 <strong>previous_response_id</strong> 一起使用时，前一个回复中的指令不会被继承到下一个回复中。这样可以方便地在新的回复中替换系统（或开发者）消息。</p>
<p>不可与缓存能力一起使用。配置了<strong>instructions</strong> 字段后，本轮请求无法写入缓存和使用缓存，表现为：</p>
<ul>
<li><p><strong>caching</strong> 字段配置为<code>{&quot;type&quot;:&quot;enabled&quot;}</code> 时报错。</p>
</li>
<li><p>传入带缓存的 <strong>previous_response_id</strong> 时，缓存输入（<strong>cached_tokens</strong>）为0。</p>
</li>
</ul>
<hr>
<p><strong>previous_response_id</strong> <code>string / null</code></p>
<p>上一个模型回复的唯一标识符。使用该标识符可以实现多轮对话。</p>
<blockquote>
<ul>
<li><p>说明</p>
<ul>
<li><p>在请求中传入 previous_response_id，会引入上一轮请求的输入和回答内容，本次请求的输入tokens 会相应增加。工作原理:</p>
<ul>
<li><p>在每一轮对话过程中，深度思考模型会输出思维链内容（CoT）和最终回答（Answer）。</p>
</li>
<li><p>在下一轮对话中，之前输出的思维链内容不会被拼接到上下文中。</p>
<p>思维链内容展现的是模型处理问题的过程，包括将问题拆分为多个问题进行处理，生成多种回复综合得出更好回答等过程</p>
</li>
</ul>
</li>
<li><p>在多轮连续对话中，建议在每次请求之间加入约 100 毫秒的延迟，否则可能会导致调用失败。</p>
</li>
</ul>
</li>
</ul>
</blockquote>
<hr>
<p><strong>expire_at</strong> <code>integer</code> <code>默认值：创建时刻+259200</code> </p>
<p>取值范围：<code>(创建时刻, 创建时刻+604800]</code>，即最多保留7天。</p>
<p>设置存储的过期时刻，需传入 UTC Unix 时间戳（单位：秒），对 <strong>store</strong>（上下文存储） 和 <strong>caching</strong>（上下文缓存） 都生效。</p>
<blockquote>
<p>注意：缓存存储时间计费，过期时刻-创建时刻 ，不满 1 小时按 1 小时计算。</p>
</blockquote>
<hr>
<p><strong>max_output_tokens</strong> <code>integer / null</code> </p>
<p>模型输出最大 token 数，包含模型回答和思维链内容。</p>
<hr>
<p><strong>thinking</strong> <code>object</code>  </p>
<p>控制模型是否开启深度思考模式。默认开启深度思考模式，可以手动关闭。</p>
<p>thinking.<strong>type</strong> <code>string</code>  <code>必选</code> </p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>，<code>auto</code>。</p>
<ul>
<li><p>enabled：开启思考模式，模型一定先思考后回答。</p>
</li>
<li><p>disabled：关闭思考模式，模型直接回答问题，不会进行思考。</p>
</li>
<li><p>auto：自动思考模式，模型根据问题自主判断是否需要思考，简单题目直接回答。</p>
</li>
</ul>
<hr>
<p><strong>reasoning</strong> <code>object</code>默认值<code>{&quot;effort&quot;: &quot;medium&quot;}</code></p>
<p>限制深度思考的工作量。减少深度思考工作量可使响应速度更快，并且深度思考的 token 用量更小。</p>
<p>reasoning.effort <code>string</code></p>
<p>取值范围：minimal，low，medium，high。</p>
<ul>
<li><p>minimal：关闭思考，直接回答。</p>
</li>
<li><p>low：轻量思考，侧重快速响应。</p>
</li>
<li><p>medium：均衡模式，兼顾速度与深度。</p>
</li>
<li><p>high：深度分析，处理复杂问题。</p>
</li>
</ul>
<hr>
<p><strong>caching</strong> <code>object</code> 默认值<code>{&quot;type&quot;: &quot;disabled&quot;}</code> </p>
<p>是否开启缓存。不可与 <strong>instructions</strong> 字段、<strong>tools</strong>（除自定义函数 Function Calling 外）字段一起使用。</p>
<ul>
<li><p>caching.<strong>type</strong> <code>string</code>  <code>必选</code> </p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>。</p>
<ul>
<li><code>enabled</code>：开启缓存。</li>
<li><code>disabled</code>：关闭缓存。</li>
</ul>
</li>
<li><p>caching.<strong>prefix</strong> <code>boolean</code> <code>默认值 false</code></p>
<ul>
<li><code>true</code>：仅创建公共前缀缓存，模型不回复。</li>
<li><code>false</code>：不创建公共前缀缓存。</li>
</ul>
</li>
</ul>
<hr>
<p><strong>store</strong> <code>boolean / null</code> <code>默认值 true</code></p>
<p>是否储存生成的模型响应，以便后续通过 API 检索。</p>
<ul>
<li><p><code>false</code>：不储存，对话内容不能被后续的 API 检索到。</p>
</li>
<li><p><code>true</code>：储存当前模型响应，对话内容能被后续的 API 检索到。</p>
</li>
</ul>
<hr>
<p><strong>stream</strong> <code>boolean / null</code> <code>默认值 false</code></p>
<p>响应内容是否流式返回。</p>
<ul>
<li><p>false：模型生成完所有内容后一次性返回结果。</p>
</li>
<li><p>true：按 SSE 协议逐块返回模型生成内容，并以一条 data: [DONE]消息结束。</p>
</li>
</ul>
<hr>
<p><strong>text</strong> <code>object</code></p>
<p>模型文本输出的格式定义，可以是自然语言，也可以是结构化的 JSON 数据。</p>
<ul>
<li><p>text.<strong>format</strong> <code>object</code> <code>默认值 { &quot;type&quot;: &quot;text&quot; }</code></p>
<p>指定模型文本输出的格式。</p>
<ul>
<li><p><strong>文本格式</strong> <code>object</code></p>
<p>响应格式为自然语言。</p>
<ul>
<li><p>text.format.<strong>type</strong> <code>string</code> <code>必选</code>   </p>
<p>回复格式的类型，此处应为 <code>text</code>。</p>
</li>
</ul>
</li>
<li><p><strong>JSON Object</strong> <code>object</code></p>
<p>响应格式为 JSON 对象。</p>
<blockquote>
<p>该能力尚在 beta 阶段，请谨慎在生产环境使用。</p>
</blockquote>
<p>text.format.<strong>type</strong> <code>string</code> <code>必选</code>  </p>
<p>回复格式的类型，此处应为<code>json_object</code>。 </p>
</li>
<li><p><strong>JSON Schema</strong>  <code>object</code></p>
<p>响应格式为 JSON 对象，遵循schema字段定义的 JSON结构。</p>
<blockquote>
<p>该能力尚在 beta 阶段，请谨慎在生产环境使用。</p>
</blockquote>
<ul>
<li><p>text.format.<strong>type</strong> <code>string</code> <code>必选</code>  </p>
<p>回复格式的类型，此处应为<code>json_schema</code>。</p>
</li>
<li><p>text.format.<strong>name</strong>  <code>string</code> <code>必选</code></p>
<p>用户自定义的JSON结构的名称。</p>
</li>
<li><p>text.format.<strong>schema</strong> <code>object</code> <code>必选</code> </p>
<p>回复格式的JSON格式定义，以JSON Schema对象的形式描述。</p>
</li>
<li><p>text.format.<strong>description</strong> <code>string / null</code></p>
<p>回复用途描述，模型将根据此描述决定如何以该格式回复。</p>
</li>
<li><p>text.format.<strong>strict</strong> <code>boolean / null</code> <code>默认值 false</code></p>
<p>是否在生成输出时，启用严格遵循模式。</p>
<ul>
<li>true：模型将始终遵循schema字段中定义的格式。</li>
<li>false：模型将尽可能遵循schema字段中定义的结构。</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<p><strong>tools</strong> <code>array</code></p>
<p>模型可以调用的工具，当您需要让模型调用工具时，需要配置该结构体。</p>
<p>工具类型：</p>
<p>当前支持多种调用方式，包括</p>
<ul>
<li><p>内置工具（Built-in tools）：由方舟提供的预置工具，用以扩展模型内容，如豆包助手、联网搜索工具、图像处理工具、私域知识库搜索工具等。</p>
</li>
<li><p>MCP工具：通过自定义 MCP 服务器与第三方系统集成。</p>
</li>
<li><p>自定义工具（Function Calling）：您自定义的函数，使模型能够使用强类型参数和输出调用您自己的代码。</p>
<ul>
<li><p>豆包助手</p>
<p>使用豆包助手，快速集成豆包app同款AI能力。</p>
<ul>
<li><p>tools.<strong>type</strong> <code>string</code> <code>必选</code></p>
<p>工具类型，此处填写工具名称，应为<code>doubao_app</code>。</p>
</li>
<li><p>tools.<strong>feature</strong> <code>object</code></p>
<p>豆包助手子功能。</p>
<ul>
<li><p>tools.feature.<strong>chat</strong> object</p>
<p>日常沟通功能，豆包同款自由对话，默认关闭。</p>
<ul>
<li><p>tools.feature.chat.<strong>type</strong> <code>string</code> <code>默认值</code> <code>disabled</code></p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>。</p>
<ul>
<li><p><code>enabled</code>：开启此功能。</p>
<p><code>disabled</code>：关闭此功能。    </p>
</li>
</ul>
</li>
<li><p>tools.feature.chat.<strong>role_description</strong><code>string</code> <code>默认值：你的名字是豆包,有很强的专业性</code>。</p>
<p>使用豆包助手时修改角色设定。</p>
<p>此字段与system prompt、instructions 互斥。</p>
</li>
</ul>
</li>
<li><p>tools.feature.<strong>deep_chat</strong> <code>object</code></p>
<p>深度沟通功能，豆包同款深度思考对话，默认关闭。</p>
<ul>
<li><p>tools.feature.deep_chat.<strong>type</strong><code>string</code> <code>默认值disabled</code></p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>。</p>
<ul>
<li><p><code>enabled</code>：开启此功能。</p>
</li>
<li><p><code>disabled</code>：关闭此功能。</p>
</li>
</ul>
</li>
<li><p>tools.feature.deep_chat.<strong>role_description</strong> <code>string</code> <code>默认值：你的名字是豆包,有很强的专业性</code>。</p>
<p>使用豆包助手时修改角色设定。</p>
<p>此字段与system prompt、instructions 互斥。</p>
</li>
</ul>
</li>
<li><p>tools.feature.<strong>ai_search</strong> <code>object</code></p>
<p>联网搜索功能，豆包同款AI搜索能力，默认关闭。 </p>
<ul>
<li><p>tools.feature.ai_search.<strong>type</strong> <code>string</code> <code>默认值 disabled</code></p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>。</p>
<ul>
<li><p><code>enabled</code>：开启此功能。</p>
</li>
<li><p><code>disabled</code>：关闭此功能。</p>
</li>
</ul>
</li>
<li><p>tools.feature.ai_search.<strong>role_description</strong> <code>string</code> <code>默认值：你的名字是豆包,有很强的专业性。</code></p>
<p>使用豆包助手时修改角色设定。</p>
<p>此字段与system prompt、instructions 互斥。</p>
</li>
</ul>
</li>
<li><p>tools.feature.<strong>reasoning_search</strong> <code>object</code></p>
<p>边想边搜功能，豆包同款结合思考过程的智能搜索能力，默认关闭。 </p>
<ul>
<li><p>tools.feature.reasoning_search.<strong>type</strong> <code>string</code> <code>默认值 disabled</code></p>
<p>取值范围：<code>enabled</code>，<code>disabled</code>。</p>
<ul>
<li><p><code>enabled</code>：开启此功能。</p>
</li>
<li><p><code>disabled</code>：关闭此功能。</p>
</li>
</ul>
</li>
<li><p>tools.feature.reasoning_search.<strong>role_description</strong>  <code>string</code> <code>默认值：你的名字是豆包,有很强的专业性。</code></p>
<p>使用豆包助手时修改角色设定。</p>
<p>此字段与system prompt、instructions 互斥。</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>tools.<strong>user_location</strong> <code>object</code> <code>默认值{&quot;type&quot;: &quot;approximate&quot;}</code></p>
<p>用户地理位置，用于优化对话与搜索结果，包含 type、country、city、region 字段。示例如下：</p>
<pre><code class="lang-json">&quot;user_location&quot;:{
     &quot;type&quot;:&quot;approximate&quot;,
     &quot;country&quot;: &quot;中国&quot;,
     &quot;region&quot;:&quot;浙江&quot;,
     &quot;city&quot;:&quot;杭州&quot;
}
</code></pre>
<blockquote>
<p>注意：填写 type 后，country、city、region 中 至少1个字段有有效值。</p>
</blockquote>
</li>
</ul>
</li>
<li><p>函数调用</p>
<ul>
<li><p>tools.<strong>type</strong> <code>string</code>  <code>必选</code></p>
<p>工具类型，此处应为 function。</p>
</li>
<li><p>tools.<strong>name</strong> <code>string</code>  <code>必选</code> </p>
<p>调用的函数的名称。</p>
</li>
<li><p>tools.<strong>description</strong> <code>string</code></p>
<p>调用函数的描述，大模型会用它来判断是否调用这个函数。</p>
</li>
<li><p>tools.<strong>parameters</strong> <code>object</code>  <code>必选</code></p>
<p>函数请求参数，以 JSON Schema 格式描述。具体格式格式如下：</p>
<pre><code class="lang-json">{
  &quot;type&quot;: &quot;object&quot;,
  &quot;properties&quot;: {
    &quot;参数名&quot;: {
      &quot;type&quot;: &quot;string | number | boolean | object | array&quot;,
      &quot;description&quot;: &quot;参数说明&quot;
    }
  },
  &quot;required&quot;: [&quot;必填参数&quot;]
}
</code></pre>
<p>其中，</p>
<ul>
<li><p>所有字段名大小写敏感。</p>
</li>
<li><p><strong>parameters</strong> 须是合规的 JSON Schema 对象。</p>
</li>
<li><p>建议用英文字段名，中文置于 <strong>description</strong> 字段中。</p>
</li>
</ul>
</li>
<li><p>tools.<strong>strict</strong> <code>boolean</code> <code>必选</code> <code>默认值 true</code></p>
<p>是否强制执行严格的参数验证。默认为<code>true</code>。</p>
</li>
</ul>
</li>
<li><p>联网搜索工具</p>
<p>在互联网上搜索与该提示相关的资源。</p>
<ul>
<li><p>tools.<strong>type</strong> <code>string</code>  <code>必选</code></p>
<p>工具类型，此处填写工具名称，应为<code>web_search</code>。 </p>
</li>
<li><p>tools.<strong>sources</strong> <code>string[]</code></p>
<p>选择联网搜索的附加内容源。可选头条图文、抖音百科、墨迹天气。</p>
<ul>
<li><p><code>toutiao</code> ：联网搜索的附加头条图文内容源。</p>
</li>
<li><p><code>douyin</code> ：联网搜索的附加抖音百科内容源。</p>
</li>
<li><p><code>moji</code>：联网搜索的附加墨迹天气内容源。 </p>
</li>
</ul>
</li>
<li><p>tools.<strong>limit</strong> <code>integer</code> <code>默认值 10</code></p>
<p>取值范围： <code>[1, 50]</code>。</p>
<p>单轮搜索最大召回条数。</p>
<blockquote>
<p>说明：影响输入规模与性能，单次搜索最多返回20条结果（单轮可能有多次搜索），默认召回10条。 </p>
</blockquote>
</li>
<li><p>tools.<strong>user_location</strong><code>object</code> <code>默认值</code> <code>{&quot;type&quot;: &quot;approximate&quot;}</code></p>
<p>用户地理位置，用于天气查询等场景，包含 type、country、city、region 字段。示例如下：</p>
<pre><code class="lang-json">&quot;user_location&quot;:{
     &quot;type&quot;:&quot;approximate&quot;,
     &quot;country&quot;: &quot;中国&quot;,
     &quot;region&quot;:&quot;浙江&quot;,
     &quot;city&quot;:&quot;杭州&quot;
}
</code></pre>
<blockquote>
<p>注意：填写 type 后，country、city、region 中 至少1个字段有有效值。</p>
</blockquote>
</li>
<li><p>tools.<strong>max_keyword</strong> <code>integer</code> </p>
<p>取值范围：<code>[1, 50]</code>。</p>
<p>工具一轮使用，最大并行搜索关键词的数量。</p>
</li>
</ul>
</li>
<li><p>图像处理工具</p>
<p>使用画点、画线、旋转、缩放、框选/裁剪关键区域等基础图像处理工具。</p>
<ul>
<li><p>tools.<strong>type</strong> <code>string</code> <code>必选</code></p>
<p>工具类型，此处填写工具名称，应为<code>image_process</code>。</p>
</li>
<li><p>tools.<strong>point</strong> <code>object</code></p>
<p>画点/连线功能开关，控制是否启用点绘制与连线功能。</p>
<ul>
<li><p>tools.point.<strong>type</strong> <code>string</code>  <code>默认值 enabled</code></p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>。</p>
<ul>
<li><p><code>enabled</code>：开启此功能。</p>
</li>
<li><p><code>disabled</code>：关闭此功能。</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>tools.<strong>grounding</strong> <code>object</code></p>
<p>框选/裁剪功能开关，控制是否启用关键区域框选或裁剪。</p>
<ul>
<li><p>tools.grounding.<strong>type</strong> <code>string</code> <code>默认值 enabled</code></p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>。</p>
<ul>
<li><p><code>enabled</code>：开启此功能。</p>
</li>
<li><p><code>disabled</code>：关闭此功能。</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>tools.<strong>zoom</strong> <code>object</code></p>
<p>缩放功能开关，控制是否启用全图/指定区域缩放（支持0.5-2.0倍）。</p>
<p>tools.zoom.<strong>type</strong> <code>string</code>  <code>默认值 enabled</code></p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>。</p>
<ul>
<li><p><code>enabled</code>：开启此功能。</p>
</li>
<li><p><code>disabled</code>：关闭此功能。</p>
</li>
</ul>
</li>
<li><p>tools.<strong>rotate</strong> <code>object</code></p>
<p>旋转功能开关，控制是否启用顺时针旋转（支持0-359度）。</p>
<p>tools.rotate.<strong>type</strong> <code>string</code>  <code>默认值 enabled</code></p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>。</p>
<ul>
<li><p><code>enabled</code>：开启此功能。</p>
</li>
<li><p><code>disabled</code>：关闭此功能。</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>MCP工具</p>
<ul>
<li><p>tools.<strong>type</strong> <code>string</code> <code>必选</code></p>
<p>工具类型，此处填写工具名称，应为<code>mcp</code>。</p>
</li>
<li><p>tools.<strong>server_label</strong> <code>string</code> <code>必选</code></p>
<p>MCP Server标签，建议设定与工具用途/Server名称一致。 </p>
</li>
<li><p>tools.<strong>server_url</strong> <code>string</code> <code>必选</code></p>
<p>MCP Server访问地址。</p>
</li>
<li><p>tools.<strong>headers</strong> <code>object</code></p>
<p>要发送至 MCP 服务器的可选 HTTP 请求头，用于身份验证或其他用途。包含：</p>
<ul>
<li><p><code>Authorization</code> 鉴权信息（不存储）。</p>
</li>
<li><p>自定义key-value。</p>
</li>
</ul>
</li>
<li><p>tools.<strong>require_approval</strong> <code>object/string</code>  <code>默认值 always</code></p>
<p>指定哪些 MCP 服务器工具需要授权。 </p>
<ul>
<li><p><strong>工具批准设置</strong> <code>string</code></p>
<p>取值范围：</p>
<ul>
<li><p><code>always</code>：所有工具需用户确认后调用。</p>
</li>
<li><p><code>never</code>：所有工具无需确认，直接调用（可能存在安全风险）。</p>
</li>
</ul>
</li>
<li><p><strong>工具批准筛选</strong> <code>object</code> </p>
<p>指定 MCP 服务器的哪些工具需要审批。可以是 always、never或与需要审批的工具关联的过滤器对象。</p>
<ul>
<li><p>tools.require_approval.<strong>always</strong> <code>object</code></p>
<p>指定哪些工具需要用户确认批准。</p>
<ul>
<li><p>tools.require_approval.always<strong>.tool_names</strong><code>array</code></p>
<p>需要用户确认批准的工具名称列表。 </p>
</li>
</ul>
</li>
<li><p>tools.require_approval.<strong>never</strong> <code>object</code></p>
<p>指定哪些工具不需要用户确认批准使用。 </p>
<ul>
<li><p>tools.require_approval.never<strong>.tool_names</strong> <code>array</code></p>
<p>不需要用户确认批准的工具名称列表。</p>
</li>
</ul>
</li>
<li><p>tools.<strong>allowed_tools</strong> <code>array/object</code></p>
<p>工具加载范围，默认包含当前MCP Server所有工具。</p>
<ul>
<li><p><strong>工具加载范围</strong> <code>array</code></p>
<p>允许加载的工具名称的字符串数组。</p>
</li>
<li><p><strong>工具筛选</strong> <code>object</code></p>
<p>指定 MCP 服务器的哪些工具允许使用。</p>
<ul>
<li><p>tools.allowed_tools.<strong>tool_names</strong> <code>array</code></p>
<p>允许的工具名称列表。</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><p>私域知识库搜索工具</p>
<ul>
<li><p>tools.<strong>type</strong> <code>string</code> <code>必选</code></p>
<p>工具类型，此处填写工具名称，应为<code>knowledge_search</code>。</p>
</li>
<li><p>tools.<strong>knowledge_resource_id</strong>  <code>string</code> <code>必选</code></p>
<p>填写需使用的私域知识库ID。</p>
</li>
<li><p>tools.<strong>limit</strong> <code>integer</code> <code>默认值 10</code></p>
<p>取值范围：<code>[1, 200]</code>。</p>
<p>最大可被采用的搜索结果。</p>
</li>
<li><p>tools.<strong>max_keyword</strong> <code>integer</code>  </p>
<p>取值范围：<code>[1, 50]</code>。</p>
<p>工具一轮使用，最大并行搜索关键词的数量。</p>
</li>
<li><p>tools.<strong>doc_filters</strong>  <code>object</code></p>
<p>设置文档字段级别的检索过滤条件，确保只在符合条件的文档中检索。</p>
<ul>
<li><p>支持用作过滤条件的文档字段包括：</p>
<p>系统字段：</p>
<ul>
<li><code>doc_id</code>（仅适用于手动创建的知识库）</li>
<li><code>_sys_auto_doc_id</code>（适用于手动创建的知识库和 API 创建的知识库）</li>
</ul>
<p>自定义字段：</p>
<p>已为知识库文档添加的<strong>文档标签（</strong>对应知识库 <code>index_config</code> 的<code>fields</code> 字段中的 <code>field</code>）</p>
</li>
<li><p>支持单一条件过滤和多条件组合过滤（支持<code>And</code>和<code>Or</code>逻辑运算）。</p>
</li>
</ul>
</li>
<li><p>tools.<strong>description</strong>  <code>string</code></p>
<p>私域知识库的描述信息。</p>
</li>
<li><p>tools.<strong>dense_weight</strong>  <code>float</code>  <code>默认值 0.5</code></p>
<p>取值范围：<code>[0.2, 1]</code>。</p>
<p>稠密向量的权重。</p>
<ul>
<li><p>1 表示纯稠密检索 ，趋向于 0 表示纯字面检索。</p>
</li>
<li><p>只有在请求的知识库使用的是混合检索时有效，即索引算法为 hnsw_hybrid。</p>
</li>
</ul>
</li>
<li><p>tools.<strong>ranking_options</strong>  <code>object</code></p>
<p>检索后处理选项。</p>
<ul>
<li><p>tools.ranking_options.<strong>rerank_switch</strong> <code>bool ``默认值 false</code></p>
<p>是否自动对检索结果做 rerank。</p>
<p>若设置为true，则会自动请求 rerank 模型排序。</p>
</li>
<li><p>tools.ranking_options.<strong>retrieve_count</strong> <code>integer</code> <code>默认值 25</code></p>
<p>进入重排的切片数量。此项只有在 <strong>rerank_switch</strong> 为 <strong>true</strong> 时生效。</p>
<p>注意：retrieve_count 需要大于等于 limit，否则会抛出错误。</p>
</li>
<li><p>tools.ranking_options.<strong>get_attachment_link</strong> <code>bool</code> <code>默认值 false</code></p>
<p>是否获取切片中图片的临时下载链接。</p>
</li>
<li><p>tools.ranking_options.<strong>chunk_diffusion_count</strong><code>integer</code> <code>默认值 0</code></p>
<p>取值范围<code>[0, 5]</code></p>
<p>检索阶段返回命中切片的上下几片邻近切片。默认为 0，表示不进行 chunk diffusion。</p>
</li>
<li><p>tools.ranking_options.<strong>chunk_group</strong><code>bool</code> <code>默认值 false</code></p>
<p>文本聚合。</p>
<p>默认不聚合，对于非结构化文件，考虑到原始文档内容语序对大模型的理解，可开启文本聚合。开启后，会根据文档及文档顺序，对切片进行重新聚合排序返回。</p>
</li>
<li><p>tools.ranking_options.<strong>rerank_model</strong> <code>string</code>   <code>默认值 &quot;base-multilingual-rerank&quot;</code> </p>
<p>rerank 模型选择。仅在 <strong>rerank_switch</strong> 为 <code>True</code> 的时候生效。</p>
<p>可选模型： </p>
<ul>
<li><p>（推荐）<code>&quot;base-multilingual-rerank&quot;</code>：速度快、长文本、支持70+种语言。</p>
</li>
<li><p>&quot;<code>m3-v2-rerank</code>&quot;：常规文本、支持100+种语言。</p>
</li>
</ul>
<p>tools.ranking_options.<strong>rerank_only_chunk</strong> <code>bool</code> <code>默认值 false</code></p>
<p>是否仅根据 chunk 内容计算重排分数。可选值： </p>
<ul>
<li><p><code>True</code>：只根据 chunk 内容计算分 </p>
</li>
<li><p><code>False</code>：根据 chunk title + 内容 一起计算排序分</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<p><strong>max_tool_calls</strong>  <code>integer</code><br>取值范围： <code>[1, 10]</code>。</p>
<p>最大工具调用轮次（一轮里不限制次数）。在工具调用达到此限制次数后，提示模型停止更多工具调用并进行回答。</p>
<p>注意：该参数为尽力而为（best effort）机制，不保证成功，最终调用次数会受模型推理效果、工具返回结果有效性等因素影响。</p>
<blockquote>
<ul>
<li><p>豆包助手不支持此参数。</p>
</li>
<li><p>Web Search 基础联网搜索工具的默认值 3。</p>
</li>
<li><p>Image Process 图像处理工具的默认值 10，不支持修改。</p>
</li>
<li><p>Knowledge Search 私域知识库搜索工具的默认值为3。</p>
</li>
</ul>
</blockquote>
<hr>
<p><strong>context_management</strong> <code>object</code>  </p>
<p>上下文管理策略，帮助模型有效利用上下文窗口。</p>
<ul>
<li><p>context_management<strong>.edits</strong> <code>array</code></p>
<p>支持的上下文编辑策略，用于管理上下文中思考块和工具调用内容。</p>
<ul>
<li><p><strong>思考块清除</strong> <code>object</code></p>
<p>在开启思考时管理思维链内容。</p>
<ul>
<li><p>context_management.edits.<strong>type</strong> <code>string</code></p>
<p>上下文编辑策略类型，此处应为<code>clear_thinking</code>。</p>
</li>
<li><p>context_management.edits.<strong>keep</strong> <code>object/string</code></p>
<p>思维链保留策略。</p>
<ul>
<li><p><strong>保留最近 N 轮思维链</strong> <code>object</code></p>
<ul>
<li><p>context_management.edits.keep.<strong>type</strong> <code>string</code></p>
<p>思维链保留策略类型，此处应为<code>thinking_turns</code>。</p>
</li>
<li><p>context_management.edits.keep.<strong>value</strong> <code>integer</code> <code>默认值 1</code></p>
<p>保留最近 N 轮的思维链。</p>
</li>
</ul>
</li>
<li><p><strong>保留所有思维链</strong> <code>string</code></p>
<p>保留所有思维链，此处应为 <code>all</code>。</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p><strong>工具调用内容清除</strong> <code>object</code></p>
<p>在对话上下文增长超过配置的阈值时清除工具调用内容。</p>
<ul>
<li><p>context_management.edits.<strong>type</strong> <code>string</code></p>
<p>上下文编辑策略类型，此处应为<code>clear_tool_uses</code>。</p>
</li>
<li><p>context_management.edits.<strong>keep</strong> <code>object</code></p>
<p>工具调用内容保留策略。</p>
<ul>
<li><p>context_management.edits.keep.<strong>type</strong> <code>string</code></p>
<p>工具调用内容保留策略类型，此处应为<code>tool_uses</code>。</p>
</li>
<li><p>context_management.edits.keep.<strong>value</strong> <code>integer</code> <code>默认值 3</code> </p>
<p>保留最近 N 轮工具调用内容。</p>
</li>
</ul>
</li>
<li><p>context_management.edits.<strong>exclude_tools</strong> <code>array</code></p>
<p>不会被清除的工具名称列表，用于保留重要上下文。</p>
</li>
<li><p>context_management.edits.<strong>clear_tool_input</strong> <code>boolean</code> <code>默认值 false</code></p>
<p>是否清除工具调用参数。</p>
</li>
<li><p>context_management.edits.<strong>trigger</strong> <code>object</code></p>
<p>触发工具调用内容清除策略的阈值。</p>
<ul>
<li><p>context_management.edits.trigger.<strong>type</strong> <code>string</code></p>
<p>触发工具调用内容清除策略类型，此处应为<code>tool_uses</code>。</p>
</li>
<li><p>context_management.edits.trigger.<strong>value</strong> <code>integer</code> </p>
<p>工具调用达到 N 轮时触发清除策略。</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0" name="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0">创建模型响应参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%B0%83%E7%94%A8%E8%BF%94%E5%9B%9E" name="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%B0%83%E7%94%A8%E8%BF%94%E5%9B%9E">创建模型响应非流式调用返回</h3>
<p>返回一个 response object。</p>
<hr>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E6%B5%81%E5%BC%8F%E8%B0%83%E7%94%A8%E8%BF%94%E5%9B%9E" name="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E6%B5%81%E5%BC%8F%E8%B0%83%E7%94%A8%E8%BF%94%E5%9B%9E">创建模型响应流式调用返回</h3>
<p>服务器会在生成 Response 的过程中，通过 Server-Sent Events（SSE）实时向客户端推送事件。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="%E5%88%9B%E5%BB%BA%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">创建模型响应调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code class="lang-Curl">curl --location &quot;https://modelpool-api.talkingdata.com/model/openai/api/v3/responses?requestId=550e8400-e29b-41d4-a716-446655440000&quot; \
--header &quot;Authorization: Bearer $ARK_API_KEY&quot; \
--header &quot;Content-Type: application/json&quot; \
--header &quot;X-Timestamp: $TIMESTAMP&quot; \
--data &#39;{
    &quot;model&quot;: &quot;T0103002&quot;,
    &quot;input&quot;: &quot;你好呀。&quot;
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code class="lang-Curl">{
  &quot;id&quot;: &quot;resp_0217****&quot;,
  &quot;created_at&quot;: 1756280722.0,
  &quot;error&quot;: null,
  &quot;incomplete_details&quot;: null,
  &quot;instructions&quot;: null,
  &quot;model&quot;: &quot;T0103002&quot;,
  &quot;object&quot;: &quot;response&quot;,
  &quot;output&quot;: [
    {
      &quot;id&quot;: &quot;rs_0217****404a&quot;,
      &quot;summary&quot;: [
        {
          &quot;text&quot;: &quot;\n用户说“你好呀。”，这是一个很友好的问候，我需要用同样友好的方式回应。首先，应该回应用户的问候，然后可以表达一下愿意帮助的态度，让对话能够继续下去。用户可能接下来会有其他问题或者想聊聊天，所以回应要自然、亲切。\n\n首先，直接回“你好呀！”来呼应对方的问候，保持一致的语气。然后加上一句“很高兴见到你～ 有什么我可以帮你的吗？”这样既表达了友好，又主动提供帮助，让用户知道我在这里可以协助他们。这样的回应比较温暖，也符合日常交流的习惯，不会显得太生硬。\n\n需要注意的是，用户可能只是想打个招呼，所以回应不要太复杂，保持简洁和亲切就好。避免使用太正式的语言，保持口语化，让用户感觉舒适。总结一下，回应应该包含问候、表达高兴见到对方，以及提供帮助的意愿。&quot;,
          &quot;type&quot;: &quot;summary_text&quot;
        }
      ],
      &quot;type&quot;: &quot;reasoning&quot;,
      &quot;status&quot;: &quot;completed&quot;
    },
    {
      &quot;id&quot;: &quot;msg_0217****a93c&quot;,
      &quot;content&quot;: [
        {
          &quot;text&quot;: &quot;你好呀！很高兴见到你～ 有什么我可以帮你的吗？ 😊&quot;,
          &quot;type&quot;: &quot;output_text&quot;,
          &quot;annotations&quot;: null
        }
      ],
      &quot;role&quot;: &quot;assistant&quot;,
      &quot;status&quot;: &quot;completed&quot;,
      &quot;type&quot;: &quot;message&quot;
    }
  ],
  &quot;parallel_tool_calls&quot;: null,
  &quot;temperature&quot;: null,
  &quot;tool_choice&quot;: null,
  &quot;tools&quot;: null,
  &quot;top_p&quot;: null,
  &quot;max_output_tokens&quot;: 32768,
  &quot;previous_response_id&quot;: null,
  &quot;thinking&quot;: null,
  &quot;service_tier&quot;: &quot;default&quot;,
  &quot;status&quot;: &quot;completed&quot;,
  &quot;text&quot;: null,
  &quot;usage&quot;: {
    &quot;input_tokens&quot;: 88,
    &quot;input_tokens_details&quot;: {
      &quot;cached_tokens&quot;: 0
    },
    &quot;output_tokens&quot;: 230,
    &quot;output_tokens_details&quot;: {
      &quot;reasoning_tokens&quot;: 211
    },
    &quot;total_tokens&quot;: 318
  },
  &quot;caching&quot;: {
    &quot;type&quot;: &quot;disabled&quot;
  },
  &quot;store&quot;: true,
  &quot;expire_at&quot;: 1756539922
}
</code></pre>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="%E6%9F%A5%E8%AF%A2%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">查询模型响应接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p>通过 response id 获取模型响应。</p>
<p><strong>请求方法：</strong> GET </p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/responses/{response_id}</code></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E6%A8%A1%E5%9E%8B%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="%E6%9F%A5%E8%AF%A2%E6%A8%A1%E5%9E%8B%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">查询模型请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>response_id</strong> <code>string</code> <code>必选</code> </p>
<p>待检索的响应 id。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0" name="%E6%9F%A5%E8%AF%A2%E6%A8%A1%E5%9E%8B%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0">查询模型响应参数</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><p>如果您调用的 response 响应已完成，模型会返回对应的 response object。</p>
</li>
<li><p>如果您调用的 response 响应未完成，模型会返回错误码。</p>
</li>
</ul>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E6%A8%A1%E5%9E%8B%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="%E6%9F%A5%E8%AF%A2%E6%A8%A1%E5%9E%8B%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">查询模型调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code class="lang-Curl">curl --location &quot;https://modelpool-api.talkingdata.com/model/openai/api/v3/responses/resp_0217****&quot; \
--header &quot;Authorization: Bearer $ARK_API_KEY&quot; \
--header &quot;Content-Type: application/json&quot; \
--header &quot;X-Timestamp: $TIMESTAMP&quot;
</code></pre>
<p>响应示例：</p>
<pre><code>{
    &quot;created_at&quot;: 1754571515,
    &quot;id&quot;: &quot;resp_0217******&quot;,
    &quot;max_output_tokens&quot;: 32768,
    &quot;model&quot;: &quot;T0103002&quot;,
    &quot;object&quot;: &quot;response&quot;,
    &quot;output&quot;: [
        {
            &quot;type&quot;: &quot;message&quot;,
            &quot;role&quot;: &quot;assistant&quot;,
            &quot;content&quot;: [
                {
                    &quot;type&quot;: &quot;output_text&quot;,
                    &quot;text&quot;: &quot;这张图片呈现了**一位红发女孩与一只红狐亲密依偎**的温馨场景，氛围柔和治愈：  \n\n### 人物与动物细节：  \n- **女孩**：有着浓密蓬松的**红棕色长发**（色泽与狐狸皮毛呼应），脸上点缀着浅褐色雀斑，身着**轻柔的白色（或米白色）衣衫**（衣料褶皱自然，显柔和质感）。她双眼轻闭，神情恬静温柔，脸颊亲昵地贴靠狐狸头部，姿态满是信赖与温情。  \n- **红狐**：毛色鲜亮且层次丰富——主体为暖调红棕色，脸部、颈部及胸前覆盖**蓬松的白色绒毛**，耳朵尖端呈**黑色**，耳内侧是浅棕与黑色相间的细腻纹理；眼睛是**琥珀色（或金黄带黑瞳）**，明亮有神，黑色鼻尖与搭在女孩衣袖上的**黑色爪子**（可见部分），让它更显灵动真实。狐狸头部微微侧转，却与女孩脸紧密相靠，似在回应这份亲昵。  \n\n\n### 场景与氛围：  \n背景是**朦胧的自然草地**（枯黄与绿意交织的草植，因虚化处理更显悠远静谧），柔和的光线（偏暖调）笼罩画面，焦点完全落在人与狐的亲密互动上。整体氛围**温暖、和谐、治愈**，传递出人与动物间信任亲昵的美好瞬间，仿佛时间在此刻静止。  \n\n\n画面通过色彩呼应（女孩红发与狐狸皮毛）、姿态互动（依偎贴靠），构建出诗意且宁静的“共生感”，细节（雀斑、狐的爪/耳纹理）让场景更具真实与感染力。&quot;
                }
            ],
            &quot;status&quot;: &quot;completed&quot;,
            &quot;id&quot;: &quot;msg_0217******&quot;
        }
    ],
    &quot;thinking&quot;: {
        &quot;type&quot;: &quot;enabled&quot;
    },
    &quot;status&quot;: &quot;completed&quot;,
    &quot;usage&quot;: {
        &quot;input_tokens&quot;: 1377,
        &quot;output_tokens&quot;: 910,
        &quot;total_tokens&quot;: 2287,
        &quot;input_tokens_details&quot;: {
            &quot;cached_tokens&quot;: 0
        },
        &quot;output_tokens_details&quot;: {
            &quot;reasoning_tokens&quot;: 552
        }
    },
    &quot;caching&quot;: {
        &quot;type&quot;: &quot;disabled&quot;
    },
    &quot;store&quot;: true,
    &quot;expire_at&quot;: 1754830715
}
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="The%20response%20object" name="The%20response%20object">The response object</h2>
<p><span id="Hrya4y9k"></span></p>
<p>创建模型请求 或 模型查询响应后，模型会返回一个 response 对象。本文为您介绍 response 对象包含的详细参数。</p>
<div style="background-color:#fafbfc; padding:16px; border-radius:8px; font-size:16px; line-height:2;white-space:pre-wrap;"><b>说明</b>
获取模型响应时，模型返回的 response 对象不包含思维链内容。</div>


<ul>
<li><p><strong>created_at</strong><code>integer</code></p>
<p>本次请求创建时间的 Unix 时间戳（秒）。</p>
</li>
<li><p><strong>error</strong> <code>object / null</code></p>
<p>模型未能生成响应时返回的错误对象。</p>
<ul>
<li><p>code：相应的错误码。</p>
</li>
<li><p>message：错误描述。</p>
</li>
</ul>
</li>
<li><p><strong>id</strong> <code>string</code></p>
<p>本次请求的唯一标识。</p>
</li>
<li><p><strong>incomplete_details</strong> <code>object / null</code></p>
<p>响应未能完成的细节。</p>
<p><code>reason</code>：响应未能完成的原因。</p>
</li>
<li><p><strong>instructions</strong> <code>string / null</code></p>
<p>在模型上下文中插入一条系统（或开发者）消息，作为首项。</p>
<p>当与 <code>previous_response_id</code> 一起使用时，前一响应中的指令不会延续到下一响应。</p>
</li>
<li><p><strong>max_output_tokens</strong> <code>integer / null</code></p>
<p>模型输出最大 token 数，包含模型回答和思维链内容。</p>
</li>
<li><p><strong>model</strong> <code>string</code></p>
<p>本次请求实际使用的模型名称和版本。</p>
</li>
<li><p><strong>object</strong><code>string</code></p>
<p>固定为<code>response</code>。</p>
</li>
<li><p><strong>output</strong> <code>array</code></p>
<p>模型的输出消息列表，包含模型响应本次请求生成的回答、思维链、工具调用。</p>
<ul>
<li><p><strong>模型回答</strong> <code>object</code></p>
<p>模型回答，不包含思维链。 </p>
<ul>
<li><p>output.<strong>content</strong> <code>array</code></p>
<p>输出消息的内容。 </p>
<ul>
<li><p><strong>文本回答</strong> <code>object</code></p>
<p>模型回答的文本消息。</p>
<ul>
<li><p>output.content.<strong>text</strong><code>string</code> </p>
<p>模型回答的文本内容。</p>
</li>
<li><p>output.content.<strong>type</strong> <code>string</code> </p>
<p>模型回答的类型，固定为<code>output_text</code>。</p>
</li>
</ul>
</li>
</ul>
</li>
<li><p>output.<strong>role</strong> <code>string</code> </p>
<p>输出信息的角色，固定为<code>assistant</code>。</p>
</li>
<li><p>output.<strong>status</strong> <code>string</code></p>
<p>输出消息的状态。</p>
</li>
<li><p>output.<strong>id</strong> <code>string</code></p>
<p>此回答的唯一标识。</p>
</li>
<li><p>output.<strong>type</strong> <code>string</code></p>
<p>输出消息的类型，此处应为<code>message</code>。</p>
</li>
<li><p>output.<strong>partial</strong> <code>boolean</code></p>
<p>模型开启续写模式时会返回该字段，此处应为<code>true</code>。</p>
</li>
</ul>
</li>
<li><p><strong>模型思维链</strong></p>
<p>本次请求，当触发深度思考时，模型会返回问题拆解的思维链内容。 </p>
<ul>
<li><p>output.<strong>summary</strong> <code>array</code></p>
<p>思维链内容。</p>
<ul>
<li><p>output.summary.<strong>text</strong> <code>string</code> </p>
<p>思维链内容的文本部分。</p>
</li>
<li><p>output.summary.<strong>type</strong> <code>string</code> </p>
<p>对象的类型，此处应为 <code>summary_text</code>。</p>
</li>
</ul>
</li>
<li><p>output. <strong>content</strong>  <code>array</code> </p>
<p>思考内容原文。</p>
<ul>
<li><p>output.content.<strong>text</strong> <code>string</code> </p>
<p>思维链内容的文本部分。</p>
</li>
<li><p>output.content. <strong>type</strong> <code>string</code> </p>
<p>对象的类型，此处应为 <code>reasoning_text</code>。</p>
</li>
</ul>
<p>本输出对象的类型，此处应为 <code>reasoning</code>。</p>
</li>
<li><p>output.<strong>status</strong> <code>string</code></p>
<p>本次思维链内容返回的状态。</p>
</li>
<li><p>output. <strong>encrypted_content</strong> <code>string</code></p>
<p>经加密及压缩处理后的思考内容原文。仅当在include参数中指定 <code>reasoning.encrypted_content</code>。</p>
</li>
<li><p>output.<strong>id</strong> <code>string</code></p>
<p>本思维链消息的唯一标识。</p>
</li>
</ul>
</li>
<li><p><strong>工具调用</strong></p>
<p>本次请求，模型根据信息认为需要调用的工具信息以及对应参数。</p>
<ul>
<li><p>属性 </p>
<ul>
<li><p>output.<strong>arguments</strong> <code>string</code></p>
<p>要传递给函数的参数，格式为 JSON 字符串。</p>
</li>
<li><p>output.<strong>call_id</strong> <code>string</code> </p>
<p>本次工具调用信息的唯一 ID 。</p>
</li>
<li><p>output.<strong>name</strong> <code>string</code> </p>
<p>要运行的函数的名称。</p>
</li>
<li><p>output.<strong>type</strong> <code>string</code> </p>
<p>工具调用的类型，此处应为<code>function_call</code>。 </p>
</li>
<li><p>output.<strong>status</strong> <code>string</code></p>
<p>此时消息返回的状态。</p>
</li>
<li><p>output.<strong>id</strong> <code>string</code></p>
<p>本次输出的唯一标识。</p>
</li>
</ul>
</li>
<li><p><strong>MCP 工具</strong></p>
<ul>
<li><p>output.<strong>id</strong> <code>string</code></p>
<p>本次输出的唯一标识。</p>
</li>
<li><p>output.<strong>server_label</strong> <code>string</code> </p>
<p>MCP Server标签。</p>
</li>
<li><p>output.<strong>tools</strong><code>object</code></p>
<p>mcp工具返回信息</p>
<ul>
<li><p>McpCall</p>
<ul>
<li><p><strong>arguments</strong> <code>string</code></p>
<p>传递给工具的参数的 JSON 字符串。</p>
</li>
<li><p><strong>id</strong> <code>string</code></p>
<p>本次输出的唯一标识。</p>
</li>
<li><p><strong>name</strong> <code>string</code></p>
<p>运行工具的名称。</p>
</li>
<li><p><strong>server_label</strong> <code>string</code></p>
<p>MCP Server标签。</p>
</li>
<li><p><strong>type</strong> <code>string</code></p>
<p>始终为 mcp_call。</p>
</li>
<li><p><strong>error</strong> <code>string</code></p>
<p>工具调用中出现的错误（如有）。</p>
</li>
<li><p><strong>output</strong> <code>string</code></p>
<p>工具调用的输出结果。</p>
</li>
</ul>
</li>
<li><p>McpListTools</p>
<ul>
<li><p><strong>id</strong> <strong>string</strong></p>
<p>MCP 列表的唯一标识。</p>
</li>
<li><p><strong>server_label</strong> <code>string</code></p>
<p>MCP Server标签。</p>
</li>
<li><p><strong>tools</strong>  <code>array</code></p>
<p>服务端可用工具。</p>
<ul>
<li><p>tools.<strong>input_schema</strong> <code>object</code></p>
<p>描述工具输入的 JSON 模式。</p>
</li>
<li><p>tools<strong>.name</strong> <code>string</code></p>
<p>运行工具的名称。</p>
</li>
<li><p>tools<strong>.annotations</strong> <code>object</code></p>
<p>关于该工具的其他说明。</p>
</li>
<li><p>tools<strong>.description</strong> <code>string</code></p>
<p>工具描述。</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><p><strong>联网搜索工具</strong></p>
<p>output.<strong>tools</strong> <code>object</code></p>
<p>mcp工具返回信息</p>
<ul>
<li><p><strong>id</strong> <strong>string</strong></p>
<p>本次输出的唯一标识。</p>
</li>
<li><p><strong>type</strong> string</p>
<p>始终为 web_search_call。</p>
</li>
<li><p><strong>action</strong> object</p>
<p>此次搜索调用中执行的具体操作的对象。</p>
<ul>
<li><p>action.<strong>type</strong> <code>string</code></p>
<p>一般为 <strong>search</strong></p>
</li>
<li><p>action.<strong>query</strong> <code>string</code></p>
<p>搜索内容。</p>
</li>
<li><p>action.<strong>source</strong> <code>string[ ]</code></p>
<p>联网搜索的附加内容源。可能为头条图文、抖音百科、墨迹天气。</p>
<ul>
<li><p><code>toutiao</code> ：联网搜索的附加头条图文内容源。</p>
</li>
<li><p><code>douyin</code> ：联网搜索的附加抖音百科内容源。</p>
</li>
<li><p><code>moji</code> ：联网搜索的附加墨迹天气内容源。</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><p><strong>图像处理工具</strong></p>
<p>output.<strong>tools</strong> <code>object</code></p>
<p>mcp工具返回信息</p>
<ul>
<li><p><strong>type</strong> <code>string</code></p>
<p>始终为 <code>image_process</code>。</p>
</li>
<li><p><strong>point</strong> <code>object</code></p>
<p>画点/连线功能开关，是否启用点绘制与连线功能。</p>
<ul>
<li><p><code>&quot;type&quot;:&quot;enabled&quot;</code>：已开启此功能。</p>
</li>
<li><p><code>&quot;type&quot;:&quot;disabled&quot;</code>：未开启此功能。</p>
</li>
</ul>
<p><strong>grounding</strong> <code>object</code></p>
<p>框选/裁剪功能开关，控制是否启用关键区域框选或裁剪。</p>
<ul>
<li><p><code>&quot;type&quot;:&quot;enabled&quot;</code>：已开启此功能。</p>
</li>
<li><p><code>&quot;type&quot;:&quot;disabled&quot;</code>：未开启此功能。</p>
</li>
</ul>
<p><strong>zoom</strong> <code>object</code></p>
<p>缩放功能开关，控制是否启用全图/指定区域缩放（支持0.5-2.0倍）。</p>
<ul>
<li><p><code>&quot;type&quot;:&quot;enabled&quot;</code>：已开启此功能。</p>
</li>
<li><p><code>&quot;type&quot;:&quot;disabled&quot;</code>：未开启此功能。</p>
</li>
</ul>
<p><strong>rotate</strong> <code>object</code></p>
<p>旋转功能开关，控制是否启用顺时针旋转（支持0-359度）。</p>
<ul>
<li><code>&quot;type&quot;:&quot;enabled&quot;</code>：已开启此功能。</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><p><code>&quot;type&quot;:&quot;disabled&quot;</code>：未开启此功能。</p>
</li>
</ul>
<hr>
<p><strong>previous_response_id</strong> <code>string / null</code></p>
<p>本次请求时传入的历史响应ID。</p>
<hr>
<p><strong>thinking</strong> <code>object / null</code></p>
<p>是否开启深度思考模式。</p>
<ul>
<li><p>thinking.<strong>type</strong> <code>string</code>  </p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>，<code>auto</code>。</p>
<ul>
<li><p><code>enabled</code>：开启思考模式，模型一定先思考后回答。</p>
</li>
<li><p><code>disabled</code>：关闭思考模式，模型直接回答问题，不会进行思考。</p>
</li>
<li><p><code>auto</code>：自动思考模式，模型根据问题自主判断是否需要思考，简单题目直接回答。</p>
</li>
</ul>
</li>
</ul>
<hr>
<p><strong>service_tier</strong><code>string</code></p>
<p>本次请求是否使用了TPM保障包。</p>
<ul>
<li><code>default</code>：本次请求未使用TPM保障包额度。</li>
</ul>
<hr>
<p><strong>status</strong> <code>string</code></p>
<p>生成响应的状态。</p>
<ul>
<li><code>completed</code>：响应已完成。</li>
<li><code>failed</code>：响应失败。</li>
<li><code>in_progress</code>：响应中。</li>
<li><code>incomplete</code>：响应未完成。</li>
</ul>
<hr>
<p><strong>text</strong> <code>object</code></p>
<p>用于定义输出的格式，可以是纯文本，也可以是结构化的 JSON 数据。</p>
<ul>
<li><p>text.<strong>format</strong> <code>object</code></p>
<p>指定模型必须输出的格式的对象。</p>
<ul>
<li><p><strong>自然语言输出</strong> <code>object</code></p>
<p>模型回复以自然语言输出。</p>
<ul>
<li><p>text.format.<strong>type</strong> <code>string</code></p>
<p>回复格式的类型，固定为<code>text</code>。</p>
</li>
</ul>
</li>
<li><p>JSON Object <code>object</code></p>
<p>响应格式为 JSON 对象。</p>
<ul>
<li><p>text.format.<strong>type</strong> <code>string</code></p>
<p>回复格式的类型，固定为 <code>json_object</code>。</p>
</li>
</ul>
</li>
<li><p>JSON Schema <code>object</code></p>
<p>响应格式为 JSON 对象，遵循schema字段定义的 JSON结构。</p>
<ul>
<li><p>text.format.<strong>type</strong> <code>string</code></p>
<p>回复格式的类型，固定为<code>json_schema</code>。</p>
</li>
<li><p>text.format.<strong>name</strong> <code>string</code></p>
<p>用户自定义的JSON结构的名称。</p>
</li>
<li><p>text.format.<strong>schema</strong> <code>object</code></p>
<p>回复格式的JSON格式定义，以JSON Schema对象的形式描述。</p>
</li>
<li><p>text.format.<strong>description</strong> <code>string / null</code></p>
<p>回复用途描述，模型将根据此描述决定如何以该格式回复。</p>
</li>
<li><p>text.format.<strong>strict</strong> <code>boolean / null</code></p>
<p>是否在生成输出时，启用严格遵循模式。</p>
<ul>
<li><p>true：模型将始终遵循schema字段中定义的格式。</p>
</li>
<li><p>false：模型将尽可能遵循schema字段中定义的结构。</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<p><strong>tools</strong> <code>array</code></p>
<p>模型可以调用的工具列表。</p>
<ul>
<li><p>tools.<strong>function</strong> <code>object</code> </p>
<p>模型可以调用的类型为<code>function</code>的工具列表。</p>
<ul>
<li><p>tools.function.<strong>name</strong> <code>string</code></p>
<p>调用的函数的名称。</p>
</li>
<li><p>tools.function.<strong>parameters</strong> <code>object</code> </p>
<p>函数请求参数，以 JSON Schema 格式描述。格式如下：</p>
<pre><code class="lang-json">{
  &quot;type&quot;: &quot;object&quot;,
  &quot;properties&quot;: {
    &quot;参数名&quot;: {
      &quot;type&quot;: &quot;string | number | boolean | object | array&quot;,
      &quot;description&quot;: &quot;参数说明&quot;
    }
  },
  &quot;required&quot;: [&quot;必填参数&quot;]
}
</code></pre>
<p>其中，</p>
<ul>
<li><p>所有字段名大小写敏感。</p>
</li>
<li><p><strong>parameters</strong> 须是合规的 JSON Schema 对象。</p>
</li>
<li><p>建议用英文字段名，中文置于 <strong>description</strong> 字段中。</p>
</li>
</ul>
</li>
<li><p>tools.function.<strong>type</strong> <code>string</code> </p>
<p>工具调用的类型，固定为<code>function</code>。</p>
</li>
<li><p>tools.function.<strong>description</strong> <code>string</code></p>
<p>调用的函数的描述，大模型会使用它来判断是否调用这个函数。</p>
</li>
</ul>
</li>
</ul>
<hr>
<p><strong>top_p</strong> <code>float / null</code></p>
<p>核采样概率阈值。</p>
<hr>
<p><strong>usage</strong> <code>object</code></p>
<p>本次请求的 token 用量，包括输入 token 数量、输入 token 的详细分解、输出 token 数量、输出 token 的详细分解，以及总共使用的 token 数。</p>
<p>如果使用了工具，还会输出使用的工具类型和次数，以及工具的使用详情。</p>
<ul>
<li><p>usage.<strong>input_tokens</strong> <code>integer</code></p>
<p>输入的 token 量。</p>
</li>
<li><p>usage.<strong>input_tokens_details</strong> <code>object</code></p>
<p>输入 token 的详细信息。</p>
<ul>
<li><p>usage.input_tokens_details.<strong>cached_tokens</strong> <code>integer</code></p>
<p>缓存命中的输入内容（含文本、音频等所有类型）所消耗的 token 总数。</p>
</li>
<li><p>usage.input_tokens_details. <strong>audio_tokens</strong> <code>integer</code></p>
<p>音频输入内容所消耗的 token 数量。</p>
</li>
<li><p>usage.input_tokens_details. <strong>audio_cached_tokens</strong> <code>integer</code></p>
<p>缓存命中的音频输入内容所消耗的 token 数量。</p>
</li>
</ul>
</li>
<li><p>usage.<strong>output_tokens</strong> <code>integer</code></p>
<p>输出的 token 量。</p>
</li>
<li><p>usage.<strong>output_tokens_details</strong> <code>object</code></p>
<p>输出 token 的详细信息。</p>
<ul>
<li>usage.output_tokens_details. <strong>reasoning_tokens</strong> <code>integer</code></li>
</ul>
<p>思考用 token 的数量。</p>
</li>
<li><p>usage. <strong>total_tokens</strong><code>integer</code></p>
<p>消耗 token 的总量。</p>
</li>
<li><p>usage. <strong>tool_usage</strong><code>object</code></p>
<ul>
<li><p>usage.tool_usage. <strong>image_process</strong> <code>integer</code></p>
<p>调用图像处理工具的数量。</p>
</li>
<li><p>usage.tool_usage. <strong>mcp</strong> <code>integer</code></p>
<p>调用mcp工具的数量。</p>
</li>
<li><p>usage.tool_usage. <strong>web_search</strong> <code>integer</code></p>
<p>调用网络搜索工具的数量。</p>
</li>
</ul>
</li>
</ul>
<ul>
<li><p>usage. <strong>tool_usage_details</strong> <code>object</code></p>
<p>使用工具的详细信息。</p>
<ul>
<li><p>usage.tool_usage_details. <strong>image_process</strong> <code>object</code></p>
<p>调用图像处理工具的详细信息。例如：</p>
<pre><code class="lang-json">&quot;tool_usage_details&quot;:{
    &quot;image_process&quot;:{
        &quot;zoom&quot;: 1,
        &quot;point&quot;: 1,
        &quot;grounding&quot;: 1
    }
}
</code></pre>
</li>
<li><p>usage.tool_usage_details. <strong>mcp</strong> <code>object</code></p>
<p>调用mcp工具的详细信息。例如：</p>
<pre><code class="lang-json">&quot;tool_usage_details&quot;:{
    &quot;mcp&quot;:{
        &quot;mcp_server_tos&quot;: 1,
        &quot;mcp_server_tls&quot;: 1
    }
}
</code></pre>
</li>
<li><p>usage.tool_usage_details. <strong>web_search</strong> <code>object</code></p>
<p>调用网络搜索工具的详细信息。例如：</p>
<pre><code class="lang-json">&quot;tool_usage_details&quot;:{
    &quot;web_search&quot;:{
        &quot;toutiao&quot;: 1,
        &quot;moji&quot;: 1,
        &quot;search_engine&quot;: 1
    }
}
</code></pre>
</li>
</ul>
</li>
</ul>
<hr>
<p><strong>store</strong> <code>boolean</code> 默认值 <code>true</code></p>
<p>是否存储生成的模型响应，以便后续通过 API 检索。</p>
<ul>
<li><code>false</code>：不存储，对话内容不能被后续的 API 检索到。</li>
<li><code>true</code>：存储当前模型响应，对话内容能被后续的 API 检索到。</li>
</ul>
<hr>
<p><strong>caching</strong> <code>object</code></p>
<p>是否开启缓存。</p>
<p><strong>caching</strong>.type <code>string</code> </p>
<p>取值范围：<code>enabled</code>， <code>disabled</code>。</p>
<ul>
<li><p><code>enabled</code>：开启缓存。</p>
</li>
<li><p><code>disabled</code>：关闭缓存。</p>
</li>
</ul>
<hr>
<p><strong>expire_at</strong> <code>integer/null</code></p>
<p>存储的有效期。</p>
<hr>
<p><strong>temperature</strong> <code>float/null</code></p>
<p>采样温度。</p>
<hr>
<p><strong>context_management</strong>  <code>object</code> </p>
<p>上下文管理响应，请求过程中应用的上下文管理策略信息。</p>
<ul>
<li><p>context_management<strong>.</strong> <strong>applied_edits</strong> <code>array</code></p>
<p>已应用的上下文编辑策略列表。</p>
<ul>
<li><p><strong>思考块清除</strong> <code>object</code></p>
<ul>
<li><p>context_management.applied_edits.<strong>type</strong> <code>string</code></p>
<p>上下文编辑策略类型，此处应为<code>clear_thinking</code>。</p>
</li>
<li><p>context_management.applied_edits.<strong>cleared_thinking_turns</strong> <code>integer</code></p>
<p>已清除的思考轮次次数。</p>
</li>
</ul>
</li>
<li><p><strong>工具调用内容清除</strong> <code>object</code></p>
<ul>
<li><p>context_management.applied_edits.<strong>type</strong> <code>string</code></p>
<p>上下文编辑策略类型，此处应为clear_tool_uses。</p>
</li>
<li><p>context_management.applied_edits.<strong>cleared_tool_uses</strong><code>integer</code></p>
<p>已清除的工具调用次数。</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="The%20response%20object%20%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="The%20response%20object%20%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">The response object 调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>输入示例：</p>
<pre><code class="lang-Curl">curl --location &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/responses?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
--header &quot;Authorization: Bearer $ARK_API_KEY&quot; \
--header &#39;Content-Type: application/json&#39; \
--header &quot;X-Timestamp: $TIMESTAMP&quot; \
--data &#39;{
    &quot;model&quot;: &quot;T0103002&quot;,
    &quot;input&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: [
                {
                    &quot;type&quot;: &quot;input_text&quot;,
                    &quot;text&quot;: &quot;你看见了什么？&quot;
                },
                {
                    &quot;type&quot;: &quot;input_image&quot;,
                    &quot;image_url&quot;: &quot;https://modelpool-api.talkingdata.com/model/openai/doc_image/i2v_foxrgirl.png&quot;
                }
            ]
        }
    ],
    &quot;thinking&quot;:{&quot;type&quot;: &quot;enabled&quot;}
}&#39;
</code></pre>
<p>输出示例：</p>
<pre><code class="lang-Curl">{
    &quot;created_at&quot;: 1754571504,
    &quot;id&quot;: &quot;resp_0217******&quot;,
    &quot;max_output_tokens&quot;: 32768,
    &quot;model&quot;: &quot;T0103002&quot;,
    &quot;object&quot;: &quot;response&quot;,
    &quot;output&quot;: [
        {
            &quot;id&quot;: &quot;rs_0217******&quot;,
            &quot;type&quot;: &quot;reasoning&quot;,
            &quot;summary&quot;: [
                {
                    &quot;type&quot;: &quot;summary_text&quot;,
                    &quot;text&quot;: &quot;用户现在需要描述这张图片的内容。首先看图片里的元素：一个红发女孩，有雀斑，穿着白色衣服，和一只红狐亲密接触。狐狸的毛色是红棕、白色，耳朵黑尖，眼睛琥珀色。背景是模糊的草地，色调温暖柔和，氛围宁静亲密。\n\n先整理细节：女孩的红发、雀斑、闭眼的温柔表情，穿着浅色（米白或白色）的衣服，可能是宽松的袖子。狐狸的特征：红棕色皮毛，白色的脸颊和颈部，黑色的耳朵尖端，黄色带黑瞳的眼睛，黑色的鼻子和爪子（能看到爪子搭在女孩衣服上）。两者的互动很亲密，女孩的脸靠近狐狸，狐狸的头也挨着她，姿态温馨，背景是自然的野外，草色偏黄褐，模糊处理，突出主体。\n\n然后组织语言，描述画面的主体、互动、细节和氛围。确保清晰传达视觉元素：人物（红发、雀斑、白衣）、动物（红狐的外观）、互动（亲密依偎）、背景（自然草地，朦胧）、整体氛围（温暖、和谐、宁静）。\n\n现在开始描述：\n\n这张图片展现了一位红发女孩与一只红狐亲密依偎的温馨场景。女孩有着浓密的红棕色长发，脸上点缀着雀斑，身着一件轻柔的白色（或米白色）衣衫，双眼轻闭，神情温柔恬静，似乎正享受与狐狸相伴的时刻。她的脸颊亲昵地挨着狐狸的头部，姿态充满信赖与温情。\n\n身旁的红狐毛色鲜亮，主体为红棕色，脸部、颈部及胸前覆盖着蓬松的白色绒毛，耳朵尖端呈黑色，耳内侧则是浅棕与黑色相间的纹理。狐狸的眼睛呈琥珀色，明亮而有神，黑色的鼻尖与搭在女孩衣袖上的黑色爪子（可见部分），更添其灵动与真实感。它的头部微微转向一侧，却与女孩的脸紧密相靠，仿佛在回应这份亲密。\n\n背景是一片朦胧的自然草地，枯黄与绿意交织的草植在柔和的光线下显得静谧悠远，模糊的处理让焦点完全落在女孩与狐狸的互动上，整体氛围温暖和谐，传递出人与动物间信任、亲昵的美好瞬间，画面色调柔和，充满诗意与治愈感。\n\n检查是否涵盖了主要元素：人物特征（红发、雀斑、白衣、闭眼）、狐狸特征（毛色、耳朵、眼睛、爪子）、互动（亲密依偎）、背景（草地朦胧）、氛围（温馨和谐）。这样应该能清晰描述出图片内容。&quot;
                }
            ],
            &quot;status&quot;: &quot;completed&quot;
        },
        {
            &quot;type&quot;: &quot;message&quot;,
            &quot;role&quot;: &quot;assistant&quot;,
            &quot;content&quot;: [
                {
                    &quot;type&quot;: &quot;output_text&quot;,
                    &quot;text&quot;: &quot;这张图片呈现了**一位红发女孩与一只红狐亲密依偎**的温馨场景，氛围柔和治愈：  \n\n### 人物与动物细节：  \n- **女孩**：有着浓密蓬松的**红棕色长发**（色泽与狐狸皮毛呼应），脸上点缀着浅褐色雀斑，身着**轻柔的白色（或米白色）衣衫**（衣料褶皱自然，显柔和质感）。她双眼轻闭，神情恬静温柔，脸颊亲昵地贴靠狐狸头部，姿态满是信赖与温情。  \n- **红狐**：毛色鲜亮且层次丰富——主体为暖调红棕色，脸部、颈部及胸前覆盖**蓬松的白色绒毛**，耳朵尖端呈**黑色**，耳内侧是浅棕与黑色相间的细腻纹理；眼睛是**琥珀色（或金黄带黑瞳）**，明亮有神，黑色鼻尖与搭在女孩衣袖上的**黑色爪子**（可见部分），让它更显灵动真实。狐狸头部微微侧转，却与女孩脸紧密相靠，似在回应这份亲昵。  \n\n\n### 场景与氛围：  \n背景是**朦胧的自然草地**（枯黄与绿意交织的草植，因虚化处理更显悠远静谧），柔和的光线（偏暖调）笼罩画面，焦点完全落在人与狐的亲密互动上。整体氛围**温暖、和谐、治愈**，传递出人与动物间信任亲昵的美好瞬间，仿佛时间在此刻静止。  \n\n\n画面通过色彩呼应（女孩红发与狐狸皮毛）、姿态互动（依偎贴靠），构建出诗意且宁静的“共生感”，细节（雀斑、狐的爪/耳纹理）让场景更具真实与感染力。&quot;
                }
            ],
            &quot;status&quot;: &quot;completed&quot;,
            &quot;id&quot;: &quot;msg_0217******&quot;
        }
    ],
    &quot;thinking&quot;: {
        &quot;type&quot;: &quot;enabled&quot;
    },
    &quot;service_tier&quot;: &quot;default&quot;,
    &quot;status&quot;: &quot;completed&quot;,
    &quot;usage&quot;: {
        &quot;input_tokens&quot;: 1377,
        &quot;output_tokens&quot;: 910,
        &quot;total_tokens&quot;: 2287,
        &quot;input_tokens_details&quot;: {
            &quot;cached_tokens&quot;: 0
        },
        &quot;output_tokens_details&quot;: {
            &quot;reasoning_tokens&quot;: 552
        }
    },
    &quot;caching&quot;: {
        &quot;type&quot;: &quot;disabled&quot;
    },
    &quot;store&quot;: true,
    &quot;expire_at&quot;: 1754830704
}
</code></pre>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<p><span id="Hrya4y9k"></span></p>
<table>
<thead>
<tr>
<th>HTTP 状态码</th>
<th>错误类型 Type</th>
<th>错误码 Code</th>
<th>错误信息 Message</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>MissingParameter</td>
<td>The request failed because it is missing one or multiple required parameters. Request ID: {id}</td>
<td>请求缺少必要参数，请查阅 API 文档。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidParameter</td>
<td>One or more parameters specified in the request are not valid. Request ID: {id}</td>
<td>请求包含非法参数，请查阅 API 文档。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidParameter</td>
<td>The parameter instructions specified in the request are not valid: caching is not supported for instructions. Request id: {id}</td>
<td>Responses API 中，当配置过 instructions 字段信息，后续轮次无法配置 Caching 字段。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputTextRiskDetection</td>
<td>The request could not be processed because the input text includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输入文本可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputImageRiskDetection</td>
<td>The request could not be processed because the input image includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输入图片可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputTextRiskDetection</td>
<td>The request could not be processed because the output text includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输出文本可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputImageRiskDetection</td>
<td>The request could not be processed because the output image includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输出图片可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>ContentSecurityDetectionError</td>
<td>Internal error.ARKRequest ID:{id};CSDRequestId:{RequestId};CSDcode:{};CSDmessage:{}</td>
<td>风险识别产品请求失败。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>SensitiveContentDetected</td>
<td>The request failed because the input text may contain sensitive information.</td>
<td>输入文本可能包含敏感信息，请您使用其他 prompt。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>SensitiveContentDetected.SevereViolation</td>
<td>The request failed because the input text may contain severe violation information.</td>
<td>输入文本可能包含严重违规相关信息，请您使用其他 prompt。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>SensitiveContentDetected.Violence</td>
<td>The request failed because the input text may contain violence information.</td>
<td>输入文本可能包含激进行为相关信息，请您使用其他 prompt。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputTextSensitiveContentDetected</td>
<td>The request failed because the input text may contain sensitive information.Request ID: {id}</td>
<td>输入文本可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputImageSensitiveContentDetected</td>
<td>The request failed because the input image may contain sensitive information.Request ID: {id}</td>
<td>输入图像可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputVideoSensitiveContentDetected</td>
<td>The request failed because the input video may contain sensitive information.</td>
<td>输入视频可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputTextSensitiveContentDetected</td>
<td>The request failed because the output may contain sensitive information.</td>
<td>生成的文字可能包含敏感信息，请您更换输入内容后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputImageSensitiveContentDetected</td>
<td>The request failed because the output image may contain sensitive information.</td>
<td>生成的图像可能包含敏感信息，请您更换输入内容后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputVideoSensitiveContentDetected</td>
<td>The request failed because the output video may contain sensitive information.Request ID: {id}</td>
<td>生成的视频可能包含敏感信息，请您更换输入内容后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidParameter.{{Parameter}}</td>
<td>The specified parameter {{Parameter}} is invalid.</td>
<td>请求参数值不合法。请检查参数值的正确性后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>MissingParameter.{{Parameter}}</td>
<td>The required parameter {{Parameter}} is missing.</td>
<td>缺少必要的请求参数。请确认请求参数后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>Duplicate.Tags.Key</td>
<td>The specified object of tags contains duplicate keys.</td>
<td>对象的标签存在重复Key。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError</td>
<td>MissingRole：Invalid message: {{Message}}</td>
<td>请求中的 messages 列表里，有消息体缺少 role 字段。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.UnknownRole</td>
<td>Unknow the role of message: {{Role}}</td>
<td>消息体中的 role 值不被支持，如user_。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.UnknownRole</td>
<td>The Inference role not found: {{Role}}</td>
<td>指定的 inference_role 未在配置中定义。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.InvalidImageDetail</td>
<td>Invalid image detail: {{Parameter}}</td>
<td>image_url 中的 detail 参数值无效，只接受 &quot;auto&quot;, &quot;high&quot;, &quot;low&quot;。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.InvalidPixelLimit</td>
<td>Customized min_pixels 100 is greater than max_pixels 50</td>
<td>用户自定义的图片像素限制（min_pixels, max_pixels）无效（例如 min_pixels &gt; max_pixels，或超出了服务配置的范围）。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidImageURL.EmptyURL</td>
<td>Empty base64 image url</td>
<td>传入的图片 URL 为空。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidImageURL.InvalidFormat</td>
<td>Invalid base64 image url</td>
<td>无法解析或处理图片，可能是 Base64 格式不正确、图片数据损坏或格式不支持。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutofContextError</td>
<td>Total tokens of image and text exceed max message tokens.</td>
<td>当请求中包含图片时，文本和图片编码后的总 token 数超过了模型上下文长度限制。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>InvalidSubscription</td>
<td>Your account ({{account_identifier}}) does not have a valid coding plan subscription, or your subscription has expired. Please visit {{subscription_check_url}} to review your subscription status or complete the subscription or renewal process.</td>
<td>Coding Plan 套餐未订阅或已过期。</td>
</tr>
<tr>
<td>401</td>
<td>Unauthorized</td>
<td>AuthenticationError</td>
<td>The API key or AK/SK in the request is missing or invalid. Request ID: {id}</td>
<td>请求携带的 API Key 或 AK/SK 校验未通过，请您重新检查设置的鉴权凭证，或者查看 API 调用文档来排查问题。</td>
</tr>
<tr>
<td>401</td>
<td>Unauthorized</td>
<td>AuthenticationError</td>
<td>Unauthorized</td>
<td>请求中使用的 API Key 无效，或指定的 Model ID 不正确或不可访问。</td>
</tr>
<tr>
<td>401</td>
<td>Forbidden</td>
<td>InvalidAccountStatus</td>
<td>There is an issue with your account status. If you need assistance, please contact the platform administrators.</td>
<td>当前使用的账号异常。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.InvalidState</td>
<td>The specified context is in invalid state: InProgress.Request ID: {id}</td>
<td>请求所关联的Context ID处于非空闲状态，不可调用。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.ConflictedValidationSet</td>
<td>Operation is denied because it is not supported to configure ValidationSet and ValidationPercentage at the same time.</td>
<td>无法同时上传验证集和设置训练集取样为验证集百分比，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.PermissionDenied</td>
<td>Operation is denied because you are not permitted to access the specified configuration of the FoundationModel.</td>
<td>您没有权限访问基础模型的配置，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.UnsupportedCustomizationType</td>
<td>Operation is denied because the specified CustomizationType is not supported by the CustomModel.</td>
<td>模型不支持该训练方法，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.CustomizationNotSupported</td>
<td>Operation is denied because the specified version of the FoundationModel is not configured for the specified type of customization.</td>
<td>基础模型的版本不支持该训练方法，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.ServiceNotOpen</td>
<td>Operation is denied because the model service is unavailable, please go to the Volcano Ark console activation management page to activate the corresponding model service, or submit a work order to contact us.</td>
<td>模型服务不可用，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>AccessDenied</td>
<td>The request failed because you do not have access to the requested resource. Request ID: {id}</td>
<td>没有访问该资源的权限，请检查权限设置。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.InvalidState</td>
<td>Operation is denied because the specified context is in invalid state: InProgress. Request id: {id}</td>
<td>请求的缓存信息状态是不可用状态。请查看缓存信息是否正在被更新中。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.UnsupportedPhase</td>
<td>Operation is denied because operation is not supported while the target is in its current phase.</td>
<td>操作失败，操作目标在特殊状态，请检查目标是否存在或者被锁定等特殊状态中。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.FileQuotaExceeded</td>
<td>Your account %s has exhausted its file storage quota. To continue using the service, please delete historical files.</td>
<td>当前账号 %s 已耗尽文件存储额度，如需继续使用，请删除历史文件。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.InvalidState</td>
<td>The specified file is in invalid state: InProgress.Request ID: {id}</td>
<td>请求所关联的File ID处于非可用状态，不可调用。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>InvalidEndpointOrModel.NotFound</td>
<td>The model or endpoint %s does not exist or you do not have access to it.</td>
<td>模型或者推理接入点 %s 不存在或者您无权访问它。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>ModelNotOpen</td>
<td>Your account %s has not activated the model %s. Please activate the model service in the Ark Console.</td>
<td>当前账号 %s 暂未开通 %s 模型服务。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>NotFound.{{Parameter}}</td>
<td>The specified {{ResourceType}} {{ResourceContent}} is not found.</td>
<td>指定资源找不到。请确认参数后重试。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>InvalidEndpointOrModel.ModelIDAccessDisabled</td>
<td>Accessing the model via Model ID is not allowed for your account. Please use a custom endpoint ID instead. Request id:{id}</td>
<td>未能找到指定的模型ID。你的账号不允许使用模型ID来调用模型，请确认你账号权限或者使用有权限的推理接入点 ID 来调用模型服务。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>UnsupportedModel</td>
<td>The {{model_name}} model does not support the coding plan feature. Please refer to the documentation at {{doc_url}} to select a compatible model.</td>
<td>当前模型不支持 Coding Plan。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>RateLimitExceeded.EndpointRPMExceeded</td>
<td>The Requests Per Minute (RPM) limit of the associated endpoint for your account has been exceeded. Request ID: {id}</td>
<td>请求所关联的推理接入点已超过 RPM (Requests Per Minute) 限制，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>RateLimitExceeded.EndpointTPMExceeded</td>
<td>The Tokens Per Minute (TPM) limit of the associated endpoint for your account has been exceeded. Request ID: {id}</td>
<td>请求所关联的推理接入点已超过 TPM (Tokens Per Minute) 限制，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ModelAccountRpmRateLimitExceeded</td>
<td>RPM (Requests Per Minute) limit of the model is exceeded. Request ID: {id}</td>
<td>请求已超过帐户模型 RPM (Requests Per Minute) 限制：请您稍后重试，或者联系平台技术同学进行解决。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ModelAccountTpmRateLimitExceeded</td>
<td>TPM (Tokens Per Minute) limit of the model is exceeded. Request ID: {id}</td>
<td>请求已超过帐户模型 TPM (Tokens Per Minute) 限制：请您稍后重试，或者联系平台技术同学进行解决。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>APIAccountRpmRateLimitExceeded</td>
<td>The RPM (Requests Per Minute) limit for the API on your account has been exceeded. Request ID: {id}</td>
<td>当前账号该接口的RPM (Requests Per Minute)限制已超出，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ModelAccountIpmRateLimitExceeded</td>
<td>IPM (Images Per Minute) limit of the model is exceeded.</td>
<td>请求已超过账户模型 IPM (Images Per Minute) 限制：请您稍后重试，或者联系平台技术同学进行解决。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>QuotaExceeded</td>
<td>Your account [%s] has exhausted its free trial quota for the [%s] model. Request ID: {id}</td>
<td>当前账号 %s 对 %s 模型的免费试用额度已消耗完毕。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>QuotaExceeded</td>
<td>The request has exceeded the quota. Request ID: {id}</td>
<td>当前账号处于排队中状态的任务数已超过限制，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ServerOverloaded</td>
<td>The service is currently unable to handle additional requests due to server overload. Please retry later. Request ID: {id}</td>
<td>服务资源紧张，请您稍后重试。常出现在调用流量突增或刚开始调用长时间未使用的推理接入点。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>SetLimitExceeded</td>
<td>Your account [%s] has reached the set inference limit for the [%s] model, and the model service has been paused. To continue using this model, please visit the Model Activation page to adjust or close the &quot;Safe Experience Mode&quot;. Request ID: {id}</td>
<td>当前账号 %s 对 %s 模型已达到设置的推理限额值。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>InflightBatchsizeExceeded</td>
<td>The Inflight Batchsize limit has been exceeded.Request ID: {id}</td>
<td>您已经达到当前充值金额下的最大并发数限制，您可以充值解锁更大并发额度或降低并发数。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>AccountRateLimitExceeded</td>
<td>Requests are too frequent. Please reduce your request frequency, wait a short moment, and retry your request.</td>
<td>请求超出RPM / TPM限制。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>QuotaExceeded</td>
<td>You have exceeded the 5-hour/weekly/monthly usage quota. It will reset at {{reset_time}}.</td>
<td>使用的额度超出5小时/周/月限额。</td>
</tr>
<tr>
<td>500</td>
<td>InternalServerError</td>
<td>InternalServiceError</td>
<td>The service encountered an unexpected internal error. Please retry later. Request ID: {id}</td>
<td>内部系统异常，请您稍后重试。</td>
</tr>
</tbody>
</table>
<p><span id="7P96iLnc"></span></p>
<hr>
<p><span id="Hrya4y9k"></span></p>
<h2 id="%E5%85%AC%E5%85%B1%E9%94%99%E8%AF%AF%E7%A0%81" name="%E5%85%AC%E5%85%B1%E9%94%99%E8%AF%AF%E7%A0%81">公共错误码</h2>
<table>
<thead>
<tr>
<th>Code</th>
<th>CodeN</th>
<th>Message</th>
<th>错误说明及解决方式</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>MissingParameter</td>
<td>100002</td>
<td>The request is missing %s parameter.</td>
<td>关键参数缺失，例如Action, Version参数缺失。请参考API文档补充Action或Version参数。</td>
<td>400</td>
</tr>
<tr>
<td>MissingRequestInfo</td>
<td>100004</td>
<td>The request is missing %s information.</td>
<td>缺少请求必要信息，例如：X-Date</td>
<td>400</td>
</tr>
<tr>
<td>InvalidTimestamp</td>
<td>100006</td>
<td>The Signature of the request is expired.</td>
<td>请求过期或请求的签名时间来自未来。请检查本地时间是否正常，以及是否使用了UTC时间，精确到秒，使用遵循ISO 8601标准的格式：<code>YYYYMMDD&#39;T&#39;HHMMSS&#39;Z&#39;</code>。</td>
<td>400</td>
</tr>
<tr>
<td>ServiceNotFound</td>
<td>100007</td>
<td>This service[%s] not found.</td>
<td>请求的服务不存在。请参考产品的API文档检+查Service是否完全填写正确。</td>
<td>404</td>
</tr>
<tr>
<td>InvalidActionOrVersion</td>
<td>100008</td>
<td>Could not find operation %s for version %s.</td>
<td>请求接口不存在。请参考产品的API文档检查Action是否完全填写正确。</td>
<td>404</td>
</tr>
<tr>
<td>InvalidAccessKey</td>
<td>100009</td>
<td>The accesskey [%s] included in the request is invalid.</td>
<td>请求的Access Key不合法。请检查Access key Id和Secret Access Key是否正确，注意不要有多余的空格符号。</td>
<td>401</td>
</tr>
<tr>
<td>SignatureDoesNotMatch</td>
<td>100010</td>
<td>The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. Consult the service documentation for details.</td>
<td>签名结果不正确。检查签名步骤，建议使用SDK，避免自行编码构造签名。</td>
<td>401</td>
</tr>
<tr>
<td>AccessDenied</td>
<td>100013</td>
<td>User is not authorized to perform: %s on resource: %s.</td>
<td>子用户拥有的权限不支持当前操作。</td>
<td>403</td>
</tr>
<tr>
<td>InternalError</td>
<td>100014</td>
<td>Service has some internal Error. Pls Contact With Admin.</td>
<td>内部错误。</td>
<td>500</td>
</tr>
<tr>
<td>InternalServiceTimeout</td>
<td>100016</td>
<td>Internal Service is timeout. Pls Contact With Admin.</td>
<td>服务执行超时。</td>
<td>504</td>
</tr>
<tr>
<td>FlowLimitExceeded</td>
<td>100018</td>
<td>Request was rejected because the request speed of this openAPI is beyond the current flow control limit.</td>
<td>请求过于频繁，超出了限速。请降低请求QPS，</td>
<td>429</td>
</tr>
<tr>
<td>ServiceUnavailableTemp</td>
<td>100019</td>
<td>Service is busy, please try again later.</td>
<td>处于熔断状态的服务暂时不可访问，稍后重试。</td>
<td>503</td>
</tr>
<tr>
<td>InternalServiceError</td>
<td>100023</td>
<td>Service has some internal Error. Pls Contact With Admin.</td>
<td>服务存在故障。</td>
<td>502</td>
</tr>
<tr>
<td>InvalidAuthorization</td>
<td>100024</td>
<td>Invalid &#39;Authorization&#39; header, Pls check authorization header.</td>
<td>Authorization头格式错误，构造的 Authorization Header 不正确，比如没有填 Region 字段、字符不在合法字符集中，请检查Authorization。建议使用SDK，避免自行编码构造签名。</td>
<td>400</td>
</tr>
<tr>
<td>InvalidCredential</td>
<td>100025</td>
<td>Invalid credential in &#39;Authorization&#39;, Pls check credential in authorization header.</td>
<td>Authorization头中的Credential格式错误，比如 AK 不在合法字符集中检查Credential。建议使用SDK，避免自行编码构造签名。</td>
<td>400</td>
</tr>
<tr>
<td>InvalidSecretToken</td>
<td>100026</td>
<td>Invalid secret token, msg: %s.</td>
<td>错误的STS（临时安全凭证），可能是多种错误，例如签名错误、过期等。请检查AssumeRole产生的临时凭证是否过期，以及签名是正确，建议使用SDK，避免自行编码构造签名。</td>
<td>401</td>
</tr>
</tbody>
</table>
]]></content:encoded>
      <pubDate>Wed, 05 Aug 2026 10:03:02 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1273</guid>
      <comments>http://doc.talkingdata.com/posts/1273#comments</comments>
    </item>
    <item>
      <title>TD云牍48/Kimi-K2.5</title>
      <link>http://doc.talkingdata.com/posts/1270</link>
      <category>文本生成 API</category>
      <author>liuxinmei</author>
      <description>云牍48 接口说明文档 TD模型编号： T0503005 模型能力简介 云牍48 文本对话：支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理，原生图文 / 视频理解，可解析截图、设计稿、视频并直接生成对应代码，支持多步工具调用与智能体集群并行任务处理。 协议支持：本接口同时兼容OpenAl chat completions与Anthropic Messages 两种主流协议，您可以根据使用的SDK或工具灵活选择。 鉴权说明  本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
 OpenAI 协议对话接口地址 请求方法： POST 接口URL：https://modelpool-api.talkingdata.com/model/openai/api/v3/cha</description>
      <content:encoded><![CDATA[<h4 id="%3Cstrong%3E%E4%BA%91%E7%89%8D48%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%89%8D48%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云牍48 接口说明文档</strong></h4>
<p><strong>TD模型编号：</strong> <strong>T0503005</strong></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><strong>云牍48</strong><ul>
<li><strong>文本对话</strong>：支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理，原生图文 / 视频理解，可解析截图、设计稿、视频并直接生成对应代码，支持多步工具调用与智能体集群并行任务处理。</li>
<li><strong>协议支持</strong>：本接口同时兼容<strong>OpenAl chat completions</strong>与<strong>Anthropic Messages</strong> 两种主流协议，您可以根据使用的SDK或工具灵活选择。</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">OpenAI 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">OpenAI 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503005</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><code>messages</code></td>
<td style="text-align:left">array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">对话消息数组</td>
</tr>
<tr>
<td style="text-align:left"><code>max_tokens</code></td>
<td style="text-align:left">integer</td>
<td style="text-align:left">否</td>
<td style="text-align:left">最大生成 Token 数</td>
</tr>
<tr>
<td style="text-align:left"><code>temperature</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度（0-2）</td>
</tr>
<tr>
<td style="text-align:left"><code>stream</code></td>
<td style="text-align:left">boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">启用 SSE 流式响应</td>
</tr>
<tr>
<td style="text-align:left"><code>top_p</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">核采样参数</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">OpenAI 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>object</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>chat.completion</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>created</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">请求创建时的 Unix 时间戳（秒）。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>choices</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型生成内容的数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>index</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">当前选项在数组中的索引。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>finish_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>stop</code>：自然停止；<code>length</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>message</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">模型返回的消息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>content</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>prompt_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>completion_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>total_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">总 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">OpenAI 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D48%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D48%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍48 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503005&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;你是什么模型，介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;id&quot;: &quot;chatcmpl-5eab4a01ad2c47d4a646b6ee0d4d2766&quot;,
  &quot;object&quot;: &quot;chat.completion&quot;,
  &quot;created&quot;: 1785305375,
  &quot;model&quot;: &quot;T0503005&quot;,
  &quot;choices&quot;: [
    {
      &quot;index&quot;: 0,
      &quot;message&quot;: {
        &quot;role&quot;: &quot;assistant&quot;,
        &quot;content&quot;: &quot;我是 **Kimi**，由 **月之暗面科技有限公司（Moonshot AI）** 开发的人工智能助手。\n\n简单介绍自己：\n\n**关于我的技术背景**\n我基于 **混合专家（MoE）架构** 构建，拥有高达 **1万亿参数总量**（每次前向传播激活320亿参数），并支持 **超长上下文窗口**（标准模式下可达25.6万token，测试中支持高达200万字符）。这意味着我可以高效处理长文档深度分析、视频内容理解以及复杂的多轮对话。\n\n**我能做什么**\n- **深度长文本处理**：支持超长文档阅读与分析，能够处理整本书籍、长篇报告或大量聊天记录，保持上下文连贯性\n- **多语言交流**：能用中文、英文等多种语言与你流畅对话，理解文化背景差异\n- **代码与逻辑**：协助编程、调试、解释技术概念，支持多种编程语言和技术栈\n- **内容创作**：帮助撰写、润色、翻译各类文本，或提供创意灵感\n- **知识问答**：基于训练数据回答各领域问题（知识截止至2025年1月），并具备多模态理解能力（图像、视频等）\n\n**我的特点**\n我注重**有用、无害、诚实**（Helpful, Harmless, Honest）的原则。我会尽量直接回答你的问题，不确定时会坦诚告知，涉及敏感话题时保持谨慎和尊重。\n\n有什么我可以帮你的吗？无论是深入的技术讨论、长文档分析，还是日常问题，都欢迎随时告诉我。&quot;,
        &quot;reasoning_content&quot;: &quot;用户问“你是什么模型，介绍下自己”。这是一个关于身份识别的常见问题。\n\n我需要：\n1. 说明我是由月之暗面科技有限公司开发的AI助手，名为Kimi\n2. 介绍我的主要能力和特点（如长文本处理、多语言支持、编程辅助等）\n3. 保持友好、专业且简洁的语气\n4. 避免虚构不属于我的信息（如OpenAI、Google等其他公司的产品）\n\n关键信息：\n- 我是Kimi，由月之暗面科技有限公司（Moonshot AI）开发\n- 基于混合专家（MoE）架构，具备超长上下文窗口（支持高达200万字符）\n- 擅长长文档分析、多轮对话、代码辅助、创意写作等\n- 注重有用、无害、诚实（HHH原则）\n\n结构建议：\n- 先直接回答身份\n- 简要介绍开发背景和技术架构（MoE、超长上下文）\n- 说明主要能力特点\n- 表达服务意愿\n\n避免：\n- 声称自己是ChatGPT/GPT-4/Claude/Bard等其他模型\n- 提供具体的版本号（如K2.5）除非用户追问，因为可能版本更新而我无法确定当前部署的具体版本\n- 过度技术细节，保持易懂\n\n中文回复，因为用户用中文提问。&quot;
      },
      &quot;finish_reason&quot;: &quot;stop&quot;
    }
  ],
  &quot;usage&quot;: {
    &quot;prompt_tokens&quot;: 14,
    &quot;completion_tokens&quot;: 577,
    &quot;total_tokens&quot;: 591,
    &quot;prompt_tokens_details&quot;: {
      &quot;text_tokens&quot;: 14
    },
    &quot;completion_tokens_details&quot;: {
      &quot;reasoning_tokens&quot;: 268,
      &quot;text_tokens&quot;: 309
    }
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%89%8D48%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%89%8D48%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云牍48 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503005&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;你是什么模型，介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>data: {&quot;id&quot;:&quot;chatcmpl-f6332d33dd2445cb9a1e98649432851d&quot;,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;created&quot;:1785305663,&quot;model&quot;:&quot;T0503005&quot;,&quot;choices&quot;:[{&quot;index&quot;:0,&quot;delta&quot;:{&quot;role&quot;:&quot;assistant&quot;,&quot;content&quot;:&quot;&quot;,&quot;reasoning_content&quot;:&quot;用户&quot;},&quot;finish_reason&quot;:null}]}

 ...

data: {&quot;id&quot;:&quot;chatcmpl-f6332d33dd2445cb9a1e98649432851d&quot;,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;created&quot;:1785305663,&quot;model&quot;:&quot;T0503005&quot;,&quot;choices&quot;:[{&quot;index&quot;:0,&quot;delta&quot;:{&quot;content&quot;:&quot;&quot;},&quot;finish_reason&quot;:&quot;stop&quot;}],&quot;usage&quot;:{&quot;prompt_tokens&quot;:14,&quot;completion_tokens&quot;:586,&quot;total_tokens&quot;:600,&quot;prompt_tokens_details&quot;:{&quot;text_tokens&quot;:14},&quot;completion_tokens_details&quot;:{&quot;reasoning_tokens&quot;:247,&quot;text_tokens&quot;:339}}}

data: [DONE]
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">Anthropic 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
<tr>
<td style="text-align:left"><code>anthropic-version</code></td>
<td style="text-align:left"><code>2023-06-01</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Anthropic API 版本</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">Anthropic 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>model</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0503005</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>messages</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">传递给大模型的对话上下文，按对话顺序排列。</td>
</tr>
<tr>
<td style="text-align:left"><strong>max_tokens</strong></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">是</td>
<td style="text-align:left">最大生成 Token 数。</td>
</tr>
<tr>
<td style="text-align:left"><strong>system</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">否</td>
<td style="text-align:left">系统提示词，用于设定大模型的角色、语气、任务目标或约束条件等（顶层字段，不在 messages 中）。</td>
</tr>
<tr>
<td style="text-align:left"><strong>stream</strong></td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">是否以流式输出方式回复。<code>false</code>（默认）：一次性返回；<code>true</code>：边生成边输出，以 SSE 事件流形式返回。</td>
</tr>
<tr>
<td style="text-align:left"><strong>temperature</strong></td>
<td style="text-align:left">Float</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度，控制模型生成文本的多样性。取值范围：<code>[0, 1]</code>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>tools</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">否</td>
<td style="text-align:left">工具定义（函数调用）数组。</td>
</tr>
<tr>
<td style="text-align:left"><strong>thinking</strong></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">否</td>
<td style="text-align:left">扩展思考配置。</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">Anthropic 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>message</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>content</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型返回的内容数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">内容类型，如 <code>text</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>text</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>stop_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>end_turn</code>：自然结束；<code>max_tokens</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>input_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>output_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">Anthropic 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D48%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D48%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍48 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503005&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;你是什么模型，介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;id&quot;: &quot;msg_c398fe6869d842c7b262c6facf4dc544&quot;,
  &quot;type&quot;: &quot;message&quot;,
  &quot;role&quot;: &quot;assistant&quot;,
  &quot;model&quot;: &quot;T0503005&quot;,
  &quot;content&quot;: [
    {
      &quot;type&quot;: &quot;thinking&quot;,
      &quot;thinking&quot;: &quot;用户询问“你是什么模型，介绍下自己”，这是一个关于身份自我介绍的问题。\n\n根据系统指令，我需要：\n1. 回答真实、准确：我是由月之暗面科技有限公司开发的Kimi助手\n2. 保持有帮助、无害、诚实的原则\n3. 使用与用户相同的语言（中文）进行回答\n\n我应该介绍：\n- 我的身份：Kimi，由月之暗面科技有限公司开发的人工智能助手\n- 我的特点：能够进行多轮对话、回答问题、协助写作、分析、编程、翻译等多种任务\n- 我的知识截止日期（2025年1月）\n- 强调我是AI，有局限性，建议用户核实重要信息\n\n语气应该友好、专业、谦逊。\n\n结构建议：\n1. 直接回答身份（Kimi，月之暗面科技有限公司）\n2. 主要能力和特点\n3. 使用建议/局限性说明\n\n让我组织一下中文回答：\n\n你好！我是 **Kimi**，是由 **月之暗面科技有限公司**（Moonshot AI）开发的人工智能助手。\n\n我的主要特点包括：\n- **多轮对话**：可以与你进行连续的上下文交流，理解复杂的问题和意图\n- **知识储备**：训练数据截止至2025年1月，涵盖广泛的知识领域\n- **多语言支持**：擅长中文、英文等多种语言的交流与翻译\n- **多样化任务**：可以协助写作、分析、编程、数学计算、创意生成等多种任务\n\n作为AI，我会尽力提供准确、有用的信息，但也请注意：\n- 我的知识有截止日期，可能不了解最新的事件\n- 对于重要决策（如医疗、法律、财务等），建议你咨询专业人士并核实信息\n\n有什么我可以帮助你的吗？&quot;,
      &quot;signature&quot;: &quot;c398fe6869d842c7b262c6facf4dc544&quot;
    },
    {
      &quot;type&quot;: &quot;text&quot;,
      &quot;text&quot;: &quot;你好！我是 **Kimi**，是由 **月之暗面科技有限公司**（Moonshot AI）开发的人工智能助手。\n\n我的主要特点包括：\n\n- **长上下文处理**：支持超长文本理解和多轮对话，能够处理复杂的文档分析、代码理解和深度推理任务\n- **知识储备**：训练数据截止至2025年1月，涵盖科学、技术、人文、艺术等广泛领域\n- **多语言支持**：擅长中文、英文等多种语言的交流、翻译与润色\n- **多样化能力**：可以协助写作、编程、数学计算、数据分析、创意生成、学习辅导等多种任务\n\n**需要说明的是**：\n作为AI，我会尽力提供准确、有用的信息，但也存在局限性：\n- 我的知识有截止日期，可能不了解最新发生的事件\n- 对于重要决策（如医疗、法律、财务等），建议你咨询专业人士并核实信息\n\n有什么我可以帮助你的吗？无论是解答问题、协助写作，还是一起探讨某个话题，我都很乐意协助！&quot;
    }
  ],
  &quot;stop_reason&quot;: &quot;end_turn&quot;,
  &quot;usage&quot;: {
    &quot;input_tokens&quot;: 14,
    &quot;output_tokens&quot;: 549,
    &quot;cache_read_input_tokens&quot;: 0,
    &quot;cache_creation_input_tokens&quot;: 0,
    &quot;cache_creation&quot;: {
      &quot;ephemeral_5m_input_tokens&quot;: 0,
      &quot;ephemeral_1h_input_tokens&quot;: 0
    },
    &quot;output_tokens_details&quot;: {
      &quot;thinking_tokens&quot;: 345
    }
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%89%8D48%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%89%8D48%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云牍48 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0503005&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;你是什么模型，介绍下自己&quot;
        }
    ],
    &quot;max_tokens&quot;: 4096,
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>event: message_start
data: {&quot;type&quot;:&quot;message_start&quot;,&quot;message&quot;:{&quot;id&quot;:&quot;msg_7bfa0d0298b74178b04ff1a9a0db74c1&quot;,&quot;type&quot;:&quot;message&quot;,&quot;role&quot;:&quot;assistant&quot;,&quot;model&quot;:&quot;T0503005&quot;,&quot;content&quot;:[],&quot;stop_reason&quot;:null,&quot;usage&quot;:{&quot;input_tokens&quot;:0,&quot;output_tokens&quot;:0}}}

 ...

event: message_delta
data: {&quot;type&quot;:&quot;message_delta&quot;,&quot;delta&quot;:{&quot;stop_reason&quot;:&quot;end_turn&quot;,&quot;stop_sequence&quot;:null},&quot;usage&quot;:{&quot;input_tokens&quot;:14,&quot;output_tokens&quot;:717,&quot;cache_read_input_tokens&quot;:0,&quot;cache_creation_input_tokens&quot;:0,&quot;cache_creation&quot;:{&quot;ephemeral_5m_input_tokens&quot;:0,&quot;ephemeral_1h_input_tokens&quot;:0},&quot;output_tokens_details&quot;:{&quot;thinking_tokens&quot;:346}}}

event: message_stop
data: {&quot;type&quot;:&quot;message_stop&quot;}
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<table>
<thead>
<tr>
<th style="text-align:left">错误码</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>InvalidApiKey</code></td>
<td style="text-align:left">API Key无效或未提供。</td>
</tr>
<tr>
<td style="text-align:left"><code>InvalidParameter</code></td>
<td style="text-align:left">请求参数不合法。请检查参数值是否符合文档要求。</td>
</tr>
<tr>
<td style="text-align:left"><code>InternalError</code></td>
<td style="text-align:left">服务内部错误。请稍后重试，若问题持续存在请联系技术支持。</td>
</tr>
</tbody>
</table>
]]></content:encoded>
      <pubDate>Thu, 30 Jul 2026 17:26:13 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1270</guid>
      <comments>http://doc.talkingdata.com/posts/1270#comments</comments>
    </item>
    <item>
      <title>TD云灵63/Minimax-M3</title>
      <link>http://doc.talkingdata.com/posts/1269</link>
      <category>多模态生成API</category>
      <author>liuxinmei</author>
      <description>云灵63 接口说明文档 TD模型编号： T0510017 模型能力简介 云灵63 文本对话：支持多轮沉浸式对话、多风格文案创作、数理逻辑运算、全场景代码生成、百万字级长文本解析、上下文记忆留存等能力。 协议支持：本接口同时兼容OpenAI chat completions与Anthropic Messages 两种主流协议，您可以根据使用的SDK或工具灵活选择。 鉴权说明  本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
 OpenAI 协议对话接口地址 请求方法： POST 接口URL：https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions 请求头（Request Hea</description>
      <content:encoded><![CDATA[<h4 id="%3Cstrong%3E%E4%BA%91%E7%81%B563%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%81%B563%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云灵63 接口说明文档</strong></h4>
<p><strong>TD模型编号：</strong> <strong>T0510017</strong></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><strong>云灵63</strong><ul>
<li><strong>文本对话</strong>：支持多轮沉浸式对话、多风格文案创作、数理逻辑运算、全场景代码生成、百万字级长文本解析、上下文记忆留存等能力。</li>
<li><strong>协议支持</strong>：本接口同时兼容<strong>OpenAI chat completions</strong>与<strong>Anthropic Messages</strong> 两种主流协议，您可以根据使用的SDK或工具灵活选择。</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">OpenAI 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">OpenAI 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0510017</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><code>messages</code></td>
<td style="text-align:left">array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">对话消息数组</td>
</tr>
<tr>
<td style="text-align:left"><code>max_tokens</code></td>
<td style="text-align:left">integer</td>
<td style="text-align:left">否</td>
<td style="text-align:left">最大生成 Token 数</td>
</tr>
<tr>
<td style="text-align:left"><code>temperature</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度（0-2）</td>
</tr>
<tr>
<td style="text-align:left"><code>stream</code></td>
<td style="text-align:left">boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">启用 SSE 流式响应</td>
</tr>
<tr>
<td style="text-align:left"><code>top_p</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">核采样参数</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">OpenAI 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>object</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>chat.completion</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>created</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">请求创建时的 Unix 时间戳（秒）。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>choices</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型生成内容的数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>index</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">当前选项在数组中的索引。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>finish_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>stop</code>：自然停止；<code>length</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>message</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">模型返回的消息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>content</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>prompt_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>completion_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>total_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">总 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">OpenAI 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%81%B563%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%81%B563%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云灵63 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
     &quot;model&quot;: &quot;T0510017&quot;,
     &quot;messages&quot;: [
          {
               &quot;role&quot;: &quot;user&quot;,
               &quot;content&quot;: &quot;介绍下自己&quot;  
        } 
    ],
     &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;id&quot;: &quot;chatcmpl-62fd15ab61f6491fb531d4825550396b&quot;,
  &quot;object&quot;: &quot;chat.completion&quot;,
  &quot;created&quot;: 1785313252,
  &quot;model&quot;: &quot;T0510017&quot;,
  &quot;choices&quot;: [
    {
      &quot;index&quot;: 0,
      &quot;message&quot;: {
        &quot;role&quot;: &quot;assistant&quot;,
        &quot;content&quot;: &quot;&lt;think&gt;\nThe user is asking me to introduce myself in Chinese. Let me provide a self-introduction based on my system prompt information.\n&lt;/think&gt;\n你好！我是 MiniMax-M3，一个由 MiniMax 公司开发的 AI 助手模型。以下是关于我的一些基本信息：\n\n **关于我**\n- **模型版本**：MiniMax-M3\n- **开发公司**：MiniMax\n- **知识截止日期**：2026 年 1 月\n- **公司背景**：MiniMax 成立于 2022 年初，是一家全球性的人工智能基础模型公司，致力于推动 AI 技术向通用人工智能（AGI）方向发展\n\n**我能做什么**\n- 回答各类问题，涵盖科技、生活、学习、工作等多个领域\n- 进行文字创作、翻译、总结、润色\n- 辅助编程、代码调试与技术问题解答\n- 提供分析、建议和头脑风暴\n- 进行多语言对话与交流\n\n我很高兴能为你提供帮助！有什么我可以为你效劳的吗？&quot;
      },
      &quot;finish_reason&quot;: &quot;stop&quot;
    }
  ],
  &quot;usage&quot;: {
    &quot;prompt_tokens&quot;: 179,
    &quot;completion_tokens&quot;: 199,
    &quot;total_tokens&quot;: 378,
    &quot;prompt_tokens_details&quot;: {
      &quot;cached_tokens&quot;: 114
    },
    &quot;completion_tokens_details&quot;: {}
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%81%B563%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%81%B563%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云灵63 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0510017&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>data: {&quot;id&quot;:&quot;chatcmpl-454033906e5e4c789e112b5cc9970908&quot;,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;created&quot;:1785313451,&quot;model&quot;:&quot;T0510017&quot;,&quot;choices&quot;:[{&quot;index&quot;:0,&quot;delta&quot;:{&quot;role&quot;:&quot;assistant&quot;,&quot;content&quot;:&quot;&quot;},&quot;finish_reason&quot;:null}]}

 ...

data: {&quot;id&quot;:&quot;chatcmpl-454033906e5e4c789e112b5cc9970908&quot;,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;created&quot;:1785313451,&quot;model&quot;:&quot;T0510017&quot;,&quot;choices&quot;:[{&quot;index&quot;:0,&quot;delta&quot;:{&quot;content&quot;:&quot;&quot;},&quot;finish_reason&quot;:&quot;stop&quot;}],&quot;usage&quot;:{&quot;prompt_tokens&quot;:179,&quot;completion_tokens&quot;:116,&quot;total_tokens&quot;:295,&quot;prompt_tokens_details&quot;:{&quot;cached_tokens&quot;:128},&quot;completion_tokens_details&quot;:{&quot;reasoning_tokens&quot;:50}}}

data: [DONE]
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">Anthropic 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
<tr>
<td style="text-align:left"><code>anthropic-version</code></td>
<td style="text-align:left"><code>2023-06-01</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Anthropic API 版本</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">Anthropic 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>model</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0510017</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>messages</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">传递给大模型的对话上下文，按对话顺序排列。</td>
</tr>
<tr>
<td style="text-align:left"><strong>max_tokens</strong></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">是</td>
<td style="text-align:left">最大生成 Token 数。</td>
</tr>
<tr>
<td style="text-align:left"><strong>system</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">否</td>
<td style="text-align:left">系统提示词，用于设定大模型的角色、语气、任务目标或约束条件等（顶层字段，不在 messages 中）。</td>
</tr>
<tr>
<td style="text-align:left"><strong>stream</strong></td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">是否以流式输出方式回复。<code>false</code>（默认）：一次性返回；<code>true</code>：边生成边输出，以 SSE 事件流形式返回。</td>
</tr>
<tr>
<td style="text-align:left"><strong>temperature</strong></td>
<td style="text-align:left">Float</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度，控制模型生成文本的多样性。取值范围：<code>[0, 1]</code>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>tools</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">否</td>
<td style="text-align:left">工具定义（函数调用）数组。</td>
</tr>
<tr>
<td style="text-align:left"><strong>thinking</strong></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">否</td>
<td style="text-align:left">扩展思考配置。</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">Anthropic 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>message</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>content</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型返回的内容数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">内容类型，如 <code>text</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>text</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>stop_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>end_turn</code>：自然结束；<code>max_tokens</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>input_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>output_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">Anthropic 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%81%B563%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%81%B563%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云灵63 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0510017&quot;,
    &quot;max_tokens&quot;: 4096,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;id&quot;: &quot;msg_339ed478f16e49ad89c1dfd8ef0f4824&quot;,
  &quot;type&quot;: &quot;message&quot;,
  &quot;role&quot;: &quot;assistant&quot;,
  &quot;model&quot;: &quot;T0510017&quot;,
  &quot;content&quot;: [
    {
      &quot;type&quot;: &quot;text&quot;,
      &quot;text&quot;: &quot;&lt;think&gt;用户用中文问\&quot;介绍下自己\&quot;，意思就是让我自我介绍。我应该用中文回复，详细地介绍我的身份、能力等。&lt;/think&gt;\n\n你好！我是 MiniMax-M3，由 MiniMax 开发的 AI 助手。以下是我的自我介绍：\n\n## 关于我\n\n**我是谁**\n我是 MiniMax-M3，一款人工智能语言模型。我的名字中的 \&quot;M3\&quot; 代表我当前的模型版本。\n\n**关于 MiniMax**\nMiniMax 是一家全球性的人工智能基础模型公司，致力于推动 AI 技术向通用人工智能（AGI）的前沿发展。公司成立于 2022 年初，而我所在的模型版本的知识截止日期为 2026 年 1 月。\n\n## 我能做什么\n\n我可以帮助你完成多种任务，包括但不限于：\n\n- **写作辅助**：撰写文章、邮件、报告、故事、文案等\n- **答疑解惑**：回答各类知识性问题，涵盖科学、历史、技术、文化等领域\n- **翻译工作**：支持多种语言之间的互译\n- **分析与总结**：帮你梳理信息、提炼要点、分析数据\n- **编程支持**：协助编写、调试、解释代码\n- **学习帮助**：解释概念、提供学习建议、辅导功课\n- **头脑风暴**：激发创意、提供思路和灵感\n\n## 我的特点\n\n- **对话自然**：我会以友好、清晰的方式与你交流\n- **信息丰富**：基于大量数据训练，知识面较广\n- **客观中立**：尽量提供平衡的观点，不带个人偏见\n\n## 需要注意的\n\n虽然我会尽力提供准确的信息，但我可能会犯错，建议对重要信息进行核实。\n\n---\n\n如果你有任何问题或需要帮助，随时告诉我！&quot;
    }
  ],
  &quot;stop_reason&quot;: &quot;end_turn&quot;,
  &quot;usage&quot;: {
    &quot;input_tokens&quot;: 51,
    &quot;output_tokens&quot;: 339,
    &quot;cache_read_input_tokens&quot;: 128,
    &quot;cache_creation_input_tokens&quot;: 0,
    &quot;cache_creation&quot;: {
      &quot;ephemeral_5m_input_tokens&quot;: 0,
      &quot;ephemeral_1h_input_tokens&quot;: 0
    },
    &quot;output_tokens_details&quot;: {
      &quot;thinking_tokens&quot;: 26
    }
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%81%B563%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%81%B563%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云灵63 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0510017&quot;,
    &quot;max_tokens&quot;: 4096,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>event: message_start
data: {&quot;type&quot;:&quot;message_start&quot;,&quot;message&quot;:{&quot;id&quot;:&quot;msg_6fe0b1e6f0454e4b846f666ad5b6e44a&quot;,&quot;type&quot;:&quot;message&quot;,&quot;role&quot;:&quot;assistant&quot;,&quot;model&quot;:&quot;T0510017&quot;,&quot;content&quot;:[],&quot;stop_reason&quot;:null,&quot;usage&quot;:{&quot;input_tokens&quot;:0,&quot;output_tokens&quot;:0}}}

 ...

event: message_delta
data: {&quot;type&quot;:&quot;message_delta&quot;,&quot;delta&quot;:{&quot;stop_reason&quot;:&quot;end_turn&quot;,&quot;stop_sequence&quot;:null},&quot;usage&quot;:{&quot;input_tokens&quot;:51,&quot;output_tokens&quot;:212,&quot;cache_read_input_tokens&quot;:128,&quot;cache_creation_input_tokens&quot;:0,&quot;cache_creation&quot;:{&quot;ephemeral_5m_input_tokens&quot;:0,&quot;ephemeral_1h_input_tokens&quot;:0},&quot;output_tokens_details&quot;:{&quot;thinking_tokens&quot;:27}}}

event: message_stop
data: {&quot;type&quot;:&quot;message_stop&quot;}
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<table>
<thead>
<tr>
<th style="text-align:left">错误码</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>InvalidApiKey</code></td>
<td style="text-align:left">API Key无效或未提供。</td>
</tr>
<tr>
<td style="text-align:left"><code>InvalidParameter</code></td>
<td style="text-align:left">请求参数不合法。请检查参数值是否符合文档要求。</td>
</tr>
<tr>
<td style="text-align:left"><code>InternalError</code></td>
<td style="text-align:left">服务内部错误。请稍后重试，若问题持续存在请联系技术支持</td>
</tr>
</tbody>
</table>
]]></content:encoded>
      <pubDate>Thu, 30 Jul 2026 17:19:47 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1269</guid>
      <comments>http://doc.talkingdata.com/posts/1269#comments</comments>
    </item>
    <item>
      <title>TD云灵62/Kimi-K3</title>
      <link>http://doc.talkingdata.com/posts/1268</link>
      <category>多模态生成API</category>
      <author>liuxinmei</author>
      <description>云灵62 接口说明文档 TD模型编号： T0510016 模型能力简介 云灵62 文本对话：支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理、海量上下文文档精读、复杂资料归纳梳理等能力。 协议支持：本接口同时兼容OpenAI chat completions与Anthropic Messages 两种主流协议，您可以根据使用的SDK或工具灵活选择。 鉴权说明  本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
 OpenAI 协议对话接口地址 请求方法： POST 接口URL：https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions 请求头（Request Headers</description>
      <content:encoded><![CDATA[<h4 id="%3Cstrong%3E%E4%BA%91%E7%81%B562%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%81%B562%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云灵62 接口说明文档</strong></h4>
<p><strong>TD模型编号：</strong> <strong>T0510016</strong></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><strong>云灵62</strong><ul>
<li><strong>文本对话</strong>：支持多轮对话、文本生成、逻辑推理、代码生成、长文本处理、海量上下文文档精读、复杂资料归纳梳理等能力。</li>
<li><strong>协议支持</strong>：本接口同时兼容<strong>OpenAI chat completions</strong>与<strong>Anthropic Messages</strong> 两种主流协议，您可以根据使用的SDK或工具灵活选择。</li>
</ul>
</li>
</ul>
<h5 id="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B" name="%3Cstrong%3E%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%3C%2Fstrong%3E%26nbsp%3B"><strong>鉴权说明</strong>&nbsp;</h5>
<pre><code>本接口支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">OpenAI 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">OpenAI 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0510016</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><code>messages</code></td>
<td style="text-align:left">array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">对话消息数组</td>
</tr>
<tr>
<td style="text-align:left"><code>max_tokens</code></td>
<td style="text-align:left">integer</td>
<td style="text-align:left">否</td>
<td style="text-align:left">最大生成 Token 数</td>
</tr>
<tr>
<td style="text-align:left"><code>temperature</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度（0-2）</td>
</tr>
<tr>
<td style="text-align:left"><code>stream</code></td>
<td style="text-align:left">boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">启用 SSE 流式响应</td>
</tr>
<tr>
<td style="text-align:left"><code>top_p</code></td>
<td style="text-align:left">number</td>
<td style="text-align:left">否</td>
<td style="text-align:left">核采样参数</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">OpenAI 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>object</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>chat.completion</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>created</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">请求创建时的 Unix 时间戳（秒）。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>choices</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型生成内容的数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>index</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">当前选项在数组中的索引。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>finish_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>stop</code>：自然停止；<code>length</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>message</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">模型返回的消息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>content</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>prompt_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>completion_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>total_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">总 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="OpenAI%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">OpenAI 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%81%B562%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%81%B562%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云灵62 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0510016&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;你是什么模型，介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;id&quot;: &quot;chatcmpl-3b1efaf9f69c4a279ea7baef973a62fe&quot;,
  &quot;object&quot;: &quot;chat.completion&quot;,
  &quot;created&quot;: 1785307519,
  &quot;model&quot;: &quot;T0510016&quot;,
  &quot;choices&quot;: [
    {
      &quot;index&quot;: 0,
      &quot;message&quot;: {
        &quot;role&quot;: &quot;assistant&quot;,
        &quot;content&quot;: &quot;我是 Kimi，由月之暗面（Moonshot AI）开发的 AI 助手。\n\n我可以帮你做这些事：\n\n- 回答问题、解释概念\n- 写代码、改 bug、分析技术问题\n- 写作、润色、翻译、总结\n- 头脑风暴、制定计划、整理资料\n- 陪你练习表达、学习新知识\n\n我会尽量用清晰、准确、实用的方式回答。你可以把我当成一个随身的学习、编程和写作助手。&quot;,
        &quot;reasoning_content&quot;: &quot;We need answer in Chinese. User asks what model are you, introduce yourself. Need use background identity: current assistant is Kimi, developed by Moonshot AI (月之暗面). Use naturally when asks. Need not claim specific model version unless instructed? Background says current assistant is Kimi, developed by Moonshot AI. We can say 我是 Kimi，由月之暗面（Moonshot AI）开发的 AI 助手. Introduce capabilities: answer questions, writing, programming, translation, summarization, brainstorming, coding help, etc. Mention can use Chinese/English, helpful coding assistant maybe. Keep concise. We don&#39;t know exact model version; don&#39;t fabricate. Could say 具体模型版本请以官方说明为准, but maybe unnecessary. Need final. Since user asks &#39;你是什么模型&#39; maybe answer: 我是 Kimi，一个月之暗面开发的对话式 AI 助手；不是某个具体开源模型? Avoid too much. Include if asked current assistant/model. Need maybe mention Moonshot AI (月之暗面) exactly. final in Chinese. Maybe: 我是 Kimi，由 Moonshot AI（月之暗面）开发的 AI 助手。我可以帮你... 我的目标是... 如果你愿意，可以告诉我... Need not say \&quot;模型\&quot; details: \&quot;至于底层模型细节，我这里不做展开\&quot;. But if asks what model, maybe should be transparent: \&quot;我是 Kimi，具体模型版本和参数不方便/不需要提供\&quot;? The identity instruction likely enough. We can phrase \&quot;我是 Kimi 助手，基于月之暗面的模型能力运行\&quot;. Hmm.\n\nNeed maybe mention \&quot;我能进行自然对话、知识问答、代码辅助、文案写作、翻译、总结、学习计划等\&quot;. Final with concise self-introduction. Could include \&quot;我可以使用中文交流\&quot;. Good.\n\nPotential final: \&quot;我是 Kimi，由月之暗面（Moonshot AI）开发的 AI 助手。我的主要工作是对话和帮助用户解决问题：包括回答问题、解释概念、写代码/改 bug、写文案、翻译、总结文档、头脑风暴、制定计划等。我会尽量用清晰、准确、实用的方式回答。你可以把我当成一个随身的学习、编程和写作助手。\&quot; Nice.\n\nNeed no citations. final only. Ensure Chinese.&quot;
      },
      &quot;finish_reason&quot;: &quot;stop&quot;
    }
  ],
  &quot;usage&quot;: {
    &quot;prompt_tokens&quot;: 91,
    &quot;completion_tokens&quot;: 577,
    &quot;total_tokens&quot;: 668,
    &quot;prompt_tokens_details&quot;: {},
    &quot;completion_tokens_details&quot;: {}
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="OpenAI%20-%20%E4%BA%91%E7%81%B562%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="OpenAI%20-%20%E4%BA%91%E7%81%B562%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">OpenAI - 云灵62 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/openai/api/v3/chat/completions?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0510016&quot;,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;你是什么模型，介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>data: {&quot;id&quot;:&quot;chatcmpl-8be78537d5b04c05a6c94f408d8d2786&quot;,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;created&quot;:1785308911,&quot;model&quot;:&quot;T0510016&quot;,&quot;choices&quot;:[{&quot;index&quot;:0,&quot;delta&quot;:{&quot;role&quot;:&quot;assistant&quot;,&quot;content&quot;:&quot;&quot;},&quot;finish_reason&quot;:null}]}

 ...

data: {&quot;id&quot;:&quot;chatcmpl-8be78537d5b04c05a6c94f408d8d2786&quot;,&quot;object&quot;:&quot;chat.completion.chunk&quot;,&quot;created&quot;:1785308911,&quot;model&quot;:&quot;T0510016&quot;,&quot;choices&quot;:[{&quot;index&quot;:0,&quot;delta&quot;:{&quot;content&quot;:&quot;&quot;},&quot;finish_reason&quot;:&quot;stop&quot;}],&quot;usage&quot;:{&quot;prompt_tokens&quot;:91,&quot;completion_tokens&quot;:536,&quot;total_tokens&quot;:627,&quot;prompt_tokens_details&quot;:{&quot;cached_tokens&quot;:91},&quot;completion_tokens_details&quot;:{&quot;reasoning_tokens&quot;:358}}}

data: [DONE]
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">Anthropic 协议对话接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
<tr>
<td style="text-align:left"><code>anthropic-version</code></td>
<td style="text-align:left"><code>2023-06-01</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Anthropic API 版本</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestld</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">Anthropic 协议对话接口请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">请求体（requestBody）</h3>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">是否必填</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><strong>model</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">是</td>
<td style="text-align:left">本次请求使用的模型编码。此值固定为 <strong><code>T0510016</code></strong>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>messages</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">是</td>
<td style="text-align:left">传递给大模型的对话上下文，按对话顺序排列。</td>
</tr>
<tr>
<td style="text-align:left"><strong>max_tokens</strong></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">是</td>
<td style="text-align:left">最大生成 Token 数。</td>
</tr>
<tr>
<td style="text-align:left"><strong>system</strong></td>
<td style="text-align:left">String</td>
<td style="text-align:left">否</td>
<td style="text-align:left">系统提示词，用于设定大模型的角色、语气、任务目标或约束条件等（顶层字段，不在 messages 中）。</td>
</tr>
<tr>
<td style="text-align:left"><strong>stream</strong></td>
<td style="text-align:left">Boolean</td>
<td style="text-align:left">否</td>
<td style="text-align:left">是否以流式输出方式回复。<code>false</code>（默认）：一次性返回；<code>true</code>：边生成边输出，以 SSE 事件流形式返回。</td>
</tr>
<tr>
<td style="text-align:left"><strong>temperature</strong></td>
<td style="text-align:left">Float</td>
<td style="text-align:left">否</td>
<td style="text-align:left">采样温度，控制模型生成文本的多样性。取值范围：<code>[0, 1]</code>。</td>
</tr>
<tr>
<td style="text-align:left"><strong>tools</strong></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">否</td>
<td style="text-align:left">工具定义（函数调用）数组。</td>
</tr>
<tr>
<td style="text-align:left"><strong>thinking</strong></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">否</td>
<td style="text-align:left">扩展思考配置。</td>
</tr>
</tbody>
</table>
<p><span id="Hrya4y9k"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E5%8F%82%E6%95%B0">Anthropic 协议对话接口返回参数</h2>
<table>
<thead>
<tr>
<th style="text-align:left">参数名</th>
<th style="text-align:left">类型</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>id</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次调用的唯一标识符。</td>
</tr>
<tr>
<td style="text-align:left"><code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">对象类型，固定为 <code>message</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>role</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">消息角色，固定为 <code>assistant</code>。</td>
</tr>
<tr>
<td style="text-align:left"><code>model</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">本次请求使用的模型。</td>
</tr>
<tr>
<td style="text-align:left"><code>content</code></td>
<td style="text-align:left">Array</td>
<td style="text-align:left">模型返回的内容数组。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>type</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">内容类型，如 <code>text</code>。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>text</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型的文本回复内容。</td>
</tr>
<tr>
<td style="text-align:left"><code>stop_reason</code></td>
<td style="text-align:left">String</td>
<td style="text-align:left">模型停止生成的原因。<code>end_turn</code>：自然结束；<code>max_tokens</code>：达到最大Token限制。</td>
</tr>
<tr>
<td style="text-align:left"><code>usage</code></td>
<td style="text-align:left">Object</td>
<td style="text-align:left">Token消耗信息。</td>
</tr>
<tr>
<td style="text-align:left">├─ <code>input_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输入的 Token 数。</td>
</tr>
<tr>
<td style="text-align:left">└─ <code>output_tokens</code></td>
<td style="text-align:left">Integer</td>
<td style="text-align:left">输出的 Token 数。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="Anthropic%20%E5%8D%8F%E8%AE%AE%E5%AF%B9%E8%AF%9D%E6%8E%A5%E5%8F%A3%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">Anthropic 协议对话接口调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%81%B562%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%81%B562%20-%20%E9%9D%9E%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云灵62 - 非流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0510016&quot;,
    &quot;max_tokens&quot;: 4096,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;你是哪个系列的模型，介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;id&quot;: &quot;msg_cbc8d82c2d7b4ed4bd86869df3922634&quot;,
  &quot;type&quot;: &quot;message&quot;,
  &quot;role&quot;: &quot;assistant&quot;,
  &quot;model&quot;: &quot;T0510016&quot;,
  &quot;content&quot;: [
    {
      &quot;type&quot;: &quot;thinking&quot;,
      &quot;thinking&quot;: &quot;We need answer in Chinese. Need identify as Kimi developed by Moonshot AI (月之暗面) naturally. User asks which series model and introduce self. We can say我是 Kimi，由月之暗面（Moonshot AI）开发的人工智能助手...&#39; Maybe avoid exact model version unless provided. Should not claim ChatGPT etc. Need final only. Maybe mention not某一公开系列? Hmm background identity says current assistant is Kimi, developed by Moonshot AI. They ask \&quot;你是哪个系列的模型\&quot; perhaps answer \&quot;Kimi 系列\&quot;. Include capabilities: 对话、写作、编程、翻译、总结、分析等; long text and multimodal? Need be careful depending actual abilities in this API maybe text only. We can say我可以帮你... if connected to tools/vision maybe not. Since no tools for actual tasks besides reasoning. Need concise. Use \&quot;我主要擅长\&quot;. Also maybe \&quot;我不同于具体开源系列\&quot;? No need.\nNeed maybe \&quot;我是 Kimi，不是某个特定第三方模型系列\&quot;. Provide self intro. Desired oververbosity 5, so moderate. In Chinese. Maybe ask what they need. Done.&quot;,
      &quot;signature&quot;: &quot;cbc8d82c2d7b4ed4bd86869df3922634&quot;
    },
    {
      &quot;type&quot;: &quot;text&quot;,
      &quot;text&quot;: &quot;我是 **Kimi**，由 **月之暗面（Moonshot AI）** 开发的人工智能助手，属于 Kimi 系列模型。\n\n我可以帮你做这些事：\n\n- **问答与解释**：解答各类问题，把复杂概念讲清楚  \n- **写作与润色**：写文章、改文案、拟邮件、做总结  \n- **编程辅助**：写代码、查 bug、解释算法、设计技术方案  \n- **学习辅助**：讲题、整理知识点、制定学习计划  \n- **办公效率**：整理资料、提炼重点、做表格/大纲/会议纪要  \n- **多语言交流**：中文、英文等多种语言翻译与对话  \n\n我的风格是可以根据你的需求调整：既可以简洁直接，也可以详细展开；既适合日常聊天，也适合专业场景。你可以直接告诉我你的目标，我会尽量用最适合你的方式帮你。&quot;
    }
  ],
  &quot;stop_reason&quot;: &quot;end_turn&quot;,
  &quot;usage&quot;: {
    &quot;input_tokens&quot;: 92,
    &quot;output_tokens&quot;: 422,
    &quot;cache_read_input_tokens&quot;: 0,
    &quot;cache_creation_input_tokens&quot;: 0,
    &quot;cache_creation&quot;: {
      &quot;ephemeral_5m_input_tokens&quot;: 0,
      &quot;ephemeral_1h_input_tokens&quot;: 0
    },
    &quot;output_tokens_details&quot;: {
      &quot;thinking_tokens&quot;: 234
    }
  }
}
</code></pre><p><span id="Hrya4y9k"></span></p>
<h3 id="Anthropic%20-%20%E4%BA%91%E7%81%B562%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA" name="Anthropic%20-%20%E4%BA%91%E7%81%B562%20-%20%E6%B5%81%E5%BC%8F%E8%BE%93%E5%87%BA">Anthropic - 云灵62 - 流式输出</h3>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST &#39;https://modelpool-api.talkingdata.com/model/anthropic/api/v1/messages?requestId=550e8400-e29b-41d4-a716-446655440000&#39; \
  -H &#39;Content-Type: application/json&#39; \
  -H &#39;Authorization: Bearer YOUR_API_KEY&#39; \
  -H &#39;X-Timestamp: 1760000000&#39; \
  -d &#39;{
    &quot;model&quot;: &quot;T0510016&quot;,
    &quot;max_tokens&quot;: 4096,
    &quot;messages&quot;: [
        {
            &quot;role&quot;: &quot;user&quot;,
            &quot;content&quot;: &quot;介绍下自己&quot;
        }
    ],
    &quot;stream&quot;: true
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code>event: message_start
data: {&quot;type&quot;:&quot;message_start&quot;,&quot;message&quot;:{&quot;id&quot;:&quot;msg_d9b76d6798a94c709c2f2d4985df57cc&quot;,&quot;type&quot;:&quot;message&quot;,&quot;role&quot;:&quot;assistant&quot;,&quot;model&quot;:&quot;T0510016&quot;,&quot;content&quot;:[],&quot;stop_reason&quot;:null,&quot;usage&quot;:{&quot;input_tokens&quot;:0,&quot;output_tokens&quot;:0}}}

event: content_block_start
data: {&quot;type&quot;:&quot;content_block_start&quot;,&quot;index&quot;:0,&quot;content_block&quot;:{&quot;type&quot;:&quot;thinking&quot;,&quot;thinking&quot;:&quot;&quot;}}

 ...

event: message_delta
data: {&quot;type&quot;:&quot;message_delta&quot;,&quot;delta&quot;:{&quot;stop_reason&quot;:&quot;end_turn&quot;,&quot;stop_sequence&quot;:null},&quot;usage&quot;:{&quot;input_tokens&quot;:87,&quot;output_tokens&quot;:257,&quot;cache_read_input_tokens&quot;:0,&quot;cache_creation_input_tokens&quot;:0,&quot;cache_creation&quot;:{&quot;ephemeral_5m_input_tokens&quot;:0,&quot;ephemeral_1h_input_tokens&quot;:0}}}

event: message_stop
data: {&quot;type&quot;:&quot;message_stop&quot;}
</code></pre><p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<table>
<thead>
<tr>
<th style="text-align:left">错误码</th>
<th style="text-align:left">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>InvalidApiKey</code></td>
<td style="text-align:left">API Key无效或未提供。</td>
</tr>
<tr>
<td style="text-align:left"><code>InvalidParameter</code></td>
<td style="text-align:left">请求参数不合法。请检查参数值是否符合文档要求。</td>
</tr>
<tr>
<td style="text-align:left"><code>InternalError</code></td>
<td style="text-align:left">服务内部错误。请稍后重试，若问题持续存在请联系技术支持</td>
</tr>
</tbody>
</table>
]]></content:encoded>
      <pubDate>Thu, 30 Jul 2026 16:58:33 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1268</guid>
      <comments>http://doc.talkingdata.com/posts/1268#comments</comments>
    </item>
    <item>
      <title>TD云筑76/Doubao-Seedance-2.0-mini</title>
      <link>http://doc.talkingdata.com/posts/1267</link>
      <category>视频生成 API</category>
      <author>liuxinmei</author>
      <description>云筑76 接口说明文档 TD模型编号：T0101008 模型能力简介 云筑76 多模态参考生视频，输入参考图片（0~9）+参考视频（0~3）+ 参考音频（0~3）+ 文本提示词（可选）生成 1 个目标视频。支持生成全新视频、编辑视频、延长视频。 注意：不可单独输入音频，应至少包含 1 个参考视频或图片。 图生视频-首尾帧，输入首帧图片+尾帧图片+文本提示词（可选）生成 1 个目标视频。 图生视频-首帧，输入首帧图片+文本提示词（可选）生成 1 个目标视频。 文生视频，输入文本提示词生成 1 个目标视频。 鉴权说明  本接口仅支持API Key鉴权，需联系TD运维同学获取长效API Key。
 创建视频生成任务接口地址 介绍创建视频生成任务 API 的输入输出参数，供您使用接口时查阅字段含义。</description>
      <content:encoded><![CDATA[<h4 id="%3Cstrong%3E%E4%BA%91%E7%AD%9176%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E" name="%3Cstrong%3E%E4%BA%91%E7%AD%9176%20%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3%3C%2Fstrong%3E"><strong>云筑76 接口说明文档</strong></h4>
<h5 id="%3Cstrong%3ETD%E6%A8%A1%E5%9E%8B%E7%BC%96%E5%8F%B7%EF%BC%9A%3C%2Fstrong%3ET0101008" name="%3Cstrong%3ETD%E6%A8%A1%E5%9E%8B%E7%BC%96%E5%8F%B7%EF%BC%9A%3C%2Fstrong%3ET0101008"><strong>TD模型编号：</strong>T0101008</h5>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B" name="%E6%A8%A1%E5%9E%8B%E8%83%BD%E5%8A%9B%E7%AE%80%E4%BB%8B">模型能力简介</h2>
<p><span id="Hrya4y9k"></span></p>
<ul>
<li><p><strong>云筑76</strong></p>
<ul>
<li><p>多模态参考生视频，输入参考图片（0~9）+参考视频（0~3）+ 参考音频（0~3）+ 文本提示词（可选）生成 1 个目标视频。支持生成全新视频、编辑视频、延长视频。</p>
<blockquote>
<p>注意：不可单独输入音频，应至少包含 1 个参考视频或图片。</p>
</blockquote>
</li>
<li><p>图生视频-首尾帧，输入首帧图片+尾帧图片+文本提示词（可选）生成 1 个目标视频。</p>
</li>
<li><p>图生视频-首帧，输入首帧图片+文本提示词（可选）生成 1 个目标视频。</p>
</li>
<li><p>文生视频，输入文本提示词生成 1 个目标视频。</p>
</li>
</ul>
</li>
</ul>
<h5 id="%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%26nbsp%3B" name="%E9%89%B4%E6%9D%83%E8%AF%B4%E6%98%8E%26nbsp%3B">鉴权说明&nbsp;</h5>
<pre><code>本接口仅支持API Key鉴权，需联系TD运维同学获取长效API Key。
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">创建视频生成任务接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p>介绍创建视频生成任务 API 的输入输出参数，供您使用接口时查阅字段含义。模型会依据传入的图片及文本信息生成视频，待生成完成后，您可以按条件查询任务并获取生成的视频。</p>
<p><strong>请求方法：</strong> POST</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks</code> </p>
<p><strong>请求头（Request Headers）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">头部字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>Authorization</code></td>
<td style="text-align:left"><code>Bearer &lt;your_api_key&gt;</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">API 鉴权凭证，请替换为有效的 API Key</td>
</tr>
<tr>
<td style="text-align:left"><code>X-Timestamp</code></td>
<td style="text-align:left"><code>1700000000</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">Unix 时间戳格式</td>
</tr>
<tr>
<td style="text-align:left"><code>Content-Type</code></td>
<td style="text-align:left"><code>application/json</code></td>
<td style="text-align:left">是</td>
<td style="text-align:left">请求体格式必须为 JSON</td>
</tr>
</tbody>
</table>
<p><strong>请求参数（Request  Parameter）：</strong></p>
<table>
<thead>
<tr>
<th style="text-align:left">字段</th>
<th style="text-align:left">值</th>
<th style="text-align:left">是否必需</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left"><code>requestId</code></td>
<td style="text-align:left"><code>550e8400-e29b-41d4-a716-446655440000</code></td>
<td style="text-align:left">否</td>
<td style="text-align:left">请求唯一标识符。使用 UUID 格式字符串，用于跟踪和排查请求相关问题，以便在需要技术排查时，提供此 ID 可快速定位具体请求的完整处理链路和日志信息。</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">创建视频生成任务请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<h3 id="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89" name="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E4%BD%93%EF%BC%88requestBody%EF%BC%89">创建视频生成任务请求体（requestBody）</h3>
<hr>
<p><strong>model</strong>   <code>string</code>  <code>必选</code>   </p>
<p>本次请求使用模型的 Model ID 为 <strong>T0101008</strong></p>
<hr>
<p><strong>content </strong> <code>object[]</code> <code>必选</code> </p>
<p>输入给模型，生成视频的信息，支持文本、图片、音频、视频、样片任务 ID。支持以下几种组合：</p>
<ul>
<li>文本</li>
<li>文本（可选）+ 图片</li>
<li>文本（可选）+ 视频</li>
<li>文本（可选）+ 图片 + 音频</li>
<li>文本（可选）+ 图片 + 视频</li>
<li>文本（可选）+ 视频 + 音频</li>
<li>文本（可选）+ 图片 + 视频 + 音频</li>
<li>样片任务 ID ：样片指使用模型成功生成的样片视频，模型可基于样片生成高质量正式视频。</li>
</ul>
<p>信息类型：</p>
<ul>
<li><p><strong>文本信息</strong> <code>object</code> </p>
<p>输入给模型生成视频的内容，文本内容部分。</p>
<ul>
<li><p>content.<strong>type</strong> <code>string</code> <code>必选</code>  </p>
<p>输入内容的类型，此处应为 text。</p>
</li>
<li><p>content.<strong>text</strong> <code>string</code> <code>必选</code>  </p>
<p>输入给模型的文本提示词，描述期望生成的视频。</p>
<blockquote>
<p><strong>说明：</strong></p>
<ul>
<li>提示词语言支持：支持中英文提示词；额外支持日语、印尼语、西班牙语、葡萄牙语。</li>
<li>提示词字数建议：中文提示词不超过500字，英文提示词不超过1000词。字数过多易导致信息分散，模型可能忽略细节、仅关注重点，进而造成视频缺失部分元素。</li>
</ul>
</blockquote>
</li>
</ul>
</li>
<li><p><strong>图片信息</strong> <code>object</code> </p>
<p>输入给模型生成视频的内容，图片信息部分。</p>
<ul>
<li><p>content.<strong>type</strong> <code>string</code>  <code>必选</code> </p>
<p>输入内容的类型，此处应为 image_url。支持图片URL或图片 Base64 编码。</p>
<ul>
<li>content.<strong>image_url</strong> <code>object</code> <code>必选</code> </li>
</ul>
<p>输入给模型的图片对象。</p>
<ul>
<li><p>content.image_url.<strong>url</strong> <code>string</code> <code>必选</code> </p>
<p>图片信息，可以是图片URL、图片 Base64 编码、素材ID。</p>
<ul>
<li><p>图片URL：请确保图片URL可被访问。</p>
</li>
<li><p>Base64编码：请遵循此格式data:image/&lt;图片格式&gt;;base64,<Base64编码>，注意 &lt;图片格式&gt; 需小写，如 data:image/png;base64,{base64_image}。</p>
</li>
<li><p>素材 ID：用于视频生成的预置素材及虚拟人像的 ID，遵循格式：asset://<ASSET_ID>。可从私域虚拟人像素材资产库接口获取。</p>
<blockquote>
<p>说明</p>
<p>传入图片需要满足以下条件：</p>
<ul>
<li>格式：jpeg、png、webp、bmp、tiff、gif、heic、heif</li>
<li>宽高比（宽/高）：(0.4, 2.5)</li>
<li>宽高长度（px）：(300, 6000)</li>
<li>大小：单张图片小于 30 MB，请求体大小不超过 64 MB，大文件请勿使用Base64编码。</li>
<li>图片数量：<ul>
<li>图生视频-首帧：1 张</li>
<li>图生视频-首尾帧：2 张</li>
<li>云筑76 多模态参考生视频：1~9 张</li>
</ul>
</li>
</ul>
</blockquote>
</li>
</ul>
</li>
</ul>
</li>
<li><p>content.<strong>role</strong> <code>string</code> <code>条件必填</code></p>
<p>图片的位置或用途。</p>
<p>| 场景            | role 取值                                                    |
| --------------- | ------------------------------------------------------------ |
| 图生视频-首帧   | <code>first_frame</code> 或不填                                         |
| 图生视频-首尾帧 | 首帧：<code>first_frame</code>（必填），尾帧：<code>last_frame</code>（必填）                                           <strong>说明：</strong>传入的首尾帧图片可相同。首尾帧图片的宽高比不一致时，以首帧图片为主，尾帧图片会自动裁剪适配。 |
| 图生视频-参考图 | <code>reference_image</code>（必填）                                    |</p>
<p><strong>注意：</strong></p>
</li>
<li><p><strong>图生视频-首帧、图生视频-首尾帧、多模态参考生视频</strong>为三种互斥场景，在一次请求中不可混用。请根据您的需求选择其中一种场景进行配置。</p>
</li>
<li><strong>多模态参考生视频</strong> 可通过提示词指定参考图片作为首帧/尾帧，间接实现“首尾帧+多模态参考”效果。若需严格保障首尾帧和指定图片一致， <strong>优先使用图生视频-首尾帧</strong> （配置 role 为 first_frame/last_frame）。</li>
</ul>
</li>
<li><p><strong>视频信息</strong> <code>object</code>  </p>
<p>输入给模型的视频信息。</p>
<p>| 参数                  | 类型   | 必填     | 说明                                           |
| --------------------- | ------ | -------- | ---------------------------------------------- |
| content.type          | string | 必选     | 输入内容的类型，此处应为 <code>video_url</code>           |
| content.video_url.url | string | 必选     | 视频 URL、素材 ID                              |
| content.role          | string | 条件必填 | 视频的位置或用途，当前仅支持 <code>reference_video</code> |</p>
<blockquote>
<p><strong>传入单个视频要求：</strong></p>
<ul>
<li><p>视频格式：mp4、mov</p>
</li>
<li><p>分辨率：480p、720p</p>
</li>
<li><p>时长：单个视频时长 [2, 15] s，最多传入 3 个参考视频，所有视频总时长不超过 15s</p>
</li>
<li><p>宽高比（宽/高）：[0.4, 2.5]</p>
</li>
<li><p>宽高长度（px）：[300, 6000]</p>
</li>
<li><p>画面像素（宽 × 高）：[409600, 8295044]</p>
</li>
<li><p>大小：单个视频不超过 200 MB</p>
</li>
<li><p>帧率 (FPS)：[24, 60]</p>
<p>| <strong>容器格式</strong> | <strong>常用文件扩展名</strong> | <strong>MIME</strong>        | <strong>支持编码</strong>                              |
| ------------ | ------------------ | --------------- | ----------------------------------------- |
| MP4          | .mp4               | video/mp4       | 视频：H.264/AVC、H.265/HEVC音频：AAC、MP3 |
| QuickTime    | .mov               | video/quicktime | 视频：H.264/AVC、H.265/HEVC音频：AAC、MP3 |</p>
</li>
</ul>
</blockquote>
</li>
<li><p><strong>音频信息</strong> <code>object</code>  </p>
<p>输入给模型的音频信息。注意不可单独输入音频，应至少包含 1 个参考视频或图片。</p>
<p>| 参数                  | 类型   | 必填     | 说明                                                         |
| --------------------- | ------ | -------- | ------------------------------------------------------------ |
| content.type          | string | 必选     | 输入内容的类型，此处应为 <code>audio_url</code>                         |
| content.audio_url.url | string | 必选     | 音频 URL、音频 Base64 编码（音频Base64编码请遵循格式：data:audio/&lt;音频格式&gt;;base64,<Base64编码>，如data:audio/wav;base64,{base64_audio}。注意&lt;音频格式&gt;需小写。）、素材 ID |
| content.role          | string | 条件必填 | 音频的位置或用途，当前仅支持 <code>reference_audio</code>               |</p>
<blockquote>
<p><strong>传入单个音频要求：</strong></p>
<ul>
<li>格式：wav、mp3</li>
<li>时长：单个音频时长 [2, 15] s，最多传入 3 段参考音频，所有音频总时长不超过 15 s。</li>
<li>大小：单个音频不超过 15 MB，请求体大小不超过 64 MB，大文件请勿使用Base64编码。</li>
</ul>
</blockquote>
</li>
</ul>
<hr>
<p><strong>callback_url</strong> <code>string</code></p>
<p>填写本次生成任务结果的回调通知地址。当视频生成任务有状态变化时，将向此地址推送 POST 请求。</p>
<p>回调请求内容结构与查询视频生成任务API的返回体一致。</p>
<p>回调返回的 status 包括以下状态：</p>
<ul>
<li>queued：排队中。</li>
</ul>
<ul>
<li>running：任务运行中。</li>
</ul>
<ul>
<li>succeeded： 任务成功。（如发送失败，即5秒内没有接收到成功发送的信息，回调三次）</li>
</ul>
<ul>
<li>failed：任务失败。（如发送失败，即5秒内没有接收到成功发送的信息，回调三次）</li>
</ul>
<ul>
<li>expired：任务超时，即任务处于 <strong>运行中或排队中</strong> 状态超过过期时间。可通过 <strong>execution_expires_after</strong> 字段设置过期时间。</li>
</ul>
<hr>
<p><strong>return_last_frame</strong> <code>boolean</code>  <code>默认值 false</code></p>
<ul>
<li><code>true</code>：返回生成视频的尾帧图像。设置为 <code>true</code>后，获取视频的尾帧图像。尾帧图像的宽高像素值与生成的视频保持一致，无水印。使用该参数可实现生成多个连续视频：以上一个生成视频的尾帧作为下一个视频任务的首帧，快速生成多个连续视频。</li>
</ul>
<ul>
<li><code>false</code>：不返回生成视频的尾帧图像。</li>
</ul>
<hr>
<p><strong>execution_expires_after</strong> <code>integer</code>  <code>默认值 172800</code></p>
<p>任务超时阈值。指定任务提交后的过期时间（单位：秒），从 <strong>created at</strong> 时间戳开始计算。默认值 172800 秒，即 48 小时。取值范围：[3600，259200]。</p>
<p>不论使用哪种 <strong>service_tier</strong> ，都建议根据业务场景设置合适的超时时间。超过该时间后任务会被自动终止，并标记为<code>expired</code>状态。</p>
<hr>
<p><strong>generate_audio</strong> <code>boolean</code> <code>默认值 true</code></p>
<p>控制生成的视频是否包含与画面同步的声音。</p>
<ul>
<li><code>true</code>：模型输出的视频包含同步音频。模型会基于文本提示词与视觉内容，自动生成与之匹配的人声、音效及背景音乐。建议将对话部分置于双引号内，以优化音频生成效果。</li>
<li><code>false</code>：模型输出的视频为无声视频。 </li>
</ul>
<blockquote>
<p><strong>注意:</strong></p>
<p><strong>生成的有声视频均为单声道，和传入的音频声道数无关。</strong></p>
</blockquote>
<hr>
<p><strong>tools</strong> <code>object</code>  </p>
<p>配置模型要调用的工具。</p>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>tools.type</td>
<td>string</td>
<td>指定使用的工具类型。<code>web_search</code>：联网搜索工具</td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>联网搜索说明：</strong></p>
<ul>
<li>开启联网搜索后，模型会根据用户的提示词自主判断是否搜索互联网内容（如商品、天气等）</li>
<li>可提升生成视频的时效性，但也会增加一定的时延</li>
<li>实际搜索次数可通过查询视频生成任务 API 返回的 <code>usage.tool_usage.web_search</code> 字段获取</li>
</ul>
</blockquote>
<hr>
<p><strong>safety_identifier</strong> <code>string</code></p>
<p>终端用户的唯一标识符，用于协助平台检测您的应用中可能违反使用政策的用户。该标识符为英文字符串，需保证对单个用户固定且唯一，长度不超过 64 个字符。推荐传入对用户名、用户 ID 或邮箱进行哈希处理后生成的字符串，避免泄露用户隐私信息。</p>
<hr>
<p><strong>priority</strong> <code>integer</code> <code>默认值 0</code></p>
<p>设置当前请求的执行优先级，决定其在队列中的排序位置。取值范围：0~9，数值越大，优先级越高。</p>
<p>默认情况下，请求按 FIFO（First In, First Out，先进先出）顺序执行。设置较高优先级后，该请求将插队到同 Endpoint（推理接入点）下所有低优先级请求之前。</p>
<p><strong>示例</strong> ：
某 Endpoint 当前队列中有 3 个排队中（status=<code>queued</code>）任务，优先级均为 0（默认）。</p>
<p>队列：[任务A: priority=0] → [任务B: priority=0] → [任务C: priority=0]</p>
<p>此时提交一个 priority=5 的新请求，该请求将直接排到队首：</p>
<p>队列：[新请求: priority=5] → [任务A: priority=0] → [任务B: priority=0] → [任务C: priority=0]</p>
<blockquote>
<p><strong>说明：</strong></p>
<ul>
<li>相同优先级的请求之间仍按 FIFO 排序。</li>
<li>优先级仅影响排队顺序，不会中断正在执行中（status=running）的任务。</li>
<li>优先级仅在同一 Endpoint 内生效，不影响其他 Endpoint。</li>
<li>离线推理模式（service_tier=flex）不支持配置优先级。</li>
</ul>
</blockquote>
<hr>
<p><strong>resolution</strong> <code>string</code> <code>默认值 720p</code></p>
<p>视频分辨率，取值范围：<code>480p</code>、<code>720p</code></p>
<hr>
<p><strong>ratio</strong>  <code>string</code> <code>默认值 adaptive</code></p>
<p>生成视频的宽高比例。可选值：</p>
<ul>
<li><code>16:9</code></li>
<li><code>4:3</code></li>
<li><code>1:1</code></li>
<li><code>3:4</code></li>
<li><code>9:16</code></li>
<li><code>21:9</code></li>
<li><code>adaptive</code>：根据输入自动选择最合适的宽高比</li>
</ul>
<blockquote>
<p><strong>adaptive</strong> 适配规则</p>
<ul>
<li>文生视频：根据输入的提示词，智能选择最合适的宽高比</li>
<li>首帧 / 首尾帧生视频：根据上传的首帧图片比例，自动选择最接近的宽高比</li>
<li>多模态参考生视频：根据用户提示词意图判断，以传入的第一个媒体文件为准（优先级：视频＞图片）选择最接近的宽高比</li>
</ul>
</blockquote>
<p><strong>不同宽高比对应的宽高像素值：</strong></p>
<table>
<thead>
<tr>
<th>分辨率</th>
<th>宽高比</th>
<th>宽高像素值</th>
</tr>
</thead>
<tbody>
<tr>
<td>480p</td>
<td>16:9</td>
<td>864×496</td>
</tr>
<tr>
<td>480p</td>
<td>4:3</td>
<td>752×560</td>
</tr>
<tr>
<td>480p</td>
<td>1:1</td>
<td>640×640</td>
</tr>
<tr>
<td>480p</td>
<td>3:4</td>
<td>560×752</td>
</tr>
<tr>
<td>480p</td>
<td>9:16</td>
<td>496×864</td>
</tr>
<tr>
<td>480p</td>
<td>21:9</td>
<td>992×432</td>
</tr>
<tr>
<td>720p</td>
<td>16:9</td>
<td>1280×720</td>
</tr>
<tr>
<td>720p</td>
<td>4:3</td>
<td>1112×834</td>
</tr>
<tr>
<td>720p</td>
<td>1:1</td>
<td>960×960</td>
</tr>
<tr>
<td>720p</td>
<td>3:4</td>
<td>834×1112</td>
</tr>
<tr>
<td>720p</td>
<td>9:16</td>
<td>720×1280</td>
</tr>
<tr>
<td>720p</td>
<td>21:9</td>
<td>1470×630</td>
</tr>
</tbody>
</table>
<hr>
<p><strong>duration</strong> <code>integer</code> <code>默认值 5</code></p>
<p>生成视频时长，仅支持整数，单位：秒。</p>
<p>取值范围：<code>[4,15]</code> 或设置为 <code>-1</code></p>
<blockquote>
<p>配置方法</p>
<ul>
<li>指定具体时长：支持有效范围内的任一整数</li>
<li>智能指定：设置为 <code>-1</code>，表示由模型在有效范围内自主选择合适的视频长度（整数秒）。注意视频时长与计费相关，请谨慎设置。</li>
</ul>
</blockquote>
<hr>
<p><strong>watermark</strong> <code>boolean</code>  <code>默认值 false</code></p>
<p>生成视频是否包含水印。枚举值：</p>
<p><strong>false</strong>：生成视频不含水印。</p>
<p><strong>true</strong>：生成视频右下角会展示<code>AI 生成</code>水印。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="%E5%88%9B%E5%BB%BA%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">创建视频生成任务调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X POST https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;Authorization: Bearer $ARK_API_KEY&quot; \
  -H &quot;X-Timestamp: $TIMESTAMP&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;T0101008&quot;,
    &quot;content&quot;: [
        {
            &quot;type&quot;: &quot;text&quot;,
            &quot;text&quot;: &quot;Photorealistic style: Under a clear blue sky, a vast expanse of white daisy fields stretches out. The camera gradually zooms in and finally fixates on a close-up of a single daisy, with several glistening dewdrops resting on its petals.&quot;
        }
    ],
    &quot;ratio&quot;: &quot;16:9&quot;,
    &quot;duration&quot;: 5,
    &quot;watermark&quot;: false
}&#39;
</code></pre>
<p>响应示例：</p>
<pre><code class="lang-curl">{
  &quot;id&quot;: &quot;cgt-2025******-****&quot;
}
</code></pre>
<hr>
<p><span id="Hrya4y9k"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">查询视频生成任务接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p>查询视频生成任务的状态。</p>
<blockquote>
<p>说明</p>
<p>仅支持查询最近 7 天的历史数据。时间计算统一采用UTC时间戳，返回的7天历史数据范围以用户实际发起查询请求的时刻为基准（精确到秒），时间戳区间为 [T-7天, T)。</p>
</blockquote>
<p><strong>请求方法：</strong> GET</p>
<p><strong>接口URL：</strong><code>https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks/{id}</code> </p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">查询视频生成任务请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<hr>
<p><strong>id</strong> <code>string</code> <code>必选</code>   </p>
<p>您需要查询的视频生成任务的 ID 。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0" name="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0">查询视频生成任务响应参数</h2>
<p><span id="Hrya4y9k"></span></p>
<hr>
<p><strong>id</strong>  <code>string</code>  </p>
<p>视频生成任务 ID 。</p>
<hr>
<p><strong>model</strong> <code>string</code>  </p>
<p>本次请求使用的模型 ID 。</p>
<hr>
<p><strong>status</strong> <code>string</code></p>
<p>任务状态，以及相关的信息：</p>
<ul>
<li><code>queued</code>：排队中。</li>
</ul>
<ul>
<li><code>running</code>：任务运行中。</li>
</ul>
<ul>
<li><code>cancelled</code>：取消任务，取消状态24h自动删除（只支持排队中状态的任务被取消）。</li>
</ul>
<ul>
<li><code>succeeded</code>： 任务成功。</li>
</ul>
<ul>
<li><code>failed</code>：任务失败。</li>
</ul>
<ul>
<li><code>expired</code>：任务超时。</li>
</ul>
<hr>
<p><strong>error</strong> <code>object / null</code></p>
<p>错误提示信息，任务成功返回null，任务失败时返回错误数据。</p>
<ul>
<li><p><strong>error. code</strong> <code>string</code></p>
<p>错误码。</p>
</li>
<li><p><strong>error. message</strong> <code>string</code></p>
<p>错误提示信息。</p>
</li>
</ul>
<hr>
<p><strong>created_at</strong> <code>integer</code></p>
<p>任务创建时间的 Unix 时间戳（秒）。</p>
<hr>
<p><strong>updated_at</strong> <code>integer</code></p>
<p>任务当前状态更新时间的 Unix 时间戳（秒）。</p>
<hr>
<p><strong>content</strong> <code>object</code></p>
<p>视频生成任务的输出内容。</p>
<ul>
<li><p>content. <strong>video_url</strong> <code>string</code></p>
<p>生成视频的 URL，格式为 mp4。有效期为 24 小时，请及时下载或转存。</p>
</li>
<li><p>content. <strong>last_frame_url</strong> <code>string</code></p>
<p>视频的尾帧图像 URL。有效期为 24 小时，请及时下载或转存。</p>
</li>
</ul>
<blockquote>
<p><strong>说明：</strong></p>
<p><strong>创建视频生成任务时设置 <code>&quot;return_last_frame&quot;: true</code>时,会返回该参数。</strong></p>
</blockquote>
<hr>
<p><strong>resolution</strong> <code>string</code></p>
<p>生成视频的分辨率。</p>
<hr>
<p><strong>ratio</strong> <code>string</code></p>
<p>生成视频的宽高比。</p>
<hr>
<p><strong>framespersecond</strong> <code>integer</code></p>
<p>生成视频的帧率。</p>
<hr>
<p><strong>generate_audio</strong> <code>boolean</code></p>
<p>生成的视频是否包含与画面同步的声音。</p>
<ul>
<li><code>true</code>：模型输出的视频包含同步音频。</li>
</ul>
<ul>
<li><code>false</code>：模型输出的视频为无声视频。</li>
</ul>
<hr>
<p><strong>tools</strong>  <code>object[]</code>   </p>
<p>配置模型要调用的工具。</p>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>tools</td>
<td>object[]</td>
<td>本次请求实际使用的工具列表。结构同创建请求中的<code>tools</code>参数。未使用工具时不返回该字段。</td>
</tr>
<tr>
<td>tools.type</td>
<td>string</td>
<td>指定使用的工具类型。<code>web_search</code>：联网搜索工具</td>
</tr>
</tbody>
</table>
<hr>
<p><strong>safety_identifier</strong> <code>string</code></p>
<p>终端用户的唯一标识符。若创建视频生成任务时设置了该参数，接口会原样返回此信息。</p>
<hr>
<p><strong>priority</strong> <code>integer</code></p>
<p>当前请求的执行优先级。</p>
<hr>
<p><strong>draft_task_id</strong> <code>string</code>
Draft 视频任务 ID。基于 Draft 视频生成正式视频时，会返回该参数。</p>
<hr>
<p><strong>service_tier</strong> <code>string</code>
实际处理任务使用的服务等级。</p>
<hr>
<p><strong>execution_expires_after</strong> <code>integer</code>
任务超时阈值，单位：秒。</p>
<hr>
<p><strong>usage</strong> <code>object</code>   </p>
<p>本次请求的 token 用量。</p>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>usage.completion_tokens</td>
<td>integer</td>
<td>模型输出视频花费的 token 数量</td>
</tr>
<tr>
<td>usage.total_tokens</td>
<td>integer</td>
<td>本次请求消耗的总 token 数量</td>
</tr>
<tr>
<td>usage.tool_usage</td>
<td>object</td>
<td>使用工具的用量信息</td>
</tr>
<tr>
<td>usage.tool_usage.web_search</td>
<td>integer</td>
<td>实际调用联网搜索工具的次数，仅开启联网搜索时返回</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="%E6%9F%A5%E8%AF%A2%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">查询视频生成任务调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code class="lang-curl">curl -X GET https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks/cgt-2025**** \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;Authorization: Bearer $ARK_API_KEY&quot;
</code></pre>
<p>响应示例：</p>
<pre><code>{
  &quot;seed&quot;: 1321,
  &quot;execution_expires_after&quot;: 172800,
  &quot;usage&quot;: {
    &quot;completion_tokens&quot;: 411300,
    &quot;total_tokens&quot;: 411300
  },
  &quot;created_at&quot;: 1781506880,
  &quot;generate_audio&quot;: true,
  &quot;priority&quot;: 0,
  &quot;resolution&quot;: &quot;720p&quot;,
  &quot;content&quot;: {
    &quot;video_url&quot;: &quot;https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/doubao-********-*-*/02177450618834600000000000000000000ffffac182e0981948b.mp4?X-Tos-Algorithm=TOS4-HMAC-SHA256&amp;X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260326%2Fcn-beijing%2Ftos%2Frequest&amp;X-Tos-Date=20260326T063429Z&amp;X-Tos-Expires=86400&amp;X-Tos-Signature=996651633cd0632cead571bf9ebc6255ac698b9aa920442f0dc806c3ba56ebd4&amp;X-Tos-SignedHeaders=host&quot;
  },
  &quot;duration&quot;: 11,
  &quot;framespersecond&quot;: 24,
  &quot;updated_at&quot;: 1781507151,
  &quot;draft&quot;: false,
  &quot;model&quot;: &quot;T0101008&quot;,
  &quot;service_tier&quot;: &quot;default&quot;,
  &quot;id&quot;: &quot;cgt-20260615150116-wn2p4&quot;,
  &quot;status&quot;: &quot;succeeded&quot;,
  &quot;ratio&quot;: &quot;16:9&quot;
}
</code></pre><hr>
<p><span id="Hrya4y9k"></span></p>
<h2 id="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80" name="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E6%8E%A5%E5%8F%A3%E5%9C%B0%E5%9D%80">取消或删除视频生成任务接口地址</h2>
<p><span id="Hrya4y9k"></span></p>
<p>取消排队中的视频生成任务，或者删除视频生成任务记录。</p>
<p><strong>请求方法：</strong> DELETE</p>
<p><strong>接口URL：</strong> <code>https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks/{id}</code></p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0" name="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0">取消或删除视频生成任务请求参数</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>id</strong> <code>string</code> <code>必选</code></p>
<p>需要取消或者删除的视频生成任务。</p>
<p>任务状态不同，调用DELETE接口，执行的操作有所不同，具体说明如下：</p>
<table>
<thead>
<tr>
<th>当前任务状态</th>
<th>是否支持DELETE操作</th>
<th>操作含义</th>
<th>DELETE操作后任务状态</th>
</tr>
</thead>
<tbody>
<tr>
<td>queued</td>
<td>是</td>
<td>任务取消排队，任务状态被变更为cancelled。</td>
<td>cancelled</td>
</tr>
<tr>
<td>running</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>succeeded</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>failed</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>cancelled</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>expired</td>
<td>否</td>
<td>-</td>
<td>-</td>
</tr>
</tbody>
</table>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0" name="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E5%93%8D%E5%BA%94%E5%8F%82%E6%95%B0">取消或删除视频生成任务响应参数</h2>
<p><span id="Hrya4y9k"></span></p>
<p><strong>message</strong> <code>string</code> </p>
<p>请求处理结果的描述信息。</p>
<hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B" name="%E5%8F%96%E6%B6%88%E6%88%96%E5%88%A0%E9%99%A4%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90%E4%BB%BB%E5%8A%A1%E8%B0%83%E7%94%A8%E7%A4%BA%E4%BE%8B">取消或删除视频生成任务调用示例</h2>
<p><span id="Hrya4y9k"></span></p>
<p>请求示例：</p>
<pre><code>curl -X DELETE https://modelpool-api.talkingdata.com/model/openai/api/v3/contents/generations/tasks/cgt-2025**** \
  -H &quot;Content-Type: application/json&quot; \
  -H &quot;Authorization: Bearer $ARK_API_KEY&quot;
</code></pre><p>响应示例：</p>
<pre><code>{
    &quot;message&quot; : &quot;取消成功&quot;
}
</code></pre><hr>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E9%94%99%E8%AF%AF%E7%A0%81" name="%E9%94%99%E8%AF%AF%E7%A0%81">错误码</h2>
<table>
<thead>
<tr>
<th>HTTP 状态码</th>
<th>错误类型 Type</th>
<th>错误码 Code</th>
<th>错误信息 Message</th>
<th>含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>MissingParameter</td>
<td>The request failed because it is missing one or multiple required parameters. Request ID: {id}</td>
<td>请求缺少必要参数，请查阅 API 文档。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidParameter</td>
<td>One or more parameters specified in the request are not valid. Request ID: {id}</td>
<td>请求包含非法参数，请查阅 API 文档。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidParameter</td>
<td>The parameter instructions specified in the request are not valid: caching is not supported for instructions. Request id: {id}</td>
<td>Responses API 中，当配置过 instructions 字段信息，后续轮次无法配置 Caching 字段。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputTextRiskDetection</td>
<td>The request could not be processed because the input text includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输入文本可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputImageRiskDetection</td>
<td>The request could not be processed because the input image includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输入图片可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputTextRiskDetection</td>
<td>The request could not be processed because the output text includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输出文本可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputImageRiskDetection</td>
<td>The request could not be processed because the output image includes sensitive content that violates ContentSecurityDetection.ARKRequest ID:{id};CSDRequestId:{RequestId};Label:{Label};SubLabel:{SubLable}</td>
<td>风险识别产品检测到输出图片可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>ContentSecurityDetectionError</td>
<td>Internal error.ARKRequest ID:{id};CSDRequestId:{RequestId};CSDcode:{};CSDmessage:{}</td>
<td>风险识别产品请求失败。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>SensitiveContentDetected</td>
<td>The request failed because the input text may contain sensitive information.</td>
<td>输入文本可能包含敏感信息，请您使用其他 prompt。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>SensitiveContentDetected.SevereViolation</td>
<td>The request failed because the input text may contain severe violation information.</td>
<td>输入文本可能包含严重违规相关信息，请您使用其他 prompt。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>SensitiveContentDetected.Violence</td>
<td>The request failed because the input text may contain violence information.</td>
<td>输入文本可能包含激进行为相关信息，请您使用其他 prompt。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputTextSensitiveContentDetected</td>
<td>The request failed because the input text may contain sensitive information.Request ID: {id}</td>
<td>输入文本可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputImageSensitiveContentDetected</td>
<td>The request failed because the input image may contain sensitive information.Request ID: {id}</td>
<td>输入图像可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InputVideoSensitiveContentDetected</td>
<td>The request failed because the input video may contain sensitive information.</td>
<td>输入视频可能包含敏感信息，请您更换后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputTextSensitiveContentDetected</td>
<td>The request failed because the output may contain sensitive information.</td>
<td>生成的文字可能包含敏感信息，请您更换输入内容后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputImageSensitiveContentDetected</td>
<td>The request failed because the output image may contain sensitive information.</td>
<td>生成的图像可能包含敏感信息，请您更换输入内容后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutputVideoSensitiveContentDetected</td>
<td>The request failed because the output video may contain sensitive information.Request ID: {id}</td>
<td>生成的视频可能包含敏感信息，请您更换输入内容后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidParameter.{{Parameter}}</td>
<td>The specified parameter {{Parameter}} is invalid.</td>
<td>请求参数值不合法。请检查参数值的正确性后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>MissingParameter.{{Parameter}}</td>
<td>The required parameter {{Parameter}} is missing.</td>
<td>缺少必要的请求参数。请确认请求参数后重试。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>Duplicate.Tags.Key</td>
<td>The specified object of tags contains duplicate keys.</td>
<td>对象的标签存在重复Key。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError</td>
<td>MissingRole：Invalid message: {{Message}}</td>
<td>请求中的 messages 列表里，有消息体缺少 role 字段。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.UnknownRole</td>
<td>Unknow the role of message: {{Role}}</td>
<td>消息体中的 role 值不被支持，如user_。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.UnknownRole</td>
<td>The Inference role not found: {{Role}}</td>
<td>指定的 inference_role 未在配置中定义。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.InvalidImageDetail</td>
<td>Invalid image detail: {{Parameter}}</td>
<td>image_url 中的 detail 参数值无效，只接受 &quot;auto&quot;, &quot;high&quot;, &quot;low&quot;。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidArgumentError.InvalidPixelLimit</td>
<td>Customized min_pixels 100 is greater than max_pixels 50</td>
<td>用户自定义的图片像素限制（min_pixels, max_pixels）无效（例如 min_pixels &gt; max_pixels，或超出了服务配置的范围）。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidImageURL.EmptyURL</td>
<td>Empty base64 image url</td>
<td>传入的图片 URL 为空。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>InvalidImageURL.InvalidFormat</td>
<td>Invalid base64 image url</td>
<td>无法解析或处理图片，可能是 Base64 格式不正确、图片数据损坏或格式不支持。</td>
</tr>
<tr>
<td>400</td>
<td>BadRequest</td>
<td>OutofContextError</td>
<td>Total tokens of image and text exceed max message tokens.</td>
<td>当请求中包含图片时，文本和图片编码后的总 token 数超过了模型上下文长度限制。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>InvalidSubscription</td>
<td>Your account ({{account_identifier}}) does not have a valid coding plan subscription, or your subscription has expired. Please visit {{subscription_check_url}} to review your subscription status or complete the subscription or renewal process.</td>
<td>Coding Plan 套餐未订阅或已过期。</td>
</tr>
<tr>
<td>401</td>
<td>Unauthorized</td>
<td>AuthenticationError</td>
<td>The API key or AK/SK in the request is missing or invalid. Request ID: {id}</td>
<td>请求携带的 API Key 或 AK/SK 校验未通过，请您重新检查设置的鉴权凭证，或者查看 API 调用文档来排查问题。</td>
</tr>
<tr>
<td>401</td>
<td>Unauthorized</td>
<td>AuthenticationError</td>
<td>Unauthorized</td>
<td>请求中使用的 API Key 无效，或指定的 Model ID 不正确或不可访问。</td>
</tr>
<tr>
<td>401</td>
<td>Forbidden</td>
<td>InvalidAccountStatus</td>
<td>There is an issue with your account status. If you need assistance, please contact the platform administrators.</td>
<td>当前使用的账号异常。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.InvalidState</td>
<td>The specified context is in invalid state: InProgress.Request ID: {id}</td>
<td>请求所关联的Context ID处于非空闲状态，不可调用。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.ConflictedValidationSet</td>
<td>Operation is denied because it is not supported to configure ValidationSet and ValidationPercentage at the same time.</td>
<td>无法同时上传验证集和设置训练集取样为验证集百分比，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.PermissionDenied</td>
<td>Operation is denied because you are not permitted to access the specified configuration of the FoundationModel.</td>
<td>您没有权限访问基础模型的配置，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.UnsupportedCustomizationType</td>
<td>Operation is denied because the specified CustomizationType is not supported by the CustomModel.</td>
<td>模型不支持该训练方法，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.CustomizationNotSupported</td>
<td>Operation is denied because the specified version of the FoundationModel is not configured for the specified type of customization.</td>
<td>基础模型的版本不支持该训练方法，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.ServiceNotOpen</td>
<td>Operation is denied because the model service is unavailable, please go to the Volcano Ark console activation management page to activate the corresponding model service, or submit a work order to contact us.</td>
<td>模型服务不可用，不支持该操作。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>AccessDenied</td>
<td>The request failed because you do not have access to the requested resource. Request ID: {id}</td>
<td>没有访问该资源的权限，请检查权限设置。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.InvalidState</td>
<td>Operation is denied because the specified context is in invalid state: InProgress. Request id: {id}</td>
<td>请求的缓存信息状态是不可用状态。请查看缓存信息是否正在被更新中。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.UnsupportedPhase</td>
<td>Operation is denied because operation is not supported while the target is in its current phase.</td>
<td>操作失败，操作目标在特殊状态，请检查目标是否存在或者被锁定等特殊状态中。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.FileQuotaExceeded</td>
<td>Your account %s has exhausted its file storage quota. To continue using the service, please delete historical files.</td>
<td>当前账号 %s 已耗尽文件存储额度，如需继续使用，请删除历史文件。</td>
</tr>
<tr>
<td>403</td>
<td>Forbidden</td>
<td>OperationDenied.InvalidState</td>
<td>The specified file is in invalid state: InProgress.Request ID: {id}</td>
<td>请求所关联的File ID处于非可用状态，不可调用。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>InvalidEndpointOrModel.NotFound</td>
<td>The model or endpoint %s does not exist or you do not have access to it.</td>
<td>模型或者推理接入点 %s 不存在或者您无权访问它。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>ModelNotOpen</td>
<td>Your account %s has not activated the model %s. Please activate the model service in the Ark Console.</td>
<td>当前账号 %s 暂未开通 %s 模型服务。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>NotFound.{{Parameter}}</td>
<td>The specified {{ResourceType}} {{ResourceContent}} is not found.</td>
<td>指定资源找不到。请确认参数后重试。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>InvalidEndpointOrModel.ModelIDAccessDisabled</td>
<td>Accessing the model via Model ID is not allowed for your account. Please use a custom endpoint ID instead. Request id:{id}</td>
<td>未能找到指定的模型ID。你的账号不允许使用模型ID来调用模型，请确认你账号权限或者使用有权限的推理接入点 ID 来调用模型服务。</td>
</tr>
<tr>
<td>404</td>
<td>NotFound</td>
<td>UnsupportedModel</td>
<td>The {{model_name}} model does not support the coding plan feature. Please refer to the documentation at {{doc_url}} to select a compatible model.</td>
<td>当前模型不支持 Coding Plan。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>RateLimitExceeded.EndpointRPMExceeded</td>
<td>The Requests Per Minute (RPM) limit of the associated endpoint for your account has been exceeded. Request ID: {id}</td>
<td>请求所关联的推理接入点已超过 RPM (Requests Per Minute) 限制，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>RateLimitExceeded.EndpointTPMExceeded</td>
<td>The Tokens Per Minute (TPM) limit of the associated endpoint for your account has been exceeded. Request ID: {id}</td>
<td>请求所关联的推理接入点已超过 TPM (Tokens Per Minute) 限制，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ModelAccountRpmRateLimitExceeded</td>
<td>RPM (Requests Per Minute) limit of the model is exceeded. Request ID: {id}</td>
<td>请求已超过帐户模型 RPM (Requests Per Minute) 限制：请您稍后重试，或者联系平台技术同学进行解决。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ModelAccountTpmRateLimitExceeded</td>
<td>TPM (Tokens Per Minute) limit of the model is exceeded. Request ID: {id}</td>
<td>请求已超过帐户模型 TPM (Tokens Per Minute) 限制：请您稍后重试，或者联系平台技术同学进行解决。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>APIAccountRpmRateLimitExceeded</td>
<td>The RPM (Requests Per Minute) limit for the API on your account has been exceeded. Request ID: {id}</td>
<td>当前账号该接口的RPM (Requests Per Minute)限制已超出，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ModelAccountIpmRateLimitExceeded</td>
<td>IPM (Images Per Minute) limit of the model is exceeded.</td>
<td>请求已超过账户模型 IPM (Images Per Minute) 限制：请您稍后重试，或者联系平台技术同学进行解决。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>QuotaExceeded</td>
<td>Your account [%s] has exhausted its free trial quota for the [%s] model. Request ID: {id}</td>
<td>当前账号 %s 对 %s 模型的免费试用额度已消耗完毕。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>QuotaExceeded</td>
<td>The request has exceeded the quota. Request ID: {id}</td>
<td>当前账号处于排队中状态的任务数已超过限制，请稍后重试。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>ServerOverloaded</td>
<td>The service is currently unable to handle additional requests due to server overload. Please retry later. Request ID: {id}</td>
<td>服务资源紧张，请您稍后重试。常出现在调用流量突增或刚开始调用长时间未使用的推理接入点。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>SetLimitExceeded</td>
<td>Your account [%s] has reached the set inference limit for the [%s] model, and the model service has been paused. To continue using this model, please visit the Model Activation page to adjust or close the &quot;Safe Experience Mode&quot;. Request ID: {id}</td>
<td>当前账号 %s 对 %s 模型已达到设置的推理限额值。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>InflightBatchsizeExceeded</td>
<td>The Inflight Batchsize limit has been exceeded.Request ID: {id}</td>
<td>您已经达到当前充值金额下的最大并发数限制，您可以充值解锁更大并发额度或降低并发数。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>AccountRateLimitExceeded</td>
<td>Requests are too frequent. Please reduce your request frequency, wait a short moment, and retry your request.</td>
<td>请求超出RPM / TPM限制。</td>
</tr>
<tr>
<td>429</td>
<td>TooManyRequests</td>
<td>QuotaExceeded</td>
<td>You have exceeded the 5-hour/weekly/monthly usage quota. It will reset at {{reset_time}}.</td>
<td>使用的额度超出5小时/周/月限额。</td>
</tr>
<tr>
<td>500</td>
<td>InternalServerError</td>
<td>InternalServiceError</td>
<td>The service encountered an unexpected internal error. Please retry later. Request ID: {id}</td>
<td>内部系统异常，请您稍后重试。</td>
</tr>
</tbody>
</table>
<p><span id="7P96iLnc"></span></p>
<h2 id="%E5%85%AC%E5%85%B1%E9%94%99%E8%AF%AF%E7%A0%81" name="%E5%85%AC%E5%85%B1%E9%94%99%E8%AF%AF%E7%A0%81">公共错误码</h2>
<table>
<thead>
<tr>
<th>Code</th>
<th>CodeN</th>
<th>Message</th>
<th>错误说明及解决方式</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>MissingParameter</td>
<td>100002</td>
<td>The request is missing %s parameter.</td>
<td>关键参数缺失，例如Action, Version参数缺失。请参考API文档补充Action或Version参数。</td>
<td>400</td>
</tr>
<tr>
<td>MissingRequestInfo</td>
<td>100004</td>
<td>The request is missing %s information.</td>
<td>缺少请求必要信息，例如：X-Date</td>
<td>400</td>
</tr>
<tr>
<td>InvalidTimestamp</td>
<td>100006</td>
<td>The Signature of the request is expired.</td>
<td>请求过期或请求的签名时间来自未来。请检查本地时间是否正常，以及是否使用了UTC时间，精确到秒，使用遵循ISO 8601标准的格式：<code>YYYYMMDD&#39;T&#39;HHMMSS&#39;Z&#39;</code>。</td>
<td>400</td>
</tr>
<tr>
<td>ServiceNotFound</td>
<td>100007</td>
<td>This service[%s] not found.</td>
<td>请求的服务不存在。请参考产品的API文档检+查Service是否完全填写正确。</td>
<td>404</td>
</tr>
<tr>
<td>InvalidActionOrVersion</td>
<td>100008</td>
<td>Could not find operation %s for version %s.</td>
<td>请求接口不存在。请参考产品的API文档检查Action是否完全填写正确。</td>
<td>404</td>
</tr>
<tr>
<td>InvalidAccessKey</td>
<td>100009</td>
<td>The accesskey [%s] included in the request is invalid.</td>
<td>请求的Access Key不合法。请检查Access key Id和Secret Access Key是否正确，注意不要有多余的空格符号。</td>
<td>401</td>
</tr>
<tr>
<td>SignatureDoesNotMatch</td>
<td>100010</td>
<td>The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. Consult the service documentation for details.</td>
<td>签名结果不正确。检查签名步骤，建议使用SDK，避免自行编码构造签名。</td>
<td>401</td>
</tr>
<tr>
<td>AccessDenied</td>
<td>100013</td>
<td>User is not authorized to perform: %s on resource: %s.</td>
<td>子用户拥有的权限不支持当前操作。</td>
<td>403</td>
</tr>
<tr>
<td>InternalError</td>
<td>100014</td>
<td>Service has some internal Error. Pls Contact With Admin.</td>
<td>内部错误。</td>
<td>500</td>
</tr>
<tr>
<td>InternalServiceTimeout</td>
<td>100016</td>
<td>Internal Service is timeout. Pls Contact With Admin.</td>
<td>服务执行超时。</td>
<td>504</td>
</tr>
<tr>
<td>FlowLimitExceeded</td>
<td>100018</td>
<td>Request was rejected because the request speed of this openAPI is beyond the current flow control limit.</td>
<td>请求过于频繁，超出了限速。请降低请求QPS，</td>
<td>429</td>
</tr>
<tr>
<td>ServiceUnavailableTemp</td>
<td>100019</td>
<td>Service is busy, please try again later.</td>
<td>处于熔断状态的服务暂时不可访问，稍后重试。</td>
<td>503</td>
</tr>
<tr>
<td>InternalServiceError</td>
<td>100023</td>
<td>Service has some internal Error. Pls Contact With Admin.</td>
<td>服务存在故障。</td>
<td>502</td>
</tr>
<tr>
<td>InvalidAuthorization</td>
<td>100024</td>
<td>Invalid &#39;Authorization&#39; header, Pls check authorization header.</td>
<td>Authorization头格式错误，构造的 Authorization Header 不正确，比如没有填 Region 字段、字符不在合法字符集中，请检查Authorization。建议使用SDK，避免自行编码构造签名。</td>
<td>400</td>
</tr>
<tr>
<td>InvalidCredential</td>
<td>100025</td>
<td>Invalid credential in &#39;Authorization&#39;, Pls check credential in authorization header.</td>
<td>Authorization头中的Credential格式错误，比如 AK 不在合法字符集中检查Credential。建议使用SDK，避免自行编码构造签名。</td>
<td>400</td>
</tr>
<tr>
<td>InvalidSecretToken</td>
<td>100026</td>
<td>Invalid secret token, msg: %s.</td>
<td>错误的STS（临时安全凭证），可能是多种错误，例如签名错误、过期等。请检查AssumeRole产生的临时凭证是否过期，以及签名是正确，建议使用SDK，避免自行编码构造签名。</td>
<td>401</td>
</tr>
</tbody>
</table>
]]></content:encoded>
      <pubDate>Wed, 29 Jul 2026 15:37:35 +0800</pubDate>
      <guid>http://doc.talkingdata.com/posts/1267</guid>
      <comments>http://doc.talkingdata.com/posts/1267#comments</comments>
    </item>
  </channel>
</rss>