ERNIE 5.0 API

ERNIE 5.0 is Baidu’s unified foundation model supporting text generation, visual understanding, and deep-thinking reasoning, with a 128K context window.

Modalities
TextText
In / Out price
$1.4/$5.6per 1M
Context window
125K tokens
Released
Jun 30, 2026

ERNIE 5.0 overview

ERNIE 5.0 by Baidu

With advanced reasoning, multimodal understanding, and global language support, ERNIE 5.0 is redefining how AI interacts with complex data.

ERNIE 5.0 specs

Model ID
baidu/ernie-5.0
Developer
Baidu
Context window
128,000 tokens
Max output
65,536 tokens
Input
Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

ERNIE 5.0 is a large-scale foundation model with trillions of parameters designed for high‑accuracy language and multimodal understanding. It is developed by Baidu and positions itself among the strongest global models in reasoning, instruction following, and creative tasks.

  • ERNIE 5.0 supports text, image, audio, and video inputs and outputs as a native capability, not as an add‑on.
  • Benchmarks show performance comparable to leading international systems across language and multimodal tasks.
  • Designed for high-performance, complex reasoning tasks
  • Provides maximum accuracy and advanced multimodal functionality for enterprise-grade applications

Enhanced Multimodal Capabilities
Seamlessly process and integrate text, images, video, and audio for unified AI understanding.

Use cases

ERNIE 5.0 is documented as suited to multimodal understanding and generation across text, images, audio, and video. It is also described as useful for instruction following and agentic tool-use tasks. The model is further documented for creative writing. It is also cited for factual reasoning and document understanding, including image-based QA and chart/document analysis.

Capabilities

  • Function calling
  • Streaming
  • Structured outputs

ERNIE 5.0 API pricing

ERNIE 5.0 pricing in US dollars
UsagePriceUnit
Input$1.41M tokens
Output$5.61M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

ERNIE 5.0 vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
ERNIE 5.0$1.4$5.6
ERNIE 4.5 VL 424B A47B$0.429$1.29
Magnum v4 72B$3.17$5.29
Grok 4.5$2$6
Grok 4.6$2$6

How to use the ERNIE 5.0 API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "baidu/ernie-5.0",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

ERNIE 5.0 FAQ

What is the context window of ERNIE 5.0?

ERNIE 5.0 has a 128,000 tokens context window and can return up to 65,536 tokens.

What inputs and outputs does ERNIE 5.0 support?

ERNIE 5.0 takes image, text as input and returns text.

What is the model ID for ERNIE 5.0?

Use baidu/ernie-5.0 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

How much does ERNIE 5.0 cost?

ERNIE 5.0 costs $1.4 input and $5.6 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does ERNIE 5.0 support streaming?

Yes, ERNIE 5.0 can stream responses as they are generated.

Can ERNIE 5.0 read images?

Yes, ERNIE 5.0 accepts image input alongside text.

Who created ERNIE 5.0?

ERNIE 5.0 was built by Baidu.

Start building with ERNIE 5.0

ERNIE 5.0 API

baidu/ernie-5.0

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "baidu/ernie-5.0",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'