Apply your own routing policies, reduce token costs automatically, and see every routing decision in real time with Merge Gateway.

What Dola Seed 2.0 Code (preview) costs to run
Test Dola Seed 2.0 Code (preview)
with Gateway’s Simulator
See a prompt's output, token spend, latency, and more with Dola Seed 2.0 Code (preview).
Route requests to Dola Seed 2.0 Code (preview) in minutes
1$ pip install merge-gateway-sdk1from merge_gateway import MergeGateway
2
3client = MergeGateway(api_key="YOUR_API_KEY")
4
5response = client.responses.create(
6 model="openai/gpt-5.2",
7 input=[
8 {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
9 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
10 ],
11)
12
13print(response.output[0].content[0].text)1response = client.responses.create(
2 model="anthropic/claude-sonnet-4-20250514",
3 input=[
4 {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)1from openai import OpenAI
2
3client = OpenAI(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/openai",
6)1response = client.chat.completions.create(
2 model="gpt-5.2",
3 messages=[
4 {"role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)
8
9print(response.choices[0].message.content)1npm install merge-gateway-ai-sdk-provider ai1import { createMergeGateway } from "merge-gateway-ai-sdk-provider";
2
3const gateway = createMergeGateway({
4 apiKey: "YOUR_API_KEY",
5});1import { generateText } from "ai";
2
3const { text } = await generateText({
4 model: gateway("openai/gpt-4o"),
5 prompt: "Explain the concept of recursion in programming with a simple set of examples.",
6});
7
8console.log(text);1import { createOpenAI } from "@ai-sdk/openai";
2
3const gateway = createOpenAI({
4 apiKey: "YOUR_API_KEY",
5 baseURL: "https://api-gateway.merge.dev/v1/ai-sdk",
6});
7
8// All generateText/streamText calls work unchanged1from anthropic import Anthropic
2
3client = Anthropic(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/anthropic",
6)
7
8message = client.messages.create(
9 model="claude-sonnet-4-20250514",
10 max_tokens=1024,
11 messages=[
12 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
13 ],
14)
15
16print(message.content[0].text)Explore other models available in Merge Gateway
Dola Seed 2.0 Code (preview) FAQ
Heading
What other models does ByteDance offer?
ByteDance builds a range of Seed 2.0 models across general reasoning, balanced production use, and specialized automation, in addition to this coding-focused variant. Here are some other models ByteDance supports:
- Dola Seed 2.0 Mini: ByteDance's lightweight, high-throughput model designed for cost-sensitive, latency-critical workloads. It supports a 256K context window at $0.10 input / $0.40 output per million tokens, and scores 64.1 on LiveCodeBench v6. It's suitable for code completion and boilerplate generation but not for complex multi-file engineering tasks
- Dola Seed 2.0 Lite: ByteDance's mid-tier production model, optimized for multimodal agentic workflows at $0.25 input / $2.00 output per million tokens. It scores 73.5% on SWE-Bench Verified and 81.7 on LiveCodeBench v6 with a 256K context window, balancing quality and cost for general development use cases
- Dola Seed 2.0 Pro: ByteDance's flagship reasoning and multimodal model, scoring 98.3 on AIME 2025, 3020 on Codeforces, and 89.5 on VideoMME. With a 272K context window, it's the right choice when tasks combine deep reasoning with video or image analysis, not just code generation
- UI-TARS-1.5-7B: ByteDance's 7B vision-language agent for GUI interaction. It targets desktop, mobile, and browser automation tasks, achieving 84.8% on WebVoyager and 46.6 on AndroidWorld. It's a complementary model for agentic stacks that need to act on visual interfaces rather than generate code
How does Dola Seed 2.0 Code (preview) differ from ByteDance's other models?
Dola Seed 2.0 Code (preview) is a coding-specialized fine-tune of the Seed 2.0 base, engineered specifically for software engineering workflows rather than general-purpose reasoning.
- Pricing: At $0.30 per million input tokens and $1.20 per million output tokens, it's approximately 36% cheaper on input than Dola Seed 2.0 Pro ($0.47 / $2.37) while delivering equivalent SWE-Bench Verified performance. Compared to Lite ($0.25 / $2.00), it costs slightly more on input but nearly half as much on output tokens
- Coding benchmarks: Scores 87.8 on LiveCodeBench v6, 76.5% on SWE-Bench Verified, and approximately 94% on HumanEval. These are the highest coding benchmark scores in the Seed 2.0 family, matching Pro on SWE-Bench and surpassing Lite (73.5%) and Mini (67.9% on SWE-Bench)
- Coding-specific optimizations: Built with fill-in-the-middle (FIM) completions for inline code suggestions, multi-file refactoring support, and coding-specific quantization that reduces inference latency. Output formatting is tuned to produce clean code blocks with minimal explanatory interruptions, which matters for agent loops consuming the output programmatically
- Context window: Supports a 256K context window with up to 128K output tokens, matching Lite. This is sufficient for whole-repository context in most mid-sized codebases, and large enough to handle SWE-Bench-style tasks that require reading multiple files in a single request
Code (preview) is the right choice for software engineering agents, developer IDE integrations, and CI/CD pipeline automation where coding-specific optimizations and output cleanliness outweigh the need for broad multimodal or frontier reasoning capabilities.
What models should I consider using alongside Dola Seed 2.0 Code (preview)?
No single model is optimal for every task. Here are models worth pairing with Dola Seed 2.0 Code (preview) depending on what your product needs:
- Dola Seed 2.0 Pro When a coding task requires deep mathematical reasoning, complex algorithm design, or multi-step planning that goes beyond what a coding-specialized model is tuned for, Pro provides the broader reasoning capability. Use Code for implementation and Pro for architecture-level reasoning when the task demands it
- Claude Sonnet 4.6 For code review, documentation generation, and technical writing tasks where nuanced natural language quality matters alongside code correctness, Claude Sonnet 4.6 is a strong complement. It also provides cross-provider redundancy for coding-adjacent tasks
- Gemini 2.5 Flash When your pipeline processes codebases larger than 256K tokens in a single pass, Gemini 2.5 Flash's 1M-token context window allows full-repository analysis without chunking. Route those extra-large context requests to Gemini while Code handles standard PR-sized tasks
- Mistral Codestral For latency-critical inline code completion in developer tooling where speed is the top priority over SWE-Bench performance, Codestral is a fast, specialized alternative. Pairing it with Dola Seed 2.0 Code gives you a tiered approach: Codestral for fast autocomplete and Code for multi-step agentic coding tasks
- UI-TARS-1.5-7B For agentic coding pipelines that need to interact with a web-based IDE, run code in a browser environment, or navigate a visual development interface, UI-TARS handles the GUI interaction layer that Code isn't designed for. The two cover complementary parts of an end-to-end coding agent
What are the challenges of using Dola Seed 2.0 Code (preview) in my product?
Like any production LLM, Dola Seed 2.0 Code (preview) comes with tradeoffs worth planning for:
- Preview status: This model is released as a preview, which means the API interface, benchmark performance, and pricing are subject to change or discontinuation without the same stability guarantees as a generally available release. Building production dependencies on a preview model introduces upgrade risk
- Narrower capability scope: Code (preview) is fine-tuned for software engineering tasks, which means its performance on general reasoning (GPQA Diamond, MMLU-Pro), video understanding, and multimodal image tasks lags behind Dola Seed 2.0 Pro. Routing non-coding requests to it may produce lower quality outputs than using a general-purpose model
- Provider dependency: Running all software engineering tasks through a single ByteDance endpoint creates fragility when the platform experiences downtime, model deprecation, or access policy changes. Without a fallback configured, your coding agent pipeline has no recovery path during an outage
- Cost at scale: At $1.20 per million output tokens (as of 06/08/2026), Code's output costs are lower than Pro but still compound quickly in high-throughput agent loops that generate extensive code or reasoning traces. Active budget limits and usage monitoring are important as agentic pipelines can generate unpredictable output volumes
Why should I use Merge Gateway to route LLM requests with Dola Seed 2.0 Code (preview) and every other model?
Using Dola Seed 2.0 Code (preview) through Merge Gateway gives you access to the model itself and the infrastructure layer around it:
- Build Your Own Router: Define what "best" means for your coding traffic by selecting from curated ML benchmarks like SWE-Bench Verified and LiveCodeBench, or adding your own eval scores from your internal test suite. The router picks the winning model per request and explains the decision, which is especially useful when balancing Code (preview) against Lite or Pro for different task types
- One API, every provider: Access Dola Seed 2.0 Code (preview) and every other major LLM through a single endpoint and API key. Change providers by swapping the model string — no application code changes required.
- Intelligent routing and automatic failover: Merge routes around ByteDance outages automatically. Routing policies based on cost, latency, or quality can reduce spend by 40–60% without touching your application code. Given Code's preview status, having automatic failover to a stable alternative is particularly valuable
- Cost governance: Set hard or soft project budgets so Dola Seed 2.0 Code (preview) spend stays within plan. Every request is attributed to a model, project, and tag in a unified billing dashboard across all providers
- Security and compliance controls: Apply DLP rules and prompt injection protection before every request reaches ByteDance. Enforce per-project model and region policies without adding that logic to your application
How can I start routing requests to Dola Seed 2.0 Code (preview) via Merge Gateway?
Getting Dola Seed 2.0 Code (preview) running through Merge Gateway takes a few minutes:
1. Create an account and get your API key from the dashboard.
2. Install the Merge Gateway SDK: run pip install merge-gateway-sdk (Python) or npm install merge-gateway-sdk (Node). Alternatively, if you're already using the OpenAI SDK, set base_url = "https://api-gateway.merge.dev/v1/openai" and your existing code works as-is.
3. Make your first request using the provider/model format. For Dola Seed 2.0 Code (preview), the model string is tencent/dola-seed-2.0-code. Swap the model string to route to any other provider without changing anything else.
4. Configure a routing policy in the dashboard to set failover behavior, cost limits, and optimization strategy. Your first policy can be as simple as naming Dola Seed 2.0 Code (preview) as primary with one fallback.
Full setup instructions and SDK references are in the Merge Gateway docs.
Try Dola Seed 2.0 Code (preview) through Merge Gateway
Route, observe, and control AI requests across providers from one API.





