← All articles

Volcengine Ark / Doubao API Complete Guide: ByteDance's LLM Platform via TheRouter

Everything you need to start building with Volcengine Ark and Doubao models — account setup, API key, OpenAI-compatible endpoints, 8 model variants, pricing tiers, common errors, and production tips.

· TheRouter

Volcengine Ark (火山方舟) is ByteDance's managed AI model platform. It serves the entire Doubao family — from the ultra-low-cost Seed 2.0 Mini to the frontier Seed 2.0 Pro — through a single OpenAI-compatible endpoint. You swap your base_url and api_key, keep your existing OpenAI SDK code, and you are calling ByteDance models without changing a line of business logic.

We wrote this guide because Volcengine's documentation is comprehensive but spread across dozens of Chinese-language pages, and the relationship between "Volcengine," "Volcano Ark," "Doubao," and "Seed" confuses most developers on first contact. This is the single reference we wanted when we first added Volcengine to our routing configuration.

What Volcengine Ark, Doubao, and Seed Are

The naming matters, so here is the hierarchy:

  • Volcengine (火山引擎) is ByteDance's cloud platform — the equivalent of AWS or Alibaba Cloud, but from ByteDance.
  • Volcano Ark (火山方舟) is the AI model service layer within Volcengine. Every LLM API call goes through Ark.
  • Doubao (豆包) is the consumer-facing AI product brand — the ChatGPT equivalent for Chinese users. The API models carry the Doubao name.
  • Seed is ByteDance's internal research team and the name for the latest generation of models (Seed 1.6, Seed 1.8, Seed 2.0).

In practice: you sign up on Volcengine, open the Ark console, enable Doubao models, and call the Ark API. The models are branded "Doubao Seed" in the API.

OpenAI-compatible means a provider exposes a chat-completions endpoint whose request and response shape matches the OpenAI API contract closely enough that an unmodified OpenAI SDK call works against it after swapping three values: API key, base URL, and model name. The minimum surface in practice is POST /v1/chat/completions with messages, model, and an OpenAI-shaped streaming response.

Getting Started in 3 Minutes

Step 1: Create a Volcengine account. Go to console.volcengine.com and sign up. Volcengine supports phone (Chinese mainland), email, and WeChat login. Complete real-name verification (实名认证) — this is required before you can call any model.

Step 2: Get your API key. Navigate to the Ark console → sidebar API Key Management (API Key 管理) → Create API Key. Copy the key — Volcengine will not show it again.

Step 3: Enable models. Go to Model Access Management (开通管理) in the Ark console and enable the Doubao models you want to use. Each model must be individually activated — you cannot call a model you have not enabled.

Step 4: Make your first call. Install the OpenAI Python SDK:

pip install --upgrade openai

Then run:

from openai import OpenAI
import os

client = OpenAI(
    api_key=os.getenv("ARK_API_KEY"),
    base_url="https://ark.cn-beijing.volces.com/api/v3",
)

response = client.chat.completions.create(
    model="doubao-seed-1-6-251015",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain what Volcengine Ark is in one paragraph."},
    ],
)

print(response.choices[0].message.content)

That is it. You just called a Doubao model using the standard OpenAI SDK. The only differences: base_url points to Ark, api_key is your Ark key, and model is a Doubao model ID.

Base URL note: The Ark API endpoint is https://ark.cn-beijing.volces.com/api/v3. For the Coding Plan (designed for coding tools like Claude Code and Cursor), use https://ark.cn-beijing.volces.com/api/coding instead.

Available Models: The Full Doubao Lineup

Volcengine hosts the entire Doubao model family. Here are the key models routable through TheRouter as of June 2026:

ModelTheRouter IDContextInput ($/1M tokens)Output ($/1M tokens)Best for
Doubao 1.5 Thinking Vision Probytedance/doubao-1.5-thinking-vision-pro128K$0.001008$0.003024Multimodal reasoning with images
Doubao Seed 1.6 Thinkingbytedance/doubao-seed-1.6-thinking256K$0.000264$0.002688Deep reasoning, math, code
Doubao Seed 2.0 Code Previewbytedance/doubao-seed-2.0-code-preview-260215262K$0.001080$0.005376Agentic coding, code generation
Doubao Seed 2.0 Litebytedance/doubao-seed-2.0-lite-260215262K$0.000204$0.001212Cost-efficient production workloads
Doubao Seed 2.0 Minibytedance/doubao-seed-2.0-mini-260215262K$0.000072$0.000672Ultra-low-cost, high-throughput
Doubao Seed 2.0 Probytedance/doubao-seed-2.0-pro-260215262K$0.001080$0.005376Frontier quality, complex tasks

Pricing from models-data.ts and Volcengine Ark pricing page, retrieved 2026-06-13. Prices in USD per 1M tokens.

Update, 2026-10-10: the Doubao 1.5 Pro (32K) and Doubao Seed 1.6 rows were removed — ByteDance retired those snapshots on 2026-09-21 (Volcengine Ark model lifecycle, batch 9) and they no longer resolve on TheRouter. The vendor-designated replacement is Doubao Seed 2.0 Lite.

Understanding the Model Tiers

Seed 2.0 series (February 2026 launch) is the latest generation, optimized for production deployment:

  • Pro — frontier model. Best quality on complex reasoning, multi-step tasks, and agent workflows. Ranked 6th on LMSYS Chatbot Arena overall and 3rd on Vision Arena as of the launch date (source).
  • Code Preview — specialized for agentic coding. Same pricing as Pro, optimized for software development workflows with 256K context and vision capability for UI screenshots.
  • Lite — cost-efficient variant. Roughly 80% of Pro quality at a fraction of the price. Good for production workloads where you need to keep costs low.
  • Mini — ultra-low-cost. Input pricing at $0.000072/1M tokens makes it one of the cheapest LLM API options available anywhere. Ideal for classification, extraction, and high-throughput tasks where you need volume over quality.

Seed 1.6 series remains available and practical:

  • Seed 1.6 — strong general-purpose model at 256K context with rock-bottom pricing. Supports thinking mode, non-thinking mode, and adaptive thinking mode.
  • Seed 1.6 Thinking — deep reasoning variant with explicit reasoning traces. Higher output pricing reflects the thinking token overhead.

1.5 series is the legacy generation, still available for existing integrations.

Direct Volcengine Models (via Ark API Directly)

In addition to the models routable through TheRouter, Volcengine Ark hosts an extended set of Doubao models when you call the Ark API directly. These include newer releases like Doubao Seed 1.8 (256K context, enhanced agent capabilities), Doubao Seed Code (specialized agentic coding model), vision-specific variants, and embedding models (doubao-embedding-large). Volcengine also hosts third-party models on Ark — including DeepSeek R1/V3, GLM, and Kimi models — accessible through the same Ark API key and endpoint.

OpenAI SDK Setup: base_url, Model IDs, Streaming

Python

from openai import OpenAI
import os

client = OpenAI(
    api_key=os.getenv("ARK_API_KEY"),
    base_url="https://ark.cn-beijing.volces.com/api/v3",
)

# Non-streaming
response = client.chat.completions.create(
    model="doubao-seed-2-0-pro-260215",
    messages=[{"role": "user", "content": "What is a transformer?"}],
)
print(response.choices[0].message.content)

# Streaming
stream = client.chat.completions.create(
    model="doubao-seed-2-0-pro-260215",
    messages=[{"role": "user", "content": "Write a haiku about AI"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

curl

curl https://ark.cn-beijing.volces.com/api/v3/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{
    "model": "doubao-seed-2-0-pro-260215",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Thinking Mode (Deep Reasoning)

Volcengine Ark supports a thinking mode for Seed 1.6 and later models. Enable it via extra_body:

response = client.chat.completions.create(
    model="doubao-seed-1-6-251015",
    messages=[{"role": "user", "content": "Prove that the square root of 2 is irrational."}],
    extra_body={
        "thinking": {"type": "enabled", "budget_tokens": 32000}
    },
)

The thinking tokens appear in the response and count toward output pricing, but the reasoning trace itself provides transparency into the model's problem-solving process.

Function Calling / Tool Use

All Doubao models listed above support function calling via the standard OpenAI tools and tool_choice parameters:

response = client.chat.completions.create(
    model="doubao-seed-2-0-pro-260215",
    messages=[{"role": "user", "content": "What's the weather in Beijing?"}],
    tools=[{
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get current weather for a city",
            "parameters": {
                "type": "object",
                "properties": {
                    "city": {"type": "string", "description": "City name"}
                },
                "required": ["city"]
            }
        }
    }],
    tool_choice="auto",
)

Pricing Deep-Dive

Volcengine Ark uses tiered pricing based on input length for the Seed series. For the Seed 1.6/1.8 models on the Ark API directly (CNY pricing from official docs):

Input lengthInput (¥/M tokens)Output (¥/M tokens)
0–32K0.88
32K–128K1.216
128K–256K2.424

Source: Volcengine Ark pricing, retrieved 2026-06-13.

Short-output discount: When input ≤ 32K and output ≤ 200 tokens, output pricing drops to ¥2/M tokens. This is useful for classification and extraction tasks.

Thinking tokens are billed at the same output rate — no surcharge for reasoning traces.

How Does This Compare?

ProviderBudget model (input $/1M)Frontier model (input $/1M)Notes
Volcengine Ark (Doubao)$0.000072 (Seed 2.0 Mini)$0.001080 (Seed 2.0 Pro)Lowest budget tier
DashScope (Qwen)~$0.07 (Qwen3-8B free)~$0.40 (Qwen3-Max)Free tier available
SiliconFlow$0 (Qwen3-8B free)~$1.74 (DeepSeek-V4-Pro)Multi-vendor
DeepSeek~$0.07 (V3 cache hit)~$0.55 (R1)Strong reasoning

Doubao's pricing is aggressive — the Seed 2.0 Mini model at $0.000072/1M input tokens is among the lowest production-grade LLM API prices available anywhere. For high-throughput, cost-sensitive workloads (chatbot deflection, document extraction, classification), this pricing is hard to beat.

Free Tier

New Volcengine accounts receive 500,000 free inference tokens per model after completing identity verification. The free quota expires after 30 days. Volcengine also offers an "安心模式" (safe mode) that caps usage at the free allocation — once exhausted, requests stop rather than incur charges.

Common Errors and Fixes

ErrorHTTP statusCauseFix
AuthenticationError401Invalid or expired API keyRegenerate key in Ark console → API Key Management
AccessDenied403Model not enabled for your accountGo to Ark console → Model Access Management → enable the model
AccountOverdueError403Account balance below zeroTop up in Volcengine billing center
InvalidEndpointOrModel.NotFound404Wrong model ID or model not activatedVerify the model ID matches the Ark catalog exactly
RateLimitExceeded429RPM or TPM limit exceededImplement exponential backoff; consider upgrading your service tier
QuotaExceeded429Free quota exhaustedSwitch to paid billing
InputTextSensitiveContentDetected400Content moderation triggeredModify input text — Volcengine enforces Chinese content regulations
InternalServiceError500Server-side issueRetry with backoff; file a support ticket if persistent

Error codes from Volcengine Ark error reference, retrieved 2026-06-13.

Troubleshooting priority: API key validity → model enabled → account balance → request parameters → rate limits.

The Model-Enabling Gotcha

Unlike DashScope or SiliconFlow — where you get an API key and immediately call any model — Volcengine Ark requires you to explicitly enable each model in the console before you can call it. If you skip this step, you will get a 404 ModelNotOpen error that looks like the model does not exist. This trips up nearly every developer on their first Ark integration.

Production Checklist

Before shipping a Volcengine Ark integration to production:

  • API key rotation — Store keys in environment variables or a secrets manager, never in source code. Volcengine API keys do not expire automatically, but rotate them periodically.
  • Model enablement — Verify every model you plan to call is enabled in the Ark console. Automate this check in your CI pipeline.
  • Rate limit awareness — Volcengine enforces per-model RPM (requests per minute) and TPM (tokens per minute) limits. Monitor 429 responses and implement exponential backoff.
  • Content moderation — Volcengine enforces Chinese content regulations. Input and output can be flagged. Handle 400 InputTextSensitiveContentDetected gracefully in your error paths.
  • Billing alerts — Set up spending alerts in the Volcengine billing console. The "safe mode" (安心模式) prevents unexpected charges during development.
  • Latency baseline — Ark's Beijing endpoint (ark.cn-beijing.volces.com) is optimized for China-based traffic. If your servers are outside mainland China, expect higher latency. Factor this into your timeout configuration.
  • Fallback strategy — Configure a provider fallback so that if Volcengine Ark is unreachable or rate-limited, your application falls back to an alternative provider. TheRouter's fallback routing handles this automatically.

TheRouter Integration

TheRouter routes OpenAI-compatible requests through configured providers, including Volcengine Ark. If you are already using TheRouter, you can add Doubao models to your routing configuration without changing any application code.

All 8 Doubao models listed in the table above are available through TheRouter with the bytedance/ prefix. For example:

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_THEROUTER_KEY",
    base_url="https://api.therouter.ai/v1",
)

response = client.chat.completions.create(
    model="bytedance/doubao-seed-2.0-pro-260215",
    messages=[{"role": "user", "content": "Hello from TheRouter!"}],
)

Fallback Chains

You can configure Doubao models as part of a fallback chain — for example, try Doubao Seed 2.0 Pro first, fall back to DeepSeek V4 if Volcengine is unavailable:

bytedance/doubao-seed-2.0-pro-260215 → deepseek/deepseek-v4-flash

This gives you the cost advantage of Doubao's pricing with the reliability of multi-provider redundancy. See our LLM API fallback routing guide for the full setup.

Further Reading

Help & contact