ERNIE

ERNIE 4.0

by Baidu · Legacy; still documented in Baidu Qianfan's model library, but omitted from the current September 7, 2026 international Qianfan endpoint model list, which emphasizes newer ERNIE generations.

Baidu ERNIE 4.0 is a legacy Qianfan text-generation model for Chinese-language dialogue, instruction following, reasoning, content generation, and search-assisted enterprise workflows. It offers an 8,192-token documented context class, a 2,048-token maximum output, text-only operation, and historical pricing of CNY 0.12 per 1,000 input and output tokens.

Text Reasoning Coding
Baidu ERNIE 4.0 is a general-purpose language model for Chinese-language generation, dialogue, reasoning, and enterprise workflows. It is also referenced in Baidu documentation as ERNIE-Bot 4.0 and ERNIE-4.0-8K. The model is still listed in the Qianfan model library, although newer ERNIE generations receive greater emphasis in current endpoint documentation.
Outputs

What ERNIE 4.0 can produce

Text
Inputs

What it can understand

Text
Capabilities

Support features

Tool use Web search Streaming Batch API
Model profile

Performance characteristics

8/10 Reasoning
7/10 Coding
5/10 Speed
5/10 Cost efficiency
Specifications

Technical details

Family ERNIE
Type General Purpose
Context window 8K tokens
Max output tokens 2K tokens
Release date 2023-11-21
Status Legacy; still documented in Baidu Qianfan's model library, but omitted from the current September 7, 2026 international Qianfan endpoint model list, which emphasizes newer ERNIE generations.
Knowledge cutoff notes

No authoritative Baidu source was located that states a specific knowledge cutoff date for the exact ERNIE 4.0 model.

Model notes

The canonical model-library name is ERNIE 4.0. Baidu documentation also uses ERNIE-Bot 4.0 and ERNIE-4.0-8K for related platform and API references. Baidu's January 2024 release note states that the 4.0 service was upgraded from a 4K to an 8K version without changing the model's basic effect. An official Baidu Qianfan community comparison lists historical pricing of CNY 0.12 per 1,000 input tokens and CNY 0.12 per 1,000 output tokens. A later official promotional page describes a 5K-token input and 2K-token output configuration, so the 8K context figure should be interpreted as the model-version context class rather than a guarantee that every deployment exposes the full window. Baidu's model page identifies automatic Baidu Search plugin integration. The editorial scores are comparative estimates, not provider-published benchmark scores.

COST

Pricing

Input CNY 0.12 per 1,000 tokens
Output CNY 0.12 per 1,000 tokens
Model guide

ERNIE 4.0: Baidu’s Chinese-Language Enterprise Model with Qianfan Search Integration

ERNIE 4.0 is Baidu’s general-purpose text-generation model released on November 21, 2023. It is aimed mainly at Chinese-language enterprise applications, including dialogue, instruction following, knowledge questions, content generation, and workflows that can benefit from Baidu Search integration. The model remains documented in Qianfan, but its legacy status and shorter context and output limits make newer models more suitable for many new deployments.

What is ERNIE 4.0?

ERNIE 4.0 is Baidu’s general-purpose text-generation model, released on November 21, 2023. It belongs to the ERNIE model family and was designed for Chinese-language conversation, complex instruction following, knowledge-oriented question answering, reasoning, content creation, and business workflows.

The model is available through Baidu’s Qianfan platform. Depending on the documentation or endpoint, it may appear under the names ERNIE 4.0, ERNIE-Bot 4.0, or ERNIE-4.0-8K. These names are important when searching the Qianfan model catalog or configuring an application, because the platform’s naming has not always been completely uniform.

For practical purposes, ERNIE 4.0 is best understood as a text-in, text-out model with support for tool-related workflows and Baidu Search integration, rather than as a multimodal model for image, audio, or video tasks.

Current position in Baidu’s catalog

ERNIE 4.0 remains documented in Baidu’s Qianfan model library, so it has not been presented in the supplied research as completely unavailable. However, its status is best described as legacy. The current international Qianfan endpoint documentation dated September 7, 2026 emphasizes later ERNIE generations and does not include ERNIE 4.0 in that endpoint list.

This distinction matters when evaluating the model for a new project. A model can remain visible in a model library or continue to have documentation while receiving less prominence than newer alternatives. ERNIE 4.0 may still be relevant where an existing application depends on its behavior, pricing, or Baidu ecosystem integration. For a new deployment, developers should first confirm that the intended Qianfan region and endpoint still expose the model they need.

What ERNIE 4.0 is designed to do

ERNIE 4.0’s main role is general-purpose language processing, with particular relevance to Chinese-language use cases. Baidu positions the model for tasks such as:

  • Chinese-language enterprise chat and customer-facing dialogue
  • Following multi-step or complex written instructions
  • Answering knowledge questions and producing explanations
  • Drafting, rewriting, and other forms of content generation
  • Workflow applications that combine model responses with external tools
  • Applications that can benefit from automatic Baidu Search plugin integration

The search integration is a notable part of the model’s positioning. The supplied Baidu model documentation identifies automatic Baidu Search plugin integration, which can help applications that need access to search-supported information rather than relying only on the model’s built-in knowledge. This should not be interpreted as a guarantee that every deployment will produce authoritative or error-free answers: search-enabled responses still need suitable application-level checking.

Technical specifications and limits

The following figures come from the supplied Qianfan documentation and research. They describe the documented model configuration, but deployment-specific limits can vary by endpoint or platform presentation.

SpecificationDocumented value
ProviderBaidu
Model familyERNIE
Release dateNovember 21, 2023
Model typeGeneral-purpose text generation
Context length8,192 tokens
Maximum output2,048 tokens
InputText
OutputText
Tool useSupported in the supplied model data
StreamingSupported in the supplied model data
Batch APISupported in the supplied model data

A Qianfan release note states that the service was upgraded from a 4K version to an 8K version without changing the model’s basic effect. The 8,192-token figure therefore describes the documented context class associated with the upgraded version. At the same time, a later Baidu promotional page describes a configuration with approximately 5K tokens of input and 2K tokens of output. In practice, users should check the exact endpoint documentation instead of assuming that every interface exposes the entire theoretical context window as usable input.

The 2,048-token maximum output is also important for planning. It is suitable for answers, summaries, structured business text, and moderate-length drafts, but it is less convenient for very long reports, large code files, or tasks that require extensive generated context in one response. Applications can work around this by splitting tasks into stages, but that adds orchestration complexity.

Modalities, search, and tool support

ERNIE 4.0 is documented as text-only for both input and output. The supplied model data does not identify image, audio, or video input support, and it does not identify image, audio, video, music, embedding, or other non-text output modes. It should therefore not be selected for visual question answering, image generation, speech processing, or media creation.

The model does support tool-related workflows, and Baidu identifies automatic Baidu Search plugin integration. This makes ERNIE 4.0 more useful for applications that need a language model to combine conversation or instruction following with a search-backed step. The exact tool schema, permissions, and endpoint behavior should still be verified in the Qianfan documentation before production use.

Streaming is documented as supported, allowing an application to receive generated text progressively instead of waiting for the complete response. Batch API support is also recorded in the supplied model data. These features can help with user-facing responsiveness and offline processing, respectively, although they do not remove the model’s context or output limits.

Reasoning and coding performance

ERNIE 4.0 is intended to handle complex instructions and knowledge-oriented reasoning. The supplied editorial assessment gives it a reasoning score of 8 out of 10 and a coding score of 7 out of 10. These are comparative editorial estimates, not benchmark results published by Baidu, so they should be treated as directional rather than as verified performance measurements.

The reasoning assessment indicates that the model may be a good fit for tasks such as breaking down business requests, producing explanations, and handling multi-part Chinese-language instructions. The coding assessment suggests that it can assist with ordinary code generation and software-related questions, but the available research does not establish a specific programming-language benchmark, accuracy rate, or guaranteed code quality.

For high-stakes reasoning or software development, generated answers should be checked by a person or by application tests. The model’s relatively short maximum output also means that larger programming tasks may need to be divided into smaller prompts.

Pricing and cost trade-offs

The supplied official Qianfan pricing comparison lists ERNIE-4.0-8K at CNY 0.12 per 1,000 input tokens and CNY 0.12 per 1,000 output tokens. Input and output are priced at the same documented rate. Actual billing, eligibility, and availability should be confirmed in the Qianfan account and endpoint documentation before purchase.

The research gives ERNIE 4.0 an editorial speed score of 5 out of 10 and cost score of 5 out of 10. These scores are not provider-published measurements. They indicate a middle-of-the-range practical trade-off in the supplied comparison rather than a guaranteed latency or cost ranking.

Its value is therefore less about being the newest or cheapest possible option and more about combining a mature Baidu text model with Chinese-language capabilities, Qianfan access, search integration, and a documented per-token price. For applications that need very high throughput, the newest available model, or substantially longer responses, another Qianfan option may be more appropriate if supported in the target region.

Main strengths and limitations

Strengths

  • Focused on Chinese-language dialogue, generation, and instruction following.
  • Supports knowledge questions and general enterprise content tasks.
  • Offers documented Baidu Search integration for search-assisted workflows.
  • Supports streaming, tool-related workflows, and batch processing according to the supplied model data.
  • Has a documented 8K context-class version and a clear historical token price.

Limitations

  • It is a legacy model in the supplied research, while current Qianfan endpoint documentation emphasizes newer ERNIE generations.
  • It is text-only and is not documented for image, audio, or video understanding or generation.
  • The maximum output is 2,048 tokens, which limits long single-response generation.
  • The 8K context description does not mean every deployment exposes the full window; one Baidu page describes roughly 5K input and 2K output.
  • No verified knowledge-cutoff date is available for the exact model.
  • The supplied research does not verify fine-tuning, caching, or a distinct JSON mode.

When to choose ERNIE 4.0

ERNIE 4.0 is a reasonable choice when an application is centered on Chinese-language enterprise text, needs conventional dialogue or content generation, and can benefit from Baidu Search integration. It may also make sense when an existing Qianfan application already depends on the model and its established behavior.

Choose a different option when the project requires image, audio, or video capabilities; very long generated responses; a long context window; a newer model generation; or a model prominently listed in the current regional endpoint catalog. A newer ERNIE model may be a better starting point for a new application if it provides the required compatibility and availability. Similarly, a faster or lower-cost model may be preferable for high-volume, simple classification or routine text tasks, while a more advanced model may be preferable for demanding reasoning or code-generation workloads.

Before committing to production, verify the model identifier, regional availability, current price, request limits, and exposed input/output configuration in the relevant Qianfan endpoint. This is especially important for ERNIE 4.0 because its catalog status and documented configuration have changed over time.


Answers to Frequently Asked Questions

Is ERNIE 4.0 still available on Baidu Qianfan?
ERNIE 4.0 remains documented in Baidu’s Qianfan model library, but it is best treated as a legacy model. Current regional endpoint documentation emphasizes newer ERNIE generations, so developers should verify the model identifier, regional availability, pricing, and endpoint support before using it in a new or production application.
What are the context length, output limit, and price of ERNIE 4.0?
The documented ERNIE-4.0-8K configuration has an 8,192-token context length and a maximum output of 2,048 tokens. Official Qianfan pricing lists CNY 0.12 per 1,000 input tokens and CNY 0.12 per 1,000 output tokens, although users should confirm the exact limits and billing for their endpoint.
What is ERNIE 4.0?
ERNIE 4.0 is Baidu’s general-purpose text-generation model, released on November 21, 2023. It is designed primarily for Chinese-language conversation, complex instruction following, knowledge-based question answering, reasoning, content creation, and enterprise workflows through the Qianfan platform.
Does ERNIE 4.0 support Baidu Search and multimodal input?
ERNIE 4.0 supports tool-related workflows and automatic Baidu Search plugin integration. However, it is documented as a text-only model and is not identified as supporting image, audio, or video input or output.


Sources 6
AI Provider

About Baidu