编码调试了256K-context模型,具有强大的前端结果和AI编码工具和代理的多语言编程支持.
也称为 Seed Code, ByteDance Seed 2.0 Code, Seed-2.0-Code, seed-2-0-code
seed-2-0-code/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/seed-2-0-code:generateContentbytedance/seed-2-codedola-seed-2.0-codedoubao-seed-2-codeseed-2-0-code-preview-260328seed-2-code来自 EmpirioLabs 目录的实时按量计费价格。只为实际用量付费,没有月度最低消费。
Seed 2.0 Code 提供 OpenAI 兼容的 Chat Completions API。用你的 EmpirioLabs API 密钥把任意 OpenAI SDK 指向 https://api.empiriolabs.ai/v1,并使用模型 ID seed-2-0-code。 在EmpirioLabs 控制台获取 API 密钥。
curl https://api.empiriolabs.ai/v1/chat/completions \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seed-2-0-code",
"messages": [
{"role": "user", "content": "Write a haiku about the ocean."}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.empiriolabs.ai/v1",
api_key="YOUR_EMPIRIOLABS_API_KEY",
)
response = client.chat.completions.create(
model="seed-2-0-code",
messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)EmpirioLabs 上 Seed 2.0 Code API 支持的请求参数。省略字段时使用默认值。
| 参数 | 类型 | 默认值 | 范围 / 值 | 描述 |
|---|---|---|---|---|
| max_tokens | number | 4096 | 1 到 65536 | 最大输出令牌 |
| frequency_penalty | number | 0 | -2 到 2 | 重复使用代币的惩罚。>0减少重复,<0鼓励重复。 |
| presence_penalty | number | 0 | -2 到 2 | 新标记与已见标记的惩罚。>0鼓励新话题,<0鼓励保持主题。 |
| stop | string | - | - | 逗号分隔的塞音序列 |
| enable_thinking | boolean | true | - | 启用深度思考/推理模式。 |
| reasoning_effort | enum | medium | low, medium, high | 推理努力层级。使用enable_thinking=false来完全禁用推理。 |
| enable_web_search | boolean | false | - | Enable web search: retrieves live web results and provides them to the model as additional context. |
| image_detail | enum | high | low, high, xhigh | 视觉输入的图像视觉质量层级。 |
| video_fps | number | - | 0.2 到 5 | 从视频输入中提取的每秒帧数。 |
当输入令牌为QQ128K时定价为2x. 温度和top p是服务器固定的(temp=1,top p=0.95),无论客户端值如何.
When this model invokes built-in tools (web search, code interpreter, etc.) inside a single request, the response carries a normalized usage.tool_usage map alongside the token counts. The example below shows the shape — exact field names, units, and which tools appear can vary slightly per provider:
"usage": {
"prompt_tokens": 123,
"completion_tokens": 456,
"cost_usd": 0.0042,
"tool_usage": {"web_search": 3, "code_interpreter": 1}
}The tool counts are already factored into cost_usd — they are surfaced for transparency so you can audit per-tool billing. The field is omitted when no tools were invoked.
在 EmpirioLabs,Seed 2.0 Code 按量计费。本页的实时价格表始终与 API 的实际计费一致。
Seed 2.0 Code 支持 256K token 的上下文窗口,每次响应最多 128,000 个输出 token。
兼容。Seed 2.0 Code 提供 OpenAI 兼容的 Chat Completions API,现有 OpenAI SDK 只需把 base_url 指向 https://api.empiriolabs.ai/v1 并把模型 ID 设为 seed-2-0-code 即可使用。
可以。EmpirioLabs Playground在浏览器中以与 API 相同的参数运行 Seed 2.0 Code,你可以在写代码之前先测试提示词。
创建 EmpirioLabs 账户,然后在控制台的 API Keys生成密钥。计费使用按量付费的额度,只为实际发出的请求付费。