LLM ReferenceLLM Reference

Using ERNIE 5.0 on Baidu Qianfan

Implementation guide · ERNIE 5 · Baidu AI

Serverless

Quick Start

  1. 1
    Create an account at Baidu Qianfan and generate an API key.
  2. 2
    Use the Baidu Qianfan SDK or REST API to call ernie-5.0 — see the documentation for request format.
  3. 3
    You'll be billed $0.89/1M input, $3.54/1M output tokens. See full pricing.

Code Examples

See Baidu Qianfan documentation for integration details.

About Baidu Qianfan

Baidu Qianfan provides native hosted access to Baidu's ERNIE model lineup, including ERNIE 5.1, through model service APIs and the Qianfan console. The platform documents OpenAI-compatible access patterns, model lists, rate limits, and token-based pricing for online inference.

Baidu Qianfan is Baidu Intelligent Cloud's foundation model and Agent development platform, providing hosted API access to ERNIE and Qianfan models for text generation, reasoning, multimodal understanding, embeddings, and agent workflows.

Pricing on Baidu Qianfan

TypePrice (per 1M)
Input tokens$0.89
Output tokens$3.54

Capabilities

VisionMultimodalReasoningFunction CallingTool UseStructured OutputsCode Execution

About ERNIE 5.0

ERNIE 5.0 is Baidu's fifth-generation flagship foundation model, officially launched January 22, 2026 (preview at Baidu World November 13, 2025). It is a fully native multimodal model supporting text, image, audio, and video understanding and generation under a unified autoregressive framework, trained simultaneously across modalities from scratch. With 2.4 trillion total parameters and ultra-sparse MoE activation engaging <3% of parameters per inference, it delivers frontier performance at high efficiency. Available on Baidu AI Cloud's Qianfan MaaS platform. API model IDs: ernie-5.0; ernie-5.0-thinking-preview (thinking mode).

Model Specs

Released2026-01-22
Parameters2.4T
Context128K
Architecturemoe

More Models on Baidu Qianfan

Provider

Baidu Qianfan

Baidu

Beijing, China