Models

Doubao Seed 2.0 Code Preview vs GLM 5.2

Output tokens cost $2.41 per million on Doubao Seed 2.0 Code Preview and $3.94 per million on GLM 5.2. Input tokens cost $0.48 per million on Doubao Seed 2.0 Code Preview and $1.13 per million on GLM 5.2. Cached input tokens are billed at $0.10 per million on Doubao Seed 2.0 Code Preview and $0.28 per million on GLM 5.2. Context lengths are 256,000 tokens on Doubao Seed 2.0 Code Preview and 1,000,000 tokens on GLM 5.2. Time to first token (TTFT) measured on AIHubMix is 4.2s on Doubao Seed 2.0 Code Preview and 1.1s on GLM 5.2. Measured output throughput is 35.1 tok/s on Doubao Seed 2.0 Code Preview and 38.2 tok/s on GLM 5.2.

ByteDanceDoubao Seed 2.0 Code PreviewZ.AIGLM 5.2
ByteDance logo
Doubao Seed 2.0 Code Preview
ByteDance · text, image, video → text

The Doubao 2.0 series is a coding model optimized for real programming environments, capable of reliably invoking tools in common IDEs such as Claude Code. The model is specially optimized for frontend capabilities and performs well with common frontend frameworks. The model supports using Skills and can work with various custom skills.

Input$0.48 /M
Output$2.41 /M
Z.AI logo
GLM 5.2
Z.AI · text → text

GLM-5.2 is Z.ai’s flagship model for the era of long-horizon tasks. With a truly usable 1M-token context window, it can handle project-level engineering context, execute long-running tasks more reliably, follow engineering standards more consistently, and complete the full development workflow from requirements to multi-platform deployment in a single task.

Input$1.13 /M
Output$3.94 /M

Pricing & Specifications

Prices are per million tokens. Time to First Token and throughput are rolling averages measured on AIHubMix.

Doubao Seed 2.0 Code Preview
GLM 5.2
Input /M
$0.48
$1.13
Output /M
$2.41
$3.94
Cache read /M
$0.10
$0.28
Context length
256,000
1,000,000
Max output
128,000
128,000
Time to First Token
4.2 s
1.1 s
Throughput
35.1 tok/s
38.2 tok/s
Modalities
textimagevideo
text
Supported Parameters
thinkingwebtoolsfunction calling
thinkingtoolsfunction callingstructured outputs
API Formats
chat_completions · claude_api
Released
-
June 16, 2026

Promotional prices show the discounted rate; see each model page for promotion windows.

Activity Past 30 Days

Daily traffic served through AIHubMix — how demand for each model is trending.

doubao-seed-2-0-code-previewglm-5.2

Tokens / day

-

Requests / day

-

Performance Past 3 Days

Measured on real AIHubMix traffic, hourly buckets. Gaps mean no traffic in that hour.

doubao-seed-2-0-code-previewglm-5.2

Throughput (tok/s)

-

TTFT (s)

-

Uptime (%)

-

Cost calculator

Estimate your monthly bill for the same workload on each model.

Doubao Seed 2.0 Code Preview
$65.10 /mo
GLM 5.2
$127 /mo

Monthly = daily × 30. Discounted rates applied where a promotion is active.

FAQ

Which is cheaper: Doubao Seed 2.0 Code Preview, GLM 5.2?

Doubao Seed 2.0 Code Preview: $2.41/M output tokens; GLM 5.2: $3.94/M. Use the cost calculator above to estimate your own workload.

Which responds faster?

GLM 5.2: 1.1s time to first token measured on AIHubMix; see the live performance charts above for how each model behaves across the day.

How large is each context window?

Doubao Seed 2.0 Code Preview accepts 256,000 and GLM 5.2 accepts 1,000,000 input tokens. Maximum output per request is 128,000 tokens on Doubao Seed 2.0 Code Preview and 128,000 tokens on GLM 5.2.

Which one generates tokens faster?

GLM 5.2 at 38.2 tok/s and Doubao Seed 2.0 Code Preview at 35.1 tok/s, measured as output throughput on AIHubMix — a separate metric from time to first token.

What inputs and capabilities does each model support?

Doubao Seed 2.0 Code Preview accepts text, image and video input and supports thinking, web search, tool calling and function calling; GLM 5.2 accepts text input and supports thinking, tool calling, function calling and structured outputs.

Can I call Doubao Seed 2.0 Code Preview and GLM 5.2 with the same API key?

Yes. AIHubMix serves every model on this page behind one OpenAI-compatible endpoint, so switching between them is a one-line change to the model field — no second account, key or SDK.

Popular comparisons

Related model match-ups readers also look at.