Back to Models
Doubao Seed 2.0 Code Preview (260215)
bytedancebytedance/doubao-seed-2.0-code-preview-260215
How TheRouter serves this differently from the vendor
As the vendor operates it
BytePlus / ModelArk exposes the upstream doubao-seed-2-0-code-preview-260215 route as part of its hosted model surface, with prompt-length pricing tiers recorded in the official rate-card documentation.
On TheRouter
TheRouter exposes the same snapshot as an OpenAI-compatible chat-completions model and records the base plus long-context token prices in standard-models.yaml. Cache-hit billing is not exposed on this public model row.
API guide
Chat completion
Minimal OpenAI-compatible request for code explanation, repository notes, or patch planning.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/doubao-seed-2.0-code-preview-260215",
"messages": [
{"role": "user", "content": "Explain why this TypeScript generic is unsafe and suggest a patch."}
]
}'Tool calling
Use tools for coding agents that search files, inspect symbols, or plan edits while keeping the preview snapshot pinned.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/doubao-seed-2.0-code-preview-260215",
"messages": [{"role": "user", "content": "Find the risky migration steps before editing."}],
"tools": [{
"type": "function",
"function": {
"name": "search_files",
"description": "Search repository files by pattern",
"parameters": {"type": "object", "properties": {"pattern": {"type": "string"}}, "required": ["pattern"]}
}
}]
}'Structured JSON
Use response_format for machine-readable code-review triage; still validate the schema in your application boundary.
cURL
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/doubao-seed-2.0-code-preview-260215",
"response_format": {"type": "json_object"},
"messages": [{"role": "user", "content": "Return JSON with keys risk and test_plan for this patch."}]
}'Fact ledger β every claim on this page traces here
| source | URL | retrieved | |
|---|---|---|---|
| TheRouter model id | standard-models.yaml β | 2026-07-29 | verified |
| Upstream snapshot | provider-models/astraflow-bytedance.yaml β | 2026-07-29 | verified |
| Context window | standard-models.yaml β | 2026-07-29 | verified |
| Maximum completion | standard-models.yaml β | 2026-07-29 | verified |
| Input / output modalities | standard-models.yaml β | 2026-07-29 | verified |
| Supported OpenAI-style parameters | standard-models.yaml β | 2026-07-29 | verified |
| TheRouter base price | standard-models.yaml β | 2026-07-29 | verified |
| Long-context tier | BytePlus ModelArk pricing β | 2026-07-29 | verified |
| Training cutoff | β | β | unknown |
| License / weights | BytePlus ModelArk β | 2026-08-06 | verified |
| TheRouter records BytePlus Seed 2.0 Code Preview (260215) tiered pricing | BytePlus ModelArk pricing β | 2026-07-29 | verified |
| ByteDance ships Seed2.0 with a dedicated Code model | seed.bytedance.com β | 2026-08-06 | verified |
| Is this the same route as `doubao/doubao-seed-2-0-code`? | standard-models.yaml β | 2026-07-29 | to verify |
| What happens above 128K prompt tokens? | BytePlus ModelArk pricing β | 2026-07-29 | to verify |