curl --request POST \
--url https://api.powertokens.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seed-2-0-pro-260328",
"messages": [
{
"role": "system",
"content": "你是一个简洁、准确的中文助手。"
},
{
"role": "user",
"content": "请用三句话总结一下 RAG 的核心流程。"
}
],
"thinking": {
"type": "enabled"
},
"reasoning_effort": "medium",
"temperature": 0.3,
"max_completion_tokens": 1024,
"stream": false
}
'{
"id": "chatcmpl_bp_123",
"object": "chat.completion",
"created": 1742342400,
"model": "seed-2-0-pro-260328",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "RAG 的核心流程通常分为检索、增强和生成三步。系统先把用户问题转换为向量并检索相关知识片段,再把检索结果与原问题一起拼接进提示词。最后模型基于增强后的上下文生成答案,从而降低幻觉并提升事实性。"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 98,
"total_tokens": 221
}
}调用 BytePlus chat completions 能力。
支持模型包括 seed-2-0-pro-260328、seed-2-0-lite-260228、seed-2-0-mini-260215、seed-1-8-251228、seed-1-6-250915、seed-1-6-flash-250715、deepseek-v3-2-251201、gpt-oss-120b-250805。
本文档公开字段:model、messages、thinking、stream、stream_options.include_usage、stream_options.chunk_include_usage、max_tokens、max_completion_tokens、stop、reasoning_effort、response_format、frequency_penalty、presence_penalty、temperature、top_p、logprobs、top_logprobs、tools、parallel_tool_calls、tool_choice。messages[].content 支持 text、image_url、video_url 多模态分片;assistant 消息支持 reasoning_content 与 tool_calls。
curl --request POST \
--url https://api.powertokens.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "seed-2-0-pro-260328",
"messages": [
{
"role": "system",
"content": "你是一个简洁、准确的中文助手。"
},
{
"role": "user",
"content": "请用三句话总结一下 RAG 的核心流程。"
}
],
"thinking": {
"type": "enabled"
},
"reasoning_effort": "medium",
"temperature": 0.3,
"max_completion_tokens": 1024,
"stream": false
}
'{
"id": "chatcmpl_bp_123",
"object": "chat.completion",
"created": 1742342400,
"model": "seed-2-0-pro-260328",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "RAG 的核心流程通常分为检索、增强和生成三步。系统先把用户问题转换为向量并检索相关知识片段,再把检索结果与原问题一起拼接进提示词。最后模型基于增强后的上下文生成答案,从而降低幻觉并提升事实性。"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 98,
"total_tokens": 221
}
}在请求头中传入 Authorization: Bearer <token>。
BytePlus chat completions 请求体。
模型名称。支持的 BytePlus 对话模型包括 seed-2-0-pro-260328、seed-2-0-lite-260228、seed-2-0-mini-260215、seed-1-8-251228、seed-1-6-250915、seed-1-6-flash-250715、deepseek-v3-2-251201、gpt-oss-120b-250805。
seed-2-0-pro-260328, seed-2-0-lite-260228, seed-2-0-mini-260215, seed-1-8-251228, seed-1-6-250915, seed-1-6-flash-250715, deepseek-v3-2-251201, gpt-oss-120b-250805 "seed-2-0-pro-260328"
消息列表。当前文档公开 system、user、assistant、tool 四种角色。messages[].content 支持纯文本,也支持由 text、image_url、video_url 组成的多模态分片。
1Show child attributes
控制模型是否开启深度思考模式。
Show child attributes
是否启用流式输出。为 true 时响应内容类型为 text/event-stream。
流式响应附加选项。仅在 stream=true 时生效。
Show child attributes
模型回答最大长度(不含思维链长度),单位 token。
模型输出最大长度(含回答与思维链长度),单位 token。设置后 max_tokens 会失效。
停止序列。可以是单个字符串,也可以是字符串数组。
限制思考工作量。minimal 最快,high 最深。
minimal, low, medium, high 控制回答格式(Beta)。
Show child attributes
频率惩罚。值越高,越抑制重复表达。
-2 <= x <= 2存在惩罚。值越高,越鼓励模型引入新话题。
-2 <= x <= 2采样温度。越低越稳定,越高越发散。
0 <= x <= 2核采样参数。通常与 temperature 二选一调优。
0 <= x <= 1是否返回输出 token 的对数概率信息。
当 logprobs=true 时,指定每个位置返回多少个候选 token 的对数概率。
0 <= x <= 20可供模型调用的函数工具定义列表。
Show child attributes
是否允许模型并行发起多个工具调用。
工具调用策略。可以是字符串模式,也可以是指定具体函数的对象。
none, auto, required