# Baidu: ernie-5.1

- Model ID: `ernie-5.1`
- Provider: Baidu
- Web version: https://www.moleapi.com/en/models/baidu/ernie-5.1
- Content status: catalog

## Model introduction

ernie-5.1 is a Baidu model available through MoleAPI with openai access. It fits OpenAI compatible workflows, with pricing synced from the MoleAPI console.

## Model capabilities

- OpenAI compatible

### Verified specifications

- Catalog status: Currently available on MoleAPI
- Compatible protocols: openai
- Available billing groups: Standard

## Model pricing and access

Pricing is supplied dynamically by the MoleAPI console API.

### Standard (default, x1)

- Input: $0.6 / 1M tokens
- Output: $2.65 / 1M tokens

### Access protocols

| Protocol | Method | Endpoint |
| --- | --- | --- |
| openai | POST | /v1/chat/completions |

- Live pricing source: https://home.moleapi.com/api/pricing

## About ernie-5.1

# ERNIE 5.1 model guide

ERNIE 5.1 is Baidu’s flagship text and reasoning model, positioned for agentic reasoning, knowledge-intensive tasks, and creative writing. Baidu AI Studio documents web-search enhancement, function calling, and structured output support for the model. [3][4]

## Positioning and core capabilities

Baidu released ERNIE 5.1 on May 9, 2026, describing it as a compressed successor to ERNIE 5.0 that retains its predecessor’s pre-training foundation. [4] Baidu positions the model around reasoning, knowledge, agent workflows, and creative-writing performance. [4]

The AI Studio service classifies ERNIE 5.1 for text-to-text generation and thinking workloads. It supports web-search enhancement, function calling, and structured output for tool-using and schema-constrained applications. [3]

## Capabilities and specs

ERNIE 5.1 has a documented context window of 128K tokens and accepts up to 119K input tokens. [3] Its standard text listing supports configurable outputs from 2 to 65,536 tokens, with a default output setting of 2K tokens. [3]

| Specification | Documented value |
|---|---|
| Release date | May 9, 2026 [4] |
| Context window | 128K tokens [3] |
| Maximum input | 119K tokens [3] |
| Standard output range | 2–65,536 tokens [3] |
| Default output setting | 2K tokens [3] |
| Thinking Preview chain-of-thought allowance | Up to 60K tokens [3] |
| Documented features | Web-search enhancement, function calling, structured output [3] |

Baidu states that ERNIE 5.1 reduces total parameters to approximately one-third and active parameters to approximately one-half of ERNIE 5.0. [4] Baidu also reports pre-training costs of about 6% of comparable models at the same scale; this is a vendor-reported cost claim. [4]

## Use cases

ERNIE 5.1 is suited to agent workflows that combine model reasoning with external tools through function calling. [3][4] Web-search enhancement supports search-assisted responses for knowledge-intensive tasks. [3]

Structured output support makes the model applicable to systems that require reliably formatted responses, including automated extraction, routing, and downstream application workflows. [3] Baidu also positions the model for creative-writing tasks alongside reasoning and knowledge work. [4]

## Material limitations

The standard ERNIE 5.1 listing and the ERNIE 5.1 Thinking Preview listing have different documented minimum output settings: 2 tokens for the standard listing and 1 token for Thinking Preview. [3] The Thinking Preview listing documents a chain-of-thought allowance of up to 60K tokens. [3]

Baidu’s parameter-reduction and training-cost statements are vendor claims rather than independently reported measurements. [4]

## Sources

- [3] [Baidu AI Studio LLM API documentation](https://ai.baidu.com/ai-doc/AISTUDIO/Mmhslv9lf)
- [4] [Baidu: ERNIE 5.1 Officially Released](https://ernie.baidu.com/blog/posts/ernie-5.1-0508-release/)


## Code examples

### cURL

```bash
curl https://api.moleapi.com/v1/chat/completions \
  -H "Authorization: Bearer $MOLEAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"ernie-5.1","messages":[{"role":"user","content":"Hello"}]}'
```

## More related models

- [ernie-5.0-thinking-preview](https://www.moleapi.com/en/models/baidu/ernie-5.0-thinking-preview) — Baidu
- [ernie-4.5-300b-a47b](https://www.moleapi.com/en/models/baidu/ernie-4.5-300b-a47b) — Baidu
- [ernie-4.5-turbo-128k](https://www.moleapi.com/en/models/baidu/ernie-4.5-turbo-128k) — Baidu
- [gpt-5.6-luna](https://www.moleapi.com/en/models/openai/gpt-5.6-luna) — OpenAI
- [gpt-5.6-sol](https://www.moleapi.com/en/models/openai/gpt-5.6-sol) — OpenAI
- [gpt-5.6-terra](https://www.moleapi.com/en/models/openai/gpt-5.6-terra) — OpenAI

## Frequently asked questions

### How is ernie-5.1 priced?

Prices are read from the MoleAPI console API and update with model prices, context tiers, and account groups.

### How can I access ernie-5.1?

The catalog currently lists openai.

### How do I switch an existing project to ernie-5.1?

Keep the MoleAPI API address and key, replace the model parameter, and check protocol-specific parameters.

### Where do the ernie-5.1 details come from?

Only confirmed availability, pricing, and protocol details from the MoleAPI catalog are included.
