ByteDance
Top Pick
Doubao Seed 2.0 Code Preview
Coding-enhanced Doubao Seed 2.0 variant optimized for Agentic Coding workflows
Context Window256K tokens
Max Input Tokens256K tokens
Max Output Tokens128K tokens
Pricing & Specs
💰 Pricing
Input¥3.2 / M tokens
Output¥16 / M tokens
Cache Hit¥0.64 / M tokens
⚙️ Specs
Context Window256K tokens
Max Input Tokens256K tokens
Max Output Tokens128K tokens
Max Thinking Tokens128K tokens
Throughput LimitsTPM 5000K / RPM 30K
I/O ModalitiesInput: Text, Images, Video; Output: Text
Tiered PricingCurrent tier applies when input ≤32K
Cache Storage¥0.017 / M tokens / hour
Reasoning FeaturesStructured Output, Deep Thinking (thinking.type / reasoning_effort)
Coding FocusSeed 2.0 coding-enhanced variant for Agentic Coding
Fine-TuningSupported
Inference ModesOnline Inference, Batch Inference
ToolingFunction Calling, Web Search, Knowledge Base, MCP
API CompatibilityChat Completions, Responses (via XAI Router /v1 compatibility)
API Examples
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="your-api-key",
base_url="https://api.xairouter.com/v1"
)
response = client.chat.completions.create(
model="doubao-seed-2-0-code-preview-260215",
messages=[
{"role": "user", "content": "Refactor this code and add unit tests."}
]
)
print(response.choices[0].message.content)cURL (OpenAI API)
curl https://api.xairouter.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "doubao-seed-2-0-code-preview-260215",
"messages": [
{"role": "user", "content": "Refactor this code and add unit tests."}
]
}'