Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Baidu - Closed weights

ERNIE 5.1 pricing and specs

ERNIE 5.1 is a closed-weights model from Baidu that costs $0.56 per 1M input tokens and $2.53 per 1M output tokens on the first-party API, with a 128K-token context window.

Last verified from intl.cloud.baidu.com. All sources

Input / 1M
$0.56
Output / 1M
$2.53
Context
128K tokens
Weights
Closed

Pricing per 1M tokens

ItemPrice / 1M tokens
InputPrompts up to 32,000 tokens$0.56
OutputPrompts up to 32,000 tokens$2.53
Long-context inputPrompts over 32,000 tokens$0.84
Long-context outputPrompts over 32,000 tokens$3.10

Note: Baidu AI Cloud international (Qianfan) pay-as-you-go text generation pricing, page updated 2026-09-07. Two prompt-length tiers: Input<=32k is $0.56 in / $2.53 out; 32k<Input<=128k is $0.84 in / $3.10 out (the page writes the boundary as '32k', recorded as aboveTokens 32000). No cache-hit or batch price is listed for ERNIE 5.1. Context length is stated as '128k' (max input 119k) on the model list, recorded as 128000; max output [1, 65536]. Release date is the ERNIE blog launch post's date (May 9, 2026; the post slug reads 0508). Text generation only on the international model list. Not listed in the Vercel AI Gateway model list on 2026-10-17.

Specs

Context window
128,000 tokens
Max output
65,536 tokens
Release date
Provider
Baidu
API model id
ernie-5.1
Weights
Closed weights

What ERNIE 5.1 costs in practice

Worked from the standard list rates above, with the math shown so you can swap in your own token counts. These use the base rates, which apply while each request's prompt stays at or under 32,000 tokens; above that, ERNIE 5.1 bills $0.84 input and $3.10 output for the whole request.

One agent session

1M input tokens and 100K output tokens, no caching.

  • Input1M x $0.56 = $0.56
  • Output0.1M x $2.53 = $0.253

$0.813per session

A chat app

10,000 requests a day at 2K input and 500 output tokens each.

  • Input20M x $0.56 = $11.20
  • Output5M x $2.53 = $12.65

$23.85per day

$715.50 per 30-day month

Compare with

ModelInput / 1MOutput / 1M
ERNIE 5.1 (this page)$0.56$2.53
Hy4 previewTencent$0.834$2.501
Amazon Nova 2 LiteAmazon$0.30$2.50
Dola Seed 2.1 TurboByteDance Seed$0.50$2.50
Gemini 2.5 FlashGoogle$0.30$2.50
ERNIE 5.0Baidu$0.84$3.38
ERNIE 4.5 Turbo VLBaidu$0.42$1.27
ERNIE 4.5 Turbo VL (32K)Baidu$0.42$1.27
ERNIE 4.5 Turbo (128K)Baidu$0.11$0.45
ERNIE 4.5 Turbo (32K)Baidu$0.11$0.45

FAQ

How much does ERNIE 5.1 cost per million tokens?

ERNIE 5.1 costs $0.56 per 1M input tokens and $2.53 per 1M output tokens on Baidu's first-party API, per intl.cloud.baidu.com on October 17, 2026. Prompts over 32,000 tokens are billed at $0.84 input and $3.10 output for the whole request.

What is ERNIE 5.1's context window?

ERNIE 5.1 has a 128,000-token context window and returns up to 65,536 output tokens per response.

Are ERNIE 5.1's weights open?

No. ERNIE 5.1 is a closed-weights model. You call it through Baidu's API as ernie-5.1.

When was ERNIE 5.1 released?

Baidu released ERNIE 5.1 on May 9, 2026.

Sources

Last verified from intl.cloud.baidu.com.

Newsletter

Get model price changes as they ship

One email per week. New model releases, price cuts and what they mean for your bill.