模型介绍
豆包 Pro 是字节跳动火山引擎平台的旗舰模型。推理速度快,价格亲民,在中文通用场景表现不错。支持 Function Calling,适合轻量级 AI Agent 和自动化场景。
API 接入信息
| 项目 | 详情 |
|---|
| API Endpoint | https://ark.cn-beijing.volces.com/api/v3/chat/completions |
| 鉴权方式 | Bearer Token(Ark API Key) |
| 默认模型 | doubao-pro-32k-250115 |
| MCP / Function Calling | ✅ 完整支持 |
价格
| 类型 | 价格 |
|---|
| 输入(Input) | ¥2.00 / 1M tokens |
| 输出(Output) | ¥8.00 / 1M tokens |
| 32K 超长上下文支持 |
关键参数
| 参数名 | 类型 | 默认值 | 说明 |
|---|
| model | string | doubao-pro-32k-250115 | 模型 endpoint ID |
| temperature | float | 0.7 | 0-2 |
| max_tokens | integer | 4096 | 最大输出 |
| tools | array | [] | Function Calling |
curl 调用示例
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-pro-32k-250115",
"messages": [{"role": "user", "content": "你好"}]
}'
Python 调用示例
from openai import OpenAI
client = OpenAI(
api_key="xxx",
base_url="https://ark.cn-beijing.volces.com/api/v3"
)
response = client.chat.completions.create(
model="doubao-pro-32k-250115",
messages=[{"role": "user", "content": "你好"}]
)
print(response.choices[0].message.content)
优势场景
最适合的场景
轻量级应用 / 高并发场景 / 火山引擎用户