文档中心
火山方舟
火山方舟
文档指南
请输入
入门
产品简介
快速入门
模型列表
模型价格
最新模型:Seed-Evolving
Agent 场景模型调用的正确姿势
调用
文本生成
多模态理解
图片理解
视频理解
文档理解
音频理解
视频生成
Doubao Seedance 2.5 教程
Doubao Seedance 2.5 提示词指南
Doubao Seedance 2.0 系列教程
Doubao Seedance 2.0 系列提示词指南
视频生成教程
Doubao Seedance 便利创作含肖像视频
图片生成
Doubao Seedream 5.0 pro 教程
Doubao Seedream 5.0 pro 实现交互编辑指南
图片生成教程
领域模型
3D 生成
向量化
工具调用
工具概述
豆包助手
Web Search(联网内容插件)
Image Process(图像处理)
私域知识库搜索 Knowledge Search
云部署 MCP / Remote MCP
Function Calling(函数调用)
进阶使用
深度思考
上下文管理
流式输出
续写模式
上下文缓存
原理及选型
上下文缓存(Context API)
使用 Prompt Cache Key 提升缓存命中率
文件输入(File API)
GUI Agent 能力
视觉定位 Grounding
提示词工程
结构化输出(beta)
接入三方工具
使用 Responses API
迁移至 Responses API
文本生成
深度思考
多模态理解
工具调用
上下文缓存
结构化输出(beta)
上下文编辑
火山方舟
调用
进阶使用
深度思考
复制全文
下载 pdf
进阶使用
深度思考
复制全文
下载 pdf
深度思考
文档反馈
深度思考指模型在回答前,对问题进行分析及多步骤规划,再尝试解决问题。擅长处理编程、科学推理、智能体工作流等复杂及抽象场景。启用深度思考后,会在指定字段返回思维链内容,可基此观察和使用模型推导内容。
说明
方舟平台的新用户?获取 API Key 及 开通模型等准备工作,请参见
快速入门
。
快速开始
输入
思维链
回答
输入
思维链
回答
Plain
复制
我要研究深度思考模型与非深度思考模型区别的课题,怎么体现我的专业性
Plain
复制
用户现在要做深度思考模型和非深度思考模型区别的课题,需要体现专业性。首先得明确,专业性体现在哪里?
...
要在“深度思考模型与非深度思考模型区别”的课题中体现专业性,核心在于 **严谨的概念界定、系统的对比框架、科学的方法论支撑、以及深度的理论与实践结合** 。以下是具体的实施路径,从研究框架到细节落地,帮你构建专业的研究体系:
Plain
复制
### **一、第一步:明确概念边界——避免泛化,精准定义**
专业性的起点是 **清晰的概念界定** ,避免将“深度模型”等同于“深度思考模型”,也避免将“非深度模型”简化为“传统模型”。需基于学术共识和研究目标给出操作性定义:
...
通过以上路径,你的课题将从“表面对比”升级为“本质穿透”,充分体现专业性与研究深度。祝你研究顺利!
示例代码
Curl
Python
Go
Java
OpenAI SDK
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/chat/completions \
-H
"Content-Type: application/json"
\
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-d
'{
"model": "doubao-seed-2-1-pro-260628",
"messages": [
{
"role": "user",
"content": "我要研究深度思考模型与非深度思考模型区别的课题,怎么体现我的专业性"
}
]
}'
您可按需替换 Model ID。Model ID 查询见
模型列表
。
Python
复制
import
os
# Install SDK: pip install 'volcengine-python-sdk[ark]'
from
volcenginesdkarkruntime
import
Ark
client = Ark(
# The base URL for model invocation
base_url=
"https://ark.cn-beijing.volces.com/api/v3"
,
# Get API Key: https://console.volcengine.com/ark/region:cn-beijing/apikey
api_key=os.getenv(
'ARK_API_KEY'
),
# Deep thinking takes longer; set a larger timeout, with 1,800 seconds or more recommended
timeout=
1800
,
)
completion = client.chat.completions.create(
# Replace with Model ID
model =
"doubao-seed-2-1-pro-260628"
,
messages=[
{
"role"
:
"user"
,
"content"
:
"我要研究深度思考模型与非深度思考模型区别的课题,怎么体现我的专业性"
}
]
)
# When deep thinking is triggered, print the chain-of-thought content
if
hasattr
(completion.choices[
0
].message,
'reasoning_content'
):
print
(completion.choices[
0
].message.reasoning_content)
print
(completion.choices[
0
].message.content)
Go
复制
package
main
import
(
"context"
"fmt"
"os"
"time"
"github.com/volcengine/volcengine-go-sdk/service/arkruntime"
"github.com/volcengine/volcengine-go-sdk/service/arkruntime/model"
"github.com/volcengine/volcengine-go-sdk/volcengine"
)
func
main
()
{
client := arkruntime.NewClientWithApiKey(
// Get API Key: https://console.volcengine.com/ark/region:cn-beijing/apikey
os.Getenv(
"ARK_API_KEY"
),
// The base URL for model invocation
arkruntime.WithBaseUrl(
"https://ark.cn-beijing.volces.com/api/v3"
),
// Deep thinking takes longer; set a larger timeout, with 1,800 seconds or more recommended
arkruntime.WithTimeout(
30
*time.Minute),
)
ctx := context.Background()
req := model.CreateChatCompletionRequest{
// Replace with Model ID
Model:
"doubao-seed-2-1-pro-260628"
,
Messages: []*model.ChatCompletionMessage{
{
Role: model.ChatMessageRoleUser,
Content: &model.ChatCompletionMessageContent{
StringValue: volcengine.String(
"我要研究深度思考模型与非深度思考模型区别的课题,怎么体现我的专业性"
),
},
},
},
}
resp, err := client.CreateChatCompletion(ctx, req)
if
err !=
nil
{
fmt.Printf(
"standard chat error: %v\n"
, err)
return
}
// When deep thinking is triggered, print the chain-of-thought content
if
resp.Choices[
0
].Message.ReasoningContent !=
nil
{
fmt.Println(*resp.Choices[
0
].Message.ReasoningContent)
}
fmt.Println(*resp.Choices[
0
].Message.Content.StringValue)
}
Java
复制
package
com.ark.sample;
import
com.volcengine.ark.runtime.model.completion.chat.ChatCompletionContentPart;
import
com.volcengine.ark.runtime.model.completion.chat.ChatCompletionRequest;
import
com.volcengine.ark.runtime.model.completion.chat.ChatMessage;
import
com.volcengine.ark.runtime.model.completion.chat.ChatMessageRole;
import
com.volcengine.ark.runtime.service.ArkService;
import
java.util.*;
import
java.util.concurrent.TimeUnit;
import
java.time.Duration;
public
class
ChatCompletionsExample
{
public
static
void
main
(String[] args)
{
// Get API Key: https://console.volcengine.com/ark/region:cn-beijing/apikey
String
apiKey
=
System.getenv(
"ARK_API_KEY"
);
ArkService
arkService
=
ArkService.builder()
.apiKey(apiKey)
.timeout(Duration.ofMinutes(
30
))
// Deep thinking takes longer; set a larger timeout, with 1,800 seconds or more recommended
.baseUrl(
"https://ark.cn-beijing.volces.com/api/v3"
)
// The base URL for model invocation
.build();
List<ChatMessage> chatMessages =
new
ArrayList
<>();
ChatMessage
userMessage
=
ChatMessage.builder()
.role(ChatMessageRole.USER)
.content(
"我要研究深度思考模型与非深度思考模型区别的课题,怎么体现我的专业性"
)
.build();
chatMessages.add(userMessage);
ChatCompletionRequest
chatCompletionRequest
=
ChatCompletionRequest.builder()
.model(
"doubao-seed-2-1-pro-260628"
)
//Replace with Model ID
.messages(chatMessages)
.build();
try
{
arkService.createChatCompletion(chatCompletionRequest)
.getChoices()
.forEach(choice -> {
if
(choice.getMessage().getReasoningContent() !=
null
) {
System.out.println(choice.getMessage().getReasoningContent());
}
System.out.println(choice.getMessage().getContent());
});
}
catch
(Exception e) {
System.out.println(e.getMessage());
}
finally
{
// Shut down the service executor
arkService.shutdownExecutor();
}
}
}
Python
复制
import
os
from
openai
import
OpenAI
client = OpenAI(
# Get API Key: https://console.volcengine.com/ark/region:cn-beijing/apikey
api_key=os.environ.get(
"ARK_API_KEY"
),
base_url=
"https://ark.cn-beijing.volces.com/api/v3"
,
# Deep thinking takes longer; set a larger timeout, with 1,800 seconds or more recommended
timeout=
1800
,
)
completion = client.chat.completions.create(
# Replace with Model ID
model =
"doubao-seed-2-1-pro-260628"
,
messages=[
{
"role"
:
"user"
,
"content"
:
"我要研究深度思考模型与非深度思考模型区别的课题,怎么体现我的专业性"
}
]
)
# When deep thinking is triggered, print the chain-of-thought content
if
hasattr
(completion.choices[
0
].message,
'reasoning_content'
):
print
(completion.choices[
0
].message.reasoning_content)
print
(completion.choices[
0
].message.content)
模型及 API
支持的模型:
深度思考能力
。
支持的 API:
Responses API
:新推出的 API,简洁上下文管理,增强工具调用能力,缓存能力降低成本,新业务及用户推荐。
Chat API
:使用广泛的 API,存量业务迁移成本低。
基础使用
多轮对话
组合使用系统消息、模型消息以及用户消息,可以实现多轮对话。当需要持续在一个主题内对话,可以将历史轮次的对话记录输入给模型。
传入方式
手动管理上下文
通过ID管理上下文
传入方式
手动管理上下文
通过ID管理上下文
使用示例
JSON
复制
...
"model"
:
"doubao-seed-2-1-pro-260628"
,
"messages"
:[
{
"role"
:
"user"
,
"content"
:
"Hi, tell a joke."
},
{
"role"
:
"assistant"
,
"content"
:
"Why did the math book look sad? Because it had too many problems! 😄"
},
{
"role"
:
"user"
,
"content"
:
"What's the punchline of this joke?"
}
]
...
JSON
复制
...
"model"
:
"doubao-seed-2-1-pro-260628"
,
"previous_response_id"
:
"<id>"
,
"input"
:
"What is the punchline of this joke?"
...
API
Chat API
Responses API
在构建多轮对话的上下文时:
模型版本在
251228
之前:剔除历史对话的
reasoning_content
字段,仅保留
role
和
content
。方舟会尝试忽略该字段,但显式剔除能确保请求结构的正确性。
doubao-seed-1.8
及后续模型:保留历史对话的
reasoning_content
字段,由模型自行判断是否将该字段加入到推理输入中。
更多说明及完整示例请参见
上下文管理
。
流式输出
随着大模型输出,动态输出内容,无需等待模型推理完毕,即可看到中间输出过程内容。
预览
优势
预览
优势
Replay
Play
00:00
/
00:13
Live
00:00
Fullscreen
Cssfullscreen
1x
2x
1.5x
1x
0.75x
0.5x
Click and hold to drag
改善等待体验
:无需等待完整内容生成完毕,可立即处理过程内容。
实时过程反馈
:多轮交互场景,实时了解任务当前的处理阶段。
更高的容错性
:中途出错,也能获取到已生成内容,避免非流式输出失败无返回的情况。
简化超时管理
:保持客户端与服务端的连接状态,避免复杂任务耗时过长而连接超时。
通过配置
stream
为
true
,来启用流式输出。
JSON
复制
"model"
:
"doubao-seed-2-1-pro-260628"
,
"messages"
:
[
{
"role"
:
"user"
,
"content"
:
"深度思考模型与非深度思考模型区别"
}
],
"stream"
:
true
完整示例及更多说明请参见
流式输出
。
开启/关闭深度思考
提供
thinking
字段控制是否关闭深度思考能力,实现“复杂任务深度推理,简单任务高效响应”的精细控制,获得成本、效率收益。
取值说明:
enabled
:强制开启,强制开启深度思考能力。
disabled
:强制关闭深度思考能力。
auto
:模型自行判断是否进行深度思考。
示例代码:
Curl
Python
Go
Java
OpenAI SDK
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/chat/completions \
-H
"Content-Type: application/json"
\
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-d
'{
"model": "doubao-seed-2-1-pro-260628",
"messages": [
{
"role": "user",
"content": [
{
"type":"text",
"text":"我要研究深度思考模型与非深度思考模型区别的课题,体现出我的专业性"
}
]
}
],
"thinking":{
"type":"disabled"
}
}'
model
:请变更为实际调用的模型。
thinking.type
:字段可以取值范围。
disabled
:强制关闭深度思考能力,模型不输出思维链内容。
enabled
:强制开启深度思考能力,模型强制输出思维链内容。
auto
:模型自行判断是否需要进行深度思考。
Python
复制
import
os
# Install SDK: pip install 'volcengine-python-sdk[ark]'
from
volcenginesdkarkruntime
import
Ark
client = Ark(
# The base URL for model invocation
base_url=
"https://ark.cn-beijing.volces.com/api/v3"
,
# Get API Key: https://console.volcengine.com/ark/region:cn-beijing/apikey
api_key=os.getenv(
'ARK_API_KEY'
),
# Deep thinking takes longer; set a larger timeout, with 1,800 seconds or more recommended
timeout=
1800
,
)
# 创建一个对话请求
completion = client.chat.completions.create(
# Replace with Model ID
model=
"doubao-seed-2-1-pro-260628"
,
messages=[
{
"role"
:
"user"
,
"content"
:
"我要研究深度思考模型与非深度思考模型区别的课题,体现出我的专业性"
}
],
thinking={
"type"
:
"disabled"
,
# 不使用深度思考能力
# "type": "enabled", # 使用深度思考能力
# "type": "auto", # 模型自行判断是否使用深度思考能力
},
)
print
(completion)
Go
复制
package
main
import
(
"context"
"fmt"
"os"
"time"
"github.com/volcengine/volcengine-go-sdk/service/arkruntime"
"github.com/volcengine/volcengine-go-sdk/service/arkruntime/model"
"github.com/volcengine/volcengine-go-sdk/volcengine"
)
func
main
()
{
client := arkruntime.NewClientWithApiKey(
// Get API Key: https://console.volcengine.com/ark/region:cn-beijing/apikey
os.Getenv(
"ARK_API_KEY"
),
// The base URL for model invocation
arkruntime.WithBaseUrl(
"https://ark.cn-beijing.volces.com/api/v3"
),
//深度思考耗时更长,请设置更大的超时限制,推荐为30分钟及以上
arkruntime.WithTimeout(
30
*time.Minute),
)
// 创建一个上下文,通常用于传递请求的上下文信息,如超时、取消等
ctx := context.Background()
// 构建聊天完成请求,设置请求的模型和消息内容
req := model.CreateChatCompletionRequest{
// Replace with Model ID
Model:
"doubao-seed-2-1-pro-260628"
,
Messages: []*model.ChatCompletionMessage{
{
// 消息的角色为用户
Role: model.ChatMessageRoleUser,
Content: &model.ChatCompletionMessageContent{
StringValue: volcengine.String(
"我要研究深度思考模型与非深度思考模型区别的课题,怎么体现我的专业性"
),
},
},
},
Thinking: &model.Thinking{
Type: model.ThinkingTypeDisabled,
// 关闭深度思考能力
// Type: model.ThinkingTypeEnabled, //开启深度思考能力
// Type: model.ThinkingTypeAuto, //模型自行判断是否使用深度思考能力
},
}
// 发送聊天完成请求,并将结果存储在 resp 中,将可能出现的错误存储在 err 中
resp, err := client.CreateChatCompletion(ctx, req)
if
err !=
nil
{
// 若出现错误,打印错误信息并终止程序
fmt.Printf(
"standard chat error: %v\n"
, err)
return
}
// 检查是否触发深度思考,触发则打印思维链内容
if
resp.Choices[
0
].Message.ReasoningContent !=
nil
{
fmt.Println(*resp.Choices[
0
].Message.ReasoningContent)
}
// 打印聊天完成请求的响应结果
fmt.Println(*resp.Choices[
0
].Message.Content.StringValue)
}
Java
复制
package
com.ark.sample;
import
com.volcengine.ark.runtime.model.completion.chat.*;
import
com.volcengine.ark.runtime.service.ArkService;
import
java.time.Duration;
import
java.util.ArrayList;
import
java.util.List;
/**
* 这是一个示例类,展示了如何使用ArkService来完成聊天功能。
*/
public
class
ChatCompletionsExample
{
public
static
void
main
(String[] args)
{
// 从环境变量中获取API密钥
String
apiKey
=
System.getenv(
"ARK_API_KEY"
);
// 创建ArkService实例
ArkService
arkService
=
ArkService.builder()
.apiKey(apiKey)
.timeout(Duration.ofMinutes(
30
))
// 深度思考耗时更长,请设置更大的超时限制,推荐为30分钟及以上
// The base URL for model invocation
.baseUrl(
"https://ark.cn-beijing.volces.com/api/v3"
)
.build();
// 初始化消息列表
List<ChatMessage> chatMessages =
new
ArrayList
<>();
// 创建用户消息
ChatMessage
userMessage
=
ChatMessage.builder()
.role(ChatMessageRole.USER)
// 设置消息角色为用户
.content(
"我要研究深度思考模型与非深度思考模型区别的课题,怎么体现我的专业性"
)
// 设置消息内容
.build();
// 将用户消息添加到消息列表
chatMessages.add(userMessage);
ChatCompletionRequest
chatCompletionRequest
=
ChatCompletionRequest.builder()
.model(
"doubao-seed-2-1-pro-260628"
)
//Replace with Model ID
.messages(chatMessages)
// 设置消息列表
.thinking(
new
ChatCompletionRequest
.ChatCompletionRequestThinking(
"disabled"
))
.build();
// 发送聊天完成请求并打印响应
try
{
// 获取响应并打印每个选择的消息内容
arkService.createChatCompletion(chatCompletionRequest)
.getChoices()
.forEach(choice -> {
// 校验是否触发了深度思考,打印思维链内容
if
(choice.getMessage().getReasoningContent() !=
null
) {
System.out.println(
"推理内容: "
+ choice.getMessage().getReasoningContent());
}
else
{
System.out.println(
"推理内容为空"
);
}
// 打印消息内容
System.out.println(
"消息内容: "
+ choice.getMessage().getContent());
});
}
catch
(Exception e) {
System.out.println(
"请求失败: "
+ e.getMessage());
}
finally
{
// 关闭服务执行器
arkService.shutdownExecutor();
}
}
}
Python
复制
import
os
from
openai
import
OpenAI
client = OpenAI(
# 从环境变量中读取方舟API Key
api_key=os.environ.get(
"ARK_API_KEY"
),
base_url=
"https://ark.cn-beijing.volces.com/api/v3"
,
# 深度思考耗时更长,避免连接超时导致失败,请设置更大的超时限制,推荐为1800 秒及以上
timeout=
1800
,
)
completion = client.chat.completions.create(
# Replace with Model ID
model =
"doubao-seed-2-1-pro-260628"
,
messages=[
{
"role"
:
"user"
,
"content"
:
"我要研究深度思考模型与非深度思考模型区别的课题,体现出我的专业性"
,
}
],
extra_body={
"thinking"
: {
"type"
:
"disabled"
,
# 不使用深度思考能力
# "type": "enabled", # 使用深度思考能力
# "type": "auto", # 模型自行判断是否使用深度思考能力
}
},
)
print
(completion)
支持模型:
doubao-seed-evolving:支持
enabled
(默认)、
disabled
。
doubao-seed-2-1-pro-260628:支持
enabled
(默认)、
disabled
。
doubao-seed-2-1-turbo-260628:支持
enabled
(默认)、
disabled
。
doubao-seed-2-0-lite-260428:支持
enabled
(默认)、
disabled
。
doubao-seed-2-0-mini-260428:支持
enabled
(默认)、
disabled
。
doubao-seed-2-0-pro-260215:支持
enabled
(默认)、
disabled
。
doubao-seed-2-0-lite-260215:支持
enabled
(默认)、
disabled
。
doubao-seed-2-0-mini-260215:支持
enabled
(默认)、
disabled
。
doubao-seed-2-0-code-preview-260215:支持
enabled
(默认)、
disabled
。
doubao-seed-1-8-251228:支持
enabled
(默认)、
disabled
。
glm-5-2-260617:支持
enabled
(默认)、
disabled
。
glm-4-7-251222:支持
enabled
(默认)、
disabled
。
doubao-seed-character-260628:支持
enabled
(默认)、
disabled
。
doubao-seed-code-preview-251028:支持
enabled
(默认)、
disabled
。
doubao-seed-1-6-vision-250815:支持
enabled
(默认)、
disabled
。
doubao-seed-1-6-250615:支持
enabled
(默认)、
disabled
、
auto
。
doubao-seed-1-6-251015:支持
enabled
(默认)、
disabled
。
doubao-seed-1-6-flash-250828:支持
enabled
(默认)、
disabled
。
doubao-seed-1-6-flash-250615:支持
enabled
(默认)、
disabled
。
deepseek-v4-pro-ga-260813:支持
enabled
(默认)、
disabled
。
deepseek-v4-flash-ga-260731:支持
enabled
(默认)、
disabled
。
deepseek-v4-pro-260425:支持
enabled
(默认)、
disabled
。
deepseek-v4-flash-260425:支持
enabled
(默认)、
disabled
。
更多说明
Responses API 使用说明请参见
控制深度思考
。
深度思考会影响续写模式,详细信息请参见
续写模式
。
设置最大输出长度
模型输出内容由
思维链(Chain of Thought, COT)
和
最终回答(Answer)
两部分组成。合理控制模型输出长度,平衡效果、速度、成本与稳定性。
传入方式
手动管理上下文
通过ID管理上下文
传入方式
手动管理上下文
通过ID管理上下文
API
Chat API
Responses API
示例
JSON
复制
...
"model"
:
"doubao-seed-2-1-pro-260628"
,
"messages"
:
[
{
"role"
:
"user"
,
"content"
:
"Hi, tell a joke."
}
],
"max_completion_tokens"
:
300
...
JSON
复制
...
"model"
:
"doubao-seed-2-1-pro-260628"
,
"previous_response_id"
:
"<id>"
,
"input"
:
"Hi, tell a joke."
,
"max_output_tokens"
:
300
...
完整示例及更多说明请参见
控制输出(回答+思维链)长度
。
调节思考长度
提供字段
reasoning_effort
(Chat API)、
reasoning.effort
(Responses API)调节思维链长度,平衡不同场景对效果、时延、成本的需求。取值如下:
none
:关闭思考。该参数仅对指定模型生效,非适配模型传入将不生效。支持模型:
glm-5-2-260617
。
minimal
:关闭思考,直接回答。
low
:轻量思考,侧重快速响应。
medium
(默认值):均衡模式,兼顾速度与深度。
high
:深度分析,处理复杂问题。
xhigh
:更高程度思考。该参数仅对指定模型生效,非适配模型传入将不生效。支持模型:
glm-5-2-260617
。
max
:最高程度思考,适配高难度推理任务。该参数仅对指定模型生效,非适配模型传入将不生效。支持模型列表:
glm-5-2-260617
deepseek-v4-pro-ga-260813
(目前仅支持 Chat API,Responses API 待支持)
deepseek-v4-flash-ga-260731
(目前仅支持 Chat API,Responses API 待支持)
deepseek-v4-pro-260425
(目前仅支持 Chat API,Responses API 待支持)
deepseek-v4-flash-260425
(目前仅支持 Chat API,Responses API 待支持)
注意
reasoning_effort
(Chat API)、
reasoning.effort
(Responses API)的默认取值为
medium
。
以下模型的默认取值为
high
:
doubao-seed-evolving
doubao-seed-2-1-pro-260628
doubao-seed-2-1-turbo-260628
deepseek-v4-pro-ga-260813
deepseek-v4-flash-ga-260731
deepseek-v4-pro-260425
deepseek-v4-flash-260425
glm-5-2-260617
默认取值为
max
。为保证兼容性,会对该模型部分取值进行处理:
传入
minimal
:关闭思考;
传入
low
/
medium
:按
high
等效处理;
传入
xhigh
:按
max
等效处理。
API
Chat API
Responses API
API
Chat API
Responses API
示例
JSON
复制
...
"model"
:
"doubao-seed-2-1-pro-260628"
,
"messages"
:
[
{
"role"
:
"user"
,
"content"
:
"What are some common cruciferous plants?"
}
],
"reasoning_effort"
:
"low"
...
JSON
复制
...
"model"
:
"doubao-seed-2-1-pro-260628"
,
"input"
:
[
{
"role"
:
"user"
,
"content"
:
"What are some common cruciferous plants?"
}
],
"reasoning"
:{
"effort"
:
"low"
}
...
支持模型
doubao-seed-evolving
doubao-seed-2-1-pro-260628
doubao-seed-2-1-turbo-260628
doubao-seed-2-0-lite-260428
doubao-seed-2-0-mini-260428
doubao-seed-2-0-pro-260215
doubao-seed-2-0-lite-260215
doubao-seed-2-0-mini-260215
doubao-seed-2-0-code-preview-260215
doubao-seed-1-8-251228
doubao-seed-1-6-251015
doubao-seed-character-260628
glm-5-2-260617
deepseek-v4-pro-ga-260813
deepseek-v4-flash-ga-260731
deepseek-v4-pro-260425
deepseek-v4-flash-260425
doubao-seed-evolving
doubao-seed-2-1-pro-260628
doubao-seed-2-1-turbo-260628
doubao-seed-2-0-lite-260428
doubao-seed-2-0-mini-260428
doubao-seed-2-0-pro-260215
doubao-seed-2-0-lite-260215
doubao-seed-2-0-mini-260215
doubao-seed-2-0-code-preview-260215
doubao-seed-1-8-251228
doubao-seed-1-6-251015
doubao-seed-character-260628
glm-5-2-260617
完整示例及说明请参见
控制思维链长度
。
输出思考内容摘要
支持模型
doubao-seed-evolving
doubao-seed-2-1-pro-260628
doubao-seed-2-1-turbo-260628
doubao-seed-2-0-lite-260428
使用说明
默认会开启 thinking summary 能力,不会输出模型原始的思考内容,会返回模型思考内容摘要(
choices.message.reasoning_content
)、思考内容加密原文(
choices.message.encrypted_content
)。
说明
默认开启 thinking summary 能力后,可能会有较高的包间延迟,请调大请求超时时间(
timeout
),并做好兼容适配。
字段说明:
reasoning_effort
:仅作用于模型的原始思考内容,不适用于思考摘要。
usage.completion_tokens_details.reasoning_tokens
:为原始思考内容的 tokens,计费仍然按原始思考内容 token 计算。
回传思考内容
在工具调用场景,需要回传思考内容,回传注意事项如下。回传思考内容示例参见
回传思考内容加密原文
。
回传
encrypted_content
、
reasoning_content
字段:
encrypted_content
字段优先级高,会忽略
reasoning_content
中的内容。其中
encrypted_content
内容必须为有效内容,如果被篡改则无法还原。
仅回传
reasoning_content
字段:使用思考内容摘要参与模型推理。在多轮工具调用场景(如 agent 场景),如果没有回传
encrypted_content
字段,将导致模型推理效果下降。
未回传思考内容相关字段:不会报错。
工具调用
doubao-seed-1.8 之前的模型在工具调用场景中开启深度思考后,会直接丢弃思维链内容。doubao-seed-1.8 及部分模型为给出更详尽准确的回答,将不会直接丢弃思维链内容,思维链内容可能参与后续轮次推理,输入 tokens 会增加,具体参见
工作原理
。
说明
推荐在 Responses API 中使用 previous_response_id,平台自动保存历史对话的上下文,并在多轮交互中回传给推理服务。
回传思考内容加密原文
Seed 系列 lite 模型在 260428 及后续版本中默认会开启 thinking summary 能力,不会输出模型原始的思考内容。以下是在工具调用场景,回传思考内容加密原文的示例。其中使用 Responses API 推荐使用 previous_responses_id 自动获取原始思考内容并回传给模型参与推理。
API
Chat API
Responses API
API
Chat API
Responses API
支持模型及说明
支持模型
回传思考内容
支持模型
回传思考内容
示例
第一轮请求:触发工具调用
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/chat/completions \
-H
"Content-Type: application/json"
\
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-d
'{
"model": "doubao-seed-2-0-lite-260215",
"messages": [
{
"role": "system",
"content": "你是人工智能助手。"
},
{
"role": "user",
"content": "今天北京天气怎么样"
}
],
"thinking":{"type": "enabled"},
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "天气查询",
"parameters": {
"properties": {
"location": {
"description": "地点的位置信息,例如北京、上海。",
"type": "string"
}
},
"required": [
"location"
],
"type": "object"
}
}
}
]
}'
第一轮响应:返回工具调用指令
模型会返回
encrypted_content
、
reasoning_content
、
tool_calls
等关键字段。
Bash
复制
{
"choices"
: [
{
"finish_reason"
:
"tool_calls"
,
"index"
: 0,
"logprobs"
: null,
"message"
: {
"content"
:
""
,
"reasoning_content"
:
"北京天气查询将由我调用相关工具完成。\n"
,
"encrypted_content"
:
"djF+2EICEj3ryfEfSUdR/SmS8OeEH4znOYftL4SWDXR8uxROjx11W7rRCj5ArLwzsm7rFsO4frOdLm2p3/yWz/r0TMqrjHiaTTvRMNdV6sLdETySlb3PDgY1W+zuYuETiq3bQuxga5jKx+GpfvlDJMfJfzq/G1kDp6ryurs0rKAFIziyc4mfFSh2CzDKNcAcp5Fi5R7M2QrSYmIUJjnoB48IVUCzu4xn7bT05qheVnGO9fbs15gYK3zINUvVsp51Oq72U/ksrPZFVs2BTgNRwjmxnFNn7A=="
,
"role"
:
"assistant"
,
"tool_calls"
: [
{
"function"
: {
"arguments"
:
" {\"location\": \"北京\"}"
,
"name"
:
"get_weather"
},
"id"
:
"call_wiezxeyae8jzxl3jx8nhfgb5"
,
"type"
:
"function"
}
]
}
}
],
...
}
第二轮请求:回传完整上下文并生成最终响应
下面示例是在第一轮请求的基础上,回传思考内容加密原文(
encrypted_content
)和思考内容摘要(
reasoning_content
)、工具调用结果,模型生成自然语言回答。
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/chat/completions \
-H
"Content-Type: application/json"
\
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-d
'{
"model": "doubao-seed-2-0-lite-260215",
"messages": [
{
"role": "system",
"content": "你是人工智能助手。"
},
{
"role": "user",
"content": "今天北京天气怎么样"
},
{
"reasoning_content": "北京天气查询将由我调用相关工具完成。\n",
"encrypted_content": "djF+2EICEj3ryfEfSUdR/SmS8OeEH4znOYftL4SWDXR8uxROjx11W7rRCj5ArLwzsm7rFsO4frOdLm2p3/yWz/r0TMqrjHiaTTvRMNdV6sLdETySlb3PDgY1W+zuYuETiq3bQuxga5jKx+GpfvlDJMfJfzq/G1kDp6ryurs0rKAFIziyc4mfFSh2CzDKNcAcp5Fi5R7M2QrSYmIUJjnoB48IVUCzu4xn7bT05qheVnGO9fbs15gYK3zINUvVsp51Oq72U/ksrPZFVs2BTgNRwjmxnFNn7A==",
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": " {\"location\": \"北京\"}",
"name": "get_weather"
},
"id": "call_wiezxeyae8jzxl3jx8nhfgb5",
"type": "function"
}
]
},
{
"role": "tool",
"tool_call_id":"call_wiezxeyae8jzxl3jx8nhfgb5",
"content": "5度"
}
],
"thinking":{"type": "enabled"},
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "天气查询",
"parameters": {
"properties": {
"location": {
"description": "地点的位置信息,例如北京、上海。",
"type": "string"
}
},
"required": [
"location"
],
"type": "object"
}
}
}
]
}'
第一轮请求:触发工具调用
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/responses \
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-H
"Content-Type: application/json"
\
-d
'{
"model": "doubao-seed-2-0-lite-260215",
"input": [
{
"role": "system",
"content": "你是人工智能助手."
},
{
"role": "user",
"content": "今天北京天气怎么样"
}
],
"thinking":{"type": "enabled"},
"include":["reasoning.encrypted_content"],
"tools": [
{
"type": "function",
"name": "get_weather",
"description": "天气查询",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "地点的位置信息,例如北京、上海。"
}
},
"required": ["location"]
}
}
]
}'
第一轮响应:返回工具调用指令
模型返回信息包含
id
、
call_id
、
arguments
等关键字段。
Bash
复制
{
"created_at"
: 1766126702,
"id"
:
"resp_0217661267019147d8950efa0e2f7c9d9cc7a1cc971272cf4548c"
,
"max_output_tokens"
: 32768,
"model"
:
"doubao-seed-1-8-251228"
,
"object"
:
"response"
,
"output"
: [
{
"id"
:
"rs_02176612670248500000000000000000000ffffac154e10754f5c"
,
"type"
:
"reasoning"
,
"summary"
: [
{
"type"
:
"summary_text"
,
"text"
:
"用户查询北京今日天气,我将调用天气工具获取相关信息。"
}
],
"status"
:
"completed"
,
"encrypted_content"
:
"djEqHS8w8bISWDUfivQXaeCUc8ms2JcjMBO5KQMRqKhTUdYlhbFebcndgVlFJxYUOSOAXm7gNsJdTRtp47iHpps76Rp37ipRrkEHMqIIt+KyKmN/rH9tzL+7ZLI9W4LGYMOv/27Rfqp2NW5vxiF7zkI1xgxxJFp6Vo8PNQpR68T4F7bG4PekickNR3U+EFM6hBKkhnJqxqCrjubi0o/8C35IoDF998+G6hokaDhOb6EqJ5fXaSZvtQJaK4DBh4HIciMFnRqzts/xlacBHsWCWLcxUASrvj0vYIs9a+ZN9BxkLjrBy/nEOOEcmID/I2NukCDEFa7zxlOXLvdZHuslP5cvyno="
},
{
"arguments"
:
" {\"location\": \"北京\"}"
,
"call_id"
:
"call_t885uulopdd499rn0pioze7l"
,
"name"
:
"get_weather"
,
"type"
:
"function_call"
,
"id"
:
"fc_02176612670345400000000000000000000ffffac154e10a6753e"
,
"status"
:
"completed"
}
],
....
}
第二轮请求:回传结果并生成最终响应
传入上一轮 response_id、工具调用结果等信息,模型生成自然语言回答。
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/responses \
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-H
"Content-Type: application/json"
\
-d
'{
"model": "doubao-seed-2-0-lite-260215",
"input": [
{
"type": "function_call_output",
"call_id": "call_t885uulopdd499rn0pioze7l",
"output": "5度"
}
],
"previous_response_id": "resp_0217661267019147d8950efa0e2f7c9d9cc7a1cc971272cf4548c",
"thinking":{"type": "enabled"},
"tools": [
{
"type": "function",
"name": "get_weather",
"description": "天气查询",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "地点的位置信息,例如北京、上海。"
}
},
"required": ["location"]
}
}
]
}'
回传原始思考内容
部分模型开启深度思考后,默认输出模型原始的思考内容。以下是在工具调用场景,回传原始思考内容的示例。
API
Chat API
Responses API
API
Chat API
Responses API
支持模型
示例
doubao-seed-2-0-lite-260428
doubao-seed-2-0-mini-260428
doubao-seed-2-0-pro-260215
doubao-seed-2-0-lite-260215
doubao-seed-2-0-mini-260215
doubao-seed-2-0-code-preview-260215
doubao-seed-1-8-251228
第一轮请求:触发工具调用
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/chat/completions \
-H
"Content-Type: application/json"
\
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-d
'{
"model": "doubao-seed-2-0-lite-260215",
"messages": [
{
"role": "system",
"content": "你是人工智能助手。"
},
{
"role": "user",
"content": "今天北京天气怎么样"
}
],
"thinking":{"type": "enabled"},
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "天气查询",
"parameters": {
"properties": {
"location": {
"description": "地点的位置信息,例如北京、上海。",
"type": "string"
}
},
"required": [
"location"
],
"type": "object"
}
}
}
]
}'
第一轮响应:返回工具调用指令
模型会返回
reasoning_content
、
tool_calls
等关键字段。
JSON
复制
{
"choices"
:
[
{
"finish_reason"
:
"tool_calls"
,
"index"
:
0
,
"logprobs"
:
null
,
"message"
:
{
"content"
:
""
,
"reasoning_content"
:
"用户想查询今天北京的天气,这正好符合get_weather工具的功能,需要传入location参数为北京。所以我要调用这个工具来获取天气信息。"
,
"role"
:
"assistant"
,
"tool_calls"
:
[
{
"function"
:
{
"arguments"
:
" {\"location\": \"北京\"}"
,
"name"
:
"get_weather"
},
"id"
:
"call_wiezxeyae8jzxl3jx8nhfgb5"
,
"type"
:
"function"
}
]
}
}
],
...
}
第二轮请求:回传完整上下文并生成最终响应
在第一轮请求的基础上,还需要回传思维链信息、工具调用结果,模型生成自然语言回答。
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/chat/completions \
-H
"Content-Type: application/json"
\
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-d
'{
"model": "doubao-seed-2-0-lite-260215",
"messages": [
{
"role": "system",
"content": "你是人工智能助手。"
},
{
"role": "user",
"content": "今天北京天气怎么样"
},
{
"reasoning_content": "用户想查询今天北京的天气,这正好符合get_weather工具的功能,需要传入location参数为北京。所以我要调用这个工具来获取天气信息。",
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": " {\"location\": \"北京\"}",
"name": "get_weather"
},
"id": "call_wiezxeyae8jzxl3jx8nhfgb5",
"type": "function"
}
]
},
{
"role": "tool",
"tool_call_id":"call_wiezxeyae8jzxl3jx8nhfgb5",
"content": "5度"
}
],
"thinking":{"type": "enabled"},
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "天气查询",
"parameters": {
"properties": {
"location": {
"description": "地点的位置信息,例如北京、上海。",
"type": "string"
}
},
"required": [
"location"
],
"type": "object"
}
}
}
]
}'
doubao-seed-2-0-lite-260428
doubao-seed-2-0-mini-260428
doubao-seed-2-0-pro-260215
doubao-seed-2-0-lite-260215
doubao-seed-2-0-mini-260215
doubao-seed-2-0-code-preview-260215
doubao-seed-1-8-251228
第一轮请求:触发工具调用
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/responses \
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-H
"Content-Type: application/json"
\
-d
'{
"model": "doubao-seed-2-0-lite-260215",
"input": [
{
"role": "system",
"content": "你是人工智能助手."
},
{
"role": "user",
"content": "今天北京天气怎么样"
}
],
"thinking":{"type": "enabled"},
"tools": [
{
"type": "function",
"name": "get_weather",
"description": "天气查询",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "地点的位置信息,例如北京、上海。"
}
},
"required": ["location"]
}
}
]
}'
第一轮响应:返回工具调用指令
模型返回信息包含
id
、
call_id
、
arguments
等关键字段。
Bash
复制
{
"created_at"
: 1766126702,
"id"
:
"resp_0217661267019147d8950efa0e2f7c9d9cc7a1cc971272cf4548c"
,
"max_output_tokens"
: 32768,
"model"
:
"doubao-seed-1-8-251228"
,
"object"
:
"response"
,
"output"
: [
{
"id"
:
"rs_02176612670248500000000000000000000ffffac154e10754f5c"
,
"type"
:
"reasoning"
,
"summary"
: [
{
"type"
:
"summary_text"
,
"text"
:
"用户问今天北京的天气怎么样,我需要调用get_weather工具,参数location是北京。按照格式要求来写函数调用。"
}
],
"status"
:
"completed"
},
{
"arguments"
:
" {\"location\": \"北京\"}"
,
"call_id"
:
"call_t885uulopdd499rn0pioze7l"
,
"name"
:
"get_weather"
,
"type"
:
"function_call"
,
"id"
:
"fc_02176612670345400000000000000000000ffffac154e10a6753e"
,
"status"
:
"completed"
}
],
....
}
第二轮请求:回传结果并生成最终响应
传入上一轮 response_id、工具调用结果等信息,模型生成自然语言回答。
Bash
复制
curl https://ark.cn-beijing.volces.com/api/v3/responses \
-H
"Authorization: Bearer
$ARK_API_KEY
"
\
-H
"Content-Type: application/json"
\
-d
'{
"model": "doubao-seed-2-0-lite-260215",
"input": [
{
"type": "function_call_output",
"call_id": "call_t885uulopdd499rn0pioze7l",
"output": "5度"
}
],
"previous_response_id": "resp_0217661267019147d8950efa0e2f7c9d9cc7a1cc971272cf4548c",
"thinking":{"type": "enabled"},
"tools": [
{
"type": "function",
"name": "get_weather",
"description": "天气查询",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "地点的位置信息,例如北京、上海。"
}
},
"required": ["location"]
}
}
]
}'
使用说明
工作原理
多轮对话场景
流程图
说明
流程图
说明
在每一轮对话过程中,深度思考模型会输出思维链内容(COT)和最终回答(Answer)。
在下一轮对话中,之前输出的思维链内容不会被拼接到上下文中。
思维链内容展现的是模型处理问题的过程,包括将问题拆分为多个问题进行处理,生成多种回复综合得出更好回答等过程。
工具调用场景(doubao-seed-1.8 及后续模型)
工具调用场景中开启深度思考后,为给出更详尽准确的回答,将不会直接丢弃思维链内容,历史轮次的思维链内容按需(模型自主判断)参与推理。在整个请求过程中,用户回传完整上下文即可,由服务端自行判断,是否保留思维链内容。未输入给模型的思维链内容,不会计算 token 用量。代码示例参见
工具调用
。
流程图
说明
流程图
说明
回答问题 1 时(请求 1.1 - 1.2),模型进行多次思考 + 工具调用后给出答案,方舟会输入完整上下文包括思维链内容给模型处理。
开始回答问题2时(请求 2.1),方舟会自行判断并删除之前上下文中的思维链,输入给模型。
减少请求超时失败
深度思考模型使用思维链输出内容,导致回复篇幅更长、速率更慢,所以极易因超时导致任务失败。尤其在非流式输出模式下,任务未完成时断开连接,未输出内容,又产生 token 用量费用。
可使用流式输出或设置更长超时时间,减少超时失败:
使用流式输出(推荐):通过分块即时返回生成内容,可有效维持连接活性(避免因长时无响应导致的连接中断),是高效且可靠的输出方式(示例代码及说明参见
流式输出
)。若当前应用使用非流式输出,可改造为:通过流式接口获取内容,实时拼接完整结果后再统一输出,从而显著降低请求超时失败风险。
调大超时时间参数:非流式输出场景下,推荐将
timeout
参数设置为 30 分钟以上,并根据超时触发概率进一步调整超时时间。另需注意网络链路中的 TCP Keep-Alive 设置(
tcp_keepalive_time
参数),避免因长时间无数据传输导致连接被系统、防火墙、路由器等中断。
方舟Go SDK特殊说明
:无论是否使用流式输出,均需将 SDK 超时参数设置为 30 分钟以上。
使用批量推理获得更高吞吐
当您的业务需要处理大量的数据,且对于模型返回及时性要求不高,您可使用批量推理获取最低 10B token/天的配额以及批量推理的成本降低。批量推理支持任务的方式以及类似 Chat 的接口调用方式,使用批量推理
提示词优化建议
深度思考模型会自行分析和拆解问题(思维链),与普通模型相比,提示词侧重点有所不同。
提示词除了待解决问题,应该更多补充目标和场景等信息。如使用英语,用 Python 等语言要求;面向小学生、向领导汇报等阅读对象信息;完成论文写作、完成课题报告、撰写剧本等场景信息;体现我的专业性、获得领导赏识等目标信息。
减少或者避免对问题的拆解描述,如分步骤思考、使用示例等,这样会限制住模型的推理逻辑。
减少使用系统提示词,所有提示词信息直接通过用户提示词(
role: user
)来提问。
常见问题
并发 RPM 或者 TPM 额度明明有剩余为什么提示限流报错?
最近更新时间:2026.08.21 11:18:08
这个页面对您有帮助吗?
有用
有用
无用
无用