Seed 2.0 Code API

编码调试了256K-context模型,具有强大的前端结果和AI编码工具和代理的多语言编程支持.

ByteDance文本生成256K 上下文发布日期 2026年2月14日Malaysia专有端点

关于 Seed 2.0 Code

编码调试了256K-context模型,具有强大的前端结果和AI编码工具和代理的多语言编程支持.

也称为 Seed Code, ByteDance Seed 2.0 Code, Seed-2.0-Code, seed-2-0-code

code interpreterreasoningagentic codingfunction callingvision

Seed 2.0 Code 规格

模型 ID
seed-2-0-code
提供方
ByteDance
类别
文本生成
发布日期
2026年2月14日
上下文窗口
256K 个 token
最大输出
128,000 个 token
输入
文本图像视频文档
输出
文本
结构化输出
不支持
区域
Malaysia
端点
POST/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/seed-2-0-code:generateContent
备用模型 ID
bytedance/seed-2-codedola-seed-2.0-codedoubao-seed-2-codeseed-2-0-code-preview-260328seed-2-code

Seed 2.0 Code API 价格

来自 EmpirioLabs 目录的实时按量计费价格。只为实际用量付费,没有月度最低消费。

类型
规格
价格
投入
每1M 提示符
<=128K $0.40128K-256K $0.80
产出
每1M个生成的令牌
<=128K $2.40128K-256K $4.80
在完整价格页比较

如何调用 Seed 2.0 Code API

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
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."}
    ]
  }'
Python (OpenAI SDK)
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)
Seed 2.0 Code API 完整参考

Seed 2.0 Code API 参数

EmpirioLabs 上 Seed 2.0 Code API 支持的请求参数。省略字段时使用默认值。

参数类型默认值范围 / 值描述
max_tokensnumber40961 到 65536最大输出令牌
frequency_penaltynumber0-2 到 2重复使用代币的惩罚。>0减少重复,<0鼓励重复。
presence_penaltynumber0-2 到 2新标记与已见标记的惩罚。>0鼓励新话题,<0鼓励保持主题。
stopstring--逗号分隔的塞音序列
enable_thinkingbooleantrue-启用深度思考/推理模式。
reasoning_effortenummediumlow, medium, high推理努力层级。使用enable_thinking=false来完全禁用推理。
enable_web_searchbooleanfalse-Enable web search: retrieves live web results and provides them to the model as additional context.
image_detailenumhighlow, high, xhigh视觉输入的图像视觉质量层级。
video_fpsnumber-0.2 到 5从视频输入中提取的每秒帧数。

须知

当输入令牌为QQ128K时定价为2x. 温度和top p是服务器固定的(temp=1,top p=0.95),无论客户端值如何.

Per-tool billing (usage.tool_usage)

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.

Seed 2.0 Code API:常见问题

Seed 2.0 Code API 收费多少?

在 EmpirioLabs,Seed 2.0 Code 按量计费。本页的实时价格表始终与 API 的实际计费一致。

Seed 2.0 Code 的上下文窗口有多大?

Seed 2.0 Code 支持 256K token 的上下文窗口,每次响应最多 128,000 个输出 token。

Seed 2.0 Code API 兼容 OpenAI 吗?

兼容。Seed 2.0 Code 提供 OpenAI 兼容的 Chat Completions API,现有 OpenAI SDK 只需把 base_url 指向 https://api.empiriolabs.ai/v1 并把模型 ID 设为 seed-2-0-code 即可使用。

集成之前可以在浏览器里试用 Seed 2.0 Code 吗?

可以。EmpirioLabs Playground在浏览器中以与 API 相同的参数运行 Seed 2.0 Code,你可以在写代码之前先测试提示词。

如何获取 Seed 2.0 Code API 密钥?

创建 EmpirioLabs 账户,然后在控制台的 API Keys生成密钥。计费使用按量付费的额度,只为实际发出的请求付费。

准备好使用更好的终端了吗?

查看我们的定价,或者如果你想将自己的模型部署到我们的堆栈中,请联系我们。