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
sourceURLretrieved
TheRouter model idstandard-models.yaml β†—2026-07-29verified
Upstream snapshotprovider-models/astraflow-bytedance.yaml β†—2026-07-29verified
Context windowstandard-models.yaml β†—2026-07-29verified
Maximum completionstandard-models.yaml β†—2026-07-29verified
Input / output modalitiesstandard-models.yaml β†—2026-07-29verified
Supported OpenAI-style parametersstandard-models.yaml β†—2026-07-29verified
TheRouter base pricestandard-models.yaml β†—2026-07-29verified
Long-context tierBytePlus ModelArk pricing β†—2026-07-29verified
Training cutoffβ€”β€”unknown
License / weightsBytePlus ModelArk β†—2026-08-06verified
TheRouter records BytePlus Seed 2.0 Code Preview (260215) tiered pricingBytePlus ModelArk pricing β†—2026-07-29verified
ByteDance ships Seed2.0 with a dedicated Code modelseed.bytedance.com β†—2026-08-06verified
Is this the same route as `doubao/doubao-seed-2-0-code`?standard-models.yaml β†—2026-07-29to verify
What happens above 128K prompt tokens?BytePlus ModelArk pricing β†—2026-07-29to verify
Help & contact