模型列表
| 模型 ID | 定位 |
|---|---|
doubao-seed-2-0-pro-260215 | Pro 版本,适合复杂综合任务 |
doubao-seed-2-0-mini-260215 | Mini 版本,兼顾速度与能力 |
doubao-seed-2-0-lite-260215 | Lite 2026-02-15 快照 |
doubao-seed-2-0-lite-260428 | Lite 2026-04-28 快照 |
快速示例
curl https://www.anyfast.com.cn/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seed-2-0-pro-260215",
"messages": [
{"role": "user", "content": "为一个高并发订单系统设计缓存策略。"}
],
"max_tokens": 2048
}'
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY", base_url="https://www.anyfast.com.cn/v1")
response = client.chat.completions.create(
model="doubao-seed-2-0-lite-260428",
messages=[{"role": "user", "content": "将下面的会议记录整理成待办事项。"}],
max_tokens=2048,
)
print(response.choices[0].message.content)
通用参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 使用上表中的完整模型 ID。 |
messages | array | 是 | OpenAI 格式消息列表。 |
max_tokens | integer | 否 | 最大生成 Token 数。 |
temperature | number | 否 | 控制采样随机性。 |
top_p | number | 否 | 核采样参数。 |
stream | boolean | 否 | 为 true 时返回 SSE 流。 |
tools | array | 否 | 函数工具定义;实际支持情况取决于所选快照。 |
API 参考
查看 Doubao Seed 2.0 系列的交互式 API 参考。