curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seed-2.0-pro",
"messages": [
{
"role": "user",
"content": "请介绍一下你自己"
}
]
}
'{
"id": "0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50",
"model": "doubao-seed-2-0-pro-260215",
"object": "chat.completion",
"service_tier": "default",
"created": 1771485416,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!Doubao Seed 2.0 是字节跳动推出的新一代大语言模型,具备更强的推理、多模态理解和深度思考能力。",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123,
"top_logprobs": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123
}
]
}
]
},
"moderation_hit_type": "severe_violation"
}
],
"usage": {
"total_tokens": 271,
"prompt_tokens": 15,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens": 256,
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model",
"fallback_suggestion": "doubao-seed-2.0-pro"
}
}{
"error": {
"code": 413,
"message": "Image file too large",
"type": "request_too_large_error",
"param": "content",
"fallback_suggestion": "compress image to under 10MB"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try different model"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}Doubao Seed 2.0 - 完整参数文档
- 使用 OpenAI SDK 格式调用 Doubao Seed 2.0 系列模型
- 同步处理模式,实时返回对话内容
- 纯文本对话:单轮或多轮上下文对话
- 系统提示词:自定义 AI 的角色和行为
- 多模态输入:支持文本 + 图像 + 视频混合输入
- 深度思考:支持开启思维链模式进行深度推理
- 工具调用:支持 Function Calling
- 结构化输出:支持 JSON Object / JSON Schema 格式输出
- 快速上手?查看 快速开始文档
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "doubao-seed-2.0-pro",
"messages": [
{
"role": "user",
"content": "请介绍一下你自己"
}
]
}
'{
"id": "0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50",
"model": "doubao-seed-2-0-pro-260215",
"object": "chat.completion",
"service_tier": "default",
"created": 1771485416,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!Doubao Seed 2.0 是字节跳动推出的新一代大语言模型,具备更强的推理、多模态理解和深度思考能力。",
"reasoning_content": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
},
"finish_reason": "stop",
"logprobs": {
"content": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123,
"top_logprobs": [
{
"token": "<string>",
"bytes": [
123
],
"logprob": 123
}
]
}
]
},
"moderation_hit_type": "severe_violation"
}
],
"usage": {
"total_tokens": 271,
"prompt_tokens": 15,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens": 256,
"completion_tokens_details": {
"reasoning_tokens": 0
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 403,
"message": "Access denied for this model",
"type": "permission_error",
"param": "model"
}
}{
"error": {
"code": 404,
"message": "Specified model not found",
"type": "not_found_error",
"param": "model",
"fallback_suggestion": "doubao-seed-2.0-pro"
}
}{
"error": {
"code": 413,
"message": "Image file too large",
"type": "request_too_large_error",
"param": "content",
"fallback_suggestion": "compress image to under 10MB"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 502,
"message": "Upstream AI service unavailable",
"type": "upstream_error",
"fallback_suggestion": "try different model"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,对文本模型作为备用地址使用。授权
##所有接口均需要使用Bearer Token进行认证##
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
对话模型名称
doubao-seed-2.0-pro: 旗舰版,综合能力最强,适合复杂推理和高质量生成doubao-seed-2.0-lite: 轻量版,速度更快,性价比高doubao-seed-2.0-mini: 极速版,响应最快,适合简单任务doubao-seed-2.0-code: 代码专用版,针对代码生成和理解优化
doubao-seed-2.0-pro, doubao-seed-2.0-lite, doubao-seed-2.0-mini, doubao-seed-2.0-code "doubao-seed-2.0-pro"
对话消息列表,支持多轮对话和多模态输入(文本、图片、视频)
1Show child attributes
Show child attributes
控制模型是否开启深度思考模式
不同模型是否支持以及默认取值不同
Show child attributes
Show child attributes
响应内容是否流式返回
false: 模型生成完所有内容后一次性返回结果true: 按 SSE 协议逐块返回模型生成内容,并以一条data: [DONE]消息结束。当 stream 为 true 时,可设置 stream_options 字段以获取 token 用量统计信息
false
流式响应的选项。当 stream 为 true 时,可设置此字段
Show child attributes
Show child attributes
模型回答最大长度(单位 token)
注意:
- 模型回答不包含思维链内容(模型回答 = 模型输出 - 模型思维链)
- 输出 token 的总长度还受模型的上下文长度限制
- 不可与 max_completion_tokens 同时设置
4096
控制模型输出的最大长度,包括模型回答和思维链内容长度(单位 token)
说明:
- 取值范围: [0, 65536]
- 配置后 max_tokens 默认值失效,模型按需输出内容(回答和思维链),直到达到此值
- 不可与 max_tokens 同时设置
- 建议在开启深度思考模式时使用此参数
0 <= x <= 6553616384
采样温度,控制输出的随机性
说明:
- 取值范围: [0, 2]
- 较低值 (如 0.2): 更确定、更聚焦的输出
- 较高值 (如 0.8): 更随机、更有创意的输出
- 取值为 0 时模型仅考虑对数概率最大的一个 token
- 建议仅调整 temperature 或 top_p 其中之一
0 <= x <= 20.7
核采样概率阈值
说明:
- 取值范围: [0, 1]
- 模型会考虑概率质量在 top_p 内的 token 结果
- 0.1 意味着只考虑概率质量最高的前 10% 的 token
- 取值越大生成的随机性越高,取值越低生成的确定性越高
- 建议仅调整 temperature 或 top_p 其中之一
0 <= x <= 10.9
模型遇到 stop 字段所指定的字符串时将停止继续生成,这个词语本身不会输出。最多支持 4 个字符串
注意: 深度思考模型不支持该字段
["你好", "天气"]
限制思考的工作量,减少思考深度可提升速度,思考花费的 token 更少
minimal: 关闭思考,直接回答low: 轻量思考,侧重快速响应medium: 均衡模式,兼顾速度与深度high: 深度分析,处理复杂问题
minimal, low, medium, high "medium"
指定模型回答格式
支持三种格式: text(默认)、json_object、json_schema
Show child attributes
Show child attributes
频率惩罚系数
说明:
- 取值范围: [-2.0, 2.0]
- 值为正时,根据新 token 在文本中的出现频率对其进行惩罚,降低模型逐字重复的可能性
-2 <= x <= 20
存在惩罚系数
说明:
- 取值范围: [-2.0, 2.0]
- 值为正时,根据新 token 到目前为止是否出现在文本中对其进行惩罚,增加模型谈论新主题的可能性
-2 <= x <= 20
是否返回输出 tokens 的对数概率
false: 不返回对数概率信息true: 返回消息内容中每个输出 token 的对数概率
注意: 深度思考模型不支持该字段
指定每个输出 token 位置最有可能返回的 token 数量,每个 token 都有关联的对数概率
- 取值范围: [0, 20]
- 仅当 logprobs 为 true 时可设置
注意: 深度思考模型不支持该字段
0 <= x <= 20调整指定 token 在模型输出内容中出现的概率
说明:
- 接受一个 map,键为词表中的 token ID,值为偏差值
- 偏差值取值范围: [-100, 100]
- -1 会减少选择的可能性,1 会增加选择的可能性
- -100 会完全禁止选择该 token,100 会导致仅可选择该 token
注意: 深度思考模型不支持该字段
Show child attributes
Show child attributes
待调用工具的列表,模型返回信息中可包含工具调用请求
Show child attributes
Show child attributes
本次请求,模型返回是否允许包含多个待调用的工具
true: 允许返回多个待调用的工具false: 允许返回的待调用工具数量 <= 1
本次请求,模型返回信息中是否有待调用的工具
字符串模式:
none: 模型返回信息中不包含待调用的工具required: 模型返回信息中必须包含待调用的工具auto: 模型自行判断返回信息是否有待调用的工具(存在工具时的默认值)
对象模式: 指定待调用工具的范围
none, auto, required 响应
对话生成成功
本次请求的唯一标识
"0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50"
本次请求实际使用的模型名称和版本
"doubao-seed-2-0-pro-260215"
响应类型,固定为 chat.completion
chat.completion "chat.completion"
本次请求的服务等级
default: 默认服务等级scale: 使用了保障包额度
default, scale "default"
本次请求创建时间的 Unix 时间戳(秒)
1771485416
本次请求的模型输出内容
Show child attributes
Show child attributes
本次请求的 token 用量
Show child attributes
Show child attributes