Wenxin

Ernie 5.1

BaiduToken-basedDynamic Pricing
Alias:ernie-5.1
Create API Key

Compare ernie-5.1 API pricing, supported endpoints, capabilities and access options on Modelsell.

textreasoningfunction_calling
Starting price
View full pricing
Context
121.9K
Maximum input window
Max output
65.5K
Maximum tokens per response
Modalities
→

Pricing by Supplier

Compare prices and service performance for this model across suppliers.

Suppliers1
USD · Per 1M tokensPerformance · Last 24 hours
SupplierDiscountTierInput/MOutput/M
Baidu
-35%
输入≤32KInput ≤ 32768 tokens
$0.39$0.6
$1.755$2.7
输入>32KInput > 32768 tokens
$0.585$0.9
$2.145$3.3
Crossed-out amounts are standard prices.Performance over the last 24 hours; actual results vary by request.

Scroll horizontally to compare all prices and performance metrics.

Capabilities / Supported modalities

StreamingReasoningFunction callingToolsWeb search
Input
Output

Provider & data privacy

Provider
BaiduDocs
Tokenizer
Ernie tokenizer
License
Proprietary (commercial)Proprietary
Data retention73 daysNot used for upstream training by default

Performance

Benchmarks

Scores on standardized evaluations. Higher percentages are better — and rank percentile shows

Metrics sourced fromArtificial Analysis 2026-09-30·Ernie 5.1

This model is not included in the current benchmark snapshot.

Missing models or measurements are not zero scores.

Benchmark charts preserve the source model selection and reasoning settings. Missing models or measurements are not zero scores, and benchmark cost or speed is not this site’s service commitment.

About Ernie 5.1

ERNIE 5.1

百度文心通用文本模型,侧重知识问答、创意写作、推理及多步智能体任务;支持函数调用和联网搜索,官方详情列出 119K 输入、60K 思维链及 64K 输出上限。

适合通用问答、写作、复杂问题分析与多步工具任务。官方介绍其训练采用异步强化学习和智能体后训练,以改善长任务的执行能力。模型为文本输入、文本输出,支持函数调用和联网搜索,不支持结构化输出、前缀读写或 FIM。模型详情的输入上限为 119K、思维链为 60K、输出为 64K;本站输入长度字段按详情页记录为 121856 tokens。价格页的 128K 是分档范围,不应替代详情页的实际输入限制。参数量及知识截止日期未公开。

本站基础报价

单位:美元 / 百万 token。按当前站内汇率 1 USD = ¥6.8 将官方人民币单价换算为美元,再对每项单价向上取整到小数点后 1 位;分组倍率另计。缓存读取与普通输入分别取整。

档位输入输出缓存读取
输入≤32K$0.6$2.7未单独定价
输入>32K$0.9$3.3未单独定价

按完整输入 token 数分档,32K 按 32768 tokens 计算;边界值属于低档。输出采用对应输入档位的单价。官方未列出独立缓存价,因此不额外设置缓存折扣。联网搜索属于上游可选工具,其按次费用不包含在普通 token 单价中。

官方价格参考

单位:人民币 / 百万 token。

档位输入输出缓存读取
输入≤32K¥4¥18未列出
输入>32K¥6¥22未列出

资料核实日期:2026-11-12。模型资料与报价已核对;本站渠道的真实推理及缓存结算尚未在本次操作中测试。

来源

Use cases and prompting

调用示例

向本站 OpenAI 兼容接口发送请求:

POST /v1/chat/completions
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
  "model": "ernie-5.1",
  "messages": [
    {
      "role": "user",
      "content": "请将这份材料整理为要点、依据和待确认事项。"
    }
  ],
  "max_tokens": 2048,
  "stream": false
}

工具任务需由应用提供函数定义、执行工具并回传结果。长材料任务请说明输出字段和判断标准,并为最终回答预留输出空间。示例依据接口资料整理,本次未进行真实模型调用。

API access

API documentation

Code samples

RequestPOST/v1/chat/completions
Example request
Parameters
ParameterTypeDefault / rangeDescription
temperature
number
=10 ~ 2
Sampling temperature; lower is more deterministic
top_p
number
=10 ~ 1
Nucleus sampling probability mass
max_tokens
integer>= 1Maximum number of tokens in the response
frequency_penalty
number
=0-2 ~ 2
Penalises repetition of frequent tokens
presence_penalty
number
=0-2 ~ 2
Encourages introducing new topics
stop
array—Up to 4 strings that stop generation
seed
integer—Deterministic sampling seed (best-effort)
n
integer
=1>= 1
Number of completions to generate
stream
boolean
=false
Stream tokens via Server-Sent Events
response_format
object—Force JSON object or schema-conforming output
tools
array—Tool / function declarations the model may call
tool_choice
string
autononerequired
Tool-choice policy or specific tool name
logprobs
boolean
=false
Return per-token log probabilities
top_logprobs
integer0 ~ 20Number of top log probabilities returned per token
logit_bias
object—Per-token logit bias map
user
string—End-user identifier for abuse monitoring

Replace <YOUR_API_KEY> with the API key from your token settings.

Authentication

All requests must include Authorization: Bearer <TOKEN> header. Anthropic-formatted endpoints accept the x-api-key header instead.

Generate tokens from the Tokens page; you can scope them to specific models, groups, IPs, and rate-limits.

Supported parameters

Generation parameters
ParameterTypeDefault / rangeDescription
temperature
number
=10 ~ 2
Sampling temperature; lower is more deterministic
top_p
number
=10 ~ 1
Nucleus sampling probability mass
max_tokens
integer>= 1Maximum number of tokens in the response
frequency_penalty
number
=0-2 ~ 2
Penalises repetition of frequent tokens
presence_penalty
number
=0-2 ~ 2
Encourages introducing new topics
stop
array—Up to 4 strings that stop generation
seed
integer—Deterministic sampling seed (best-effort)
n
integer
=1>= 1
Number of completions to generate
stream
boolean
=false
Stream tokens via Server-Sent Events
response_format
object—Force JSON object or schema-conforming output
tools
array—Tool / function declarations the model may call
tool_choice
string
autononerequired
Tool-choice policy or specific tool name
logprobs
boolean
=false
Return per-token log probabilities
top_logprobs
integer0 ~ 20Number of top log probabilities returned per token
logit_bias
object—Per-token logit bias map
user
string—End-user identifier for abuse monitoring

Rate limits

SupplierRPMTPMRPD
BaiduUnlimitedUnlimitedUnlimited

No restriction

Frequently asked questions about ernie-5.1

What is ernie-5.1?

Compare ernie-5.1 API pricing, supported endpoints, capabilities and access options on Modelsell.

How do I call ernie-5.1?

Create an API key with access to ernie-5.1, then use the exact model ID and a supported endpoint from the API access section. Request fields depend on the selected endpoint.

How is ernie-5.1 priced?

Pricing depends on the selected provider group and the model billing unit. The current input, output, request, or media prices are shown on this page before sign-up.

What is the context window of ernie-5.1?

The model catalog lists a context window of 121856 tokens. Check the selected endpoint for request limits.

What is the maximum output of ernie-5.1?

The model catalog lists a maximum output of 65536 tokens. Your request settings may set a lower limit.

How should I evaluate ernie-5.1 for my project?

Start with the use cases and prompting guidance on this page, then evaluate the model with representative inputs from your project.