ERNIE 4.0 (Enhanced Representation through kNowledge Integration) is Baidu's most advanced large language model, integrating deep learning with vast knowledge graph capabilities. As one of China's most widely deployed AI models, ERNIE powers Baidu's search engine, cloud services, and enterprise applications serving millions of users daily.
This guide covers ERNIE 4.0 API access, pricing, code examples, and how it compares with DeepSeek V4 Pro, GLM-5, Kimi K2.5, and GPT-4o.
| Model | Input (per 1M tokens) | Output (per 1M tokens) | Context |
|---|---|---|---|
| ERNIE 4.0 | $0.55 | $0.55 | 128K |
| ERNIE-3.5 | $0.20 | $0.20 | 128K |
| ERNIE-Tiny-8K | $0.005 | $0.005 | 8K |
| DeepSeek V4 Pro | $0.14 | $0.28 | 128K |
| GLM-5 | $0.14 | $0.14 | 128K |
| GPT-4o | $2.50 | $10.00 | 128K |
from openai import OpenAI
client = OpenAI(
base_url="https://aiwave.live/v1",
api_key="***"
)
response = client.chat.completions.create(
model="ernie-4.0",
messages=[
{"role": "system", "content": "You are ERNIE 4.0, Baidu's most advanced AI."},
{"role": "user", "content": "Explain how ERNIE integrates knowledge graph technology."}
]
)
print(response.choices[0].message.content)
| Feature | ERNIE 4.0 | DeepSeek V4 Pro | GLM-5 | GPT-4o |
|---|---|---|---|---|
| Input Price (1M) | $0.55 | $0.14 | $0.14 | $2.50 |
| Knowledge Integration | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ |
| Chinese NLP | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |
| Coding | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Enterprise Deployments | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
All models — including DeepSeek V4 Pro, GLM-5, Kimi K2.5, Qwen3, and ERNIE 4.0 — are available through a single AIWave API key.
One API key for ERNIE 4.0, DeepSeek V4, GLM-5, Kimi K2.5, Qwen3, and 50+ more. $0.20 starter credit.
Get Your API Key →Related: ERNIE 4 API guide · pricing
ERNIE 4 powers China's biggest apps. Now it powers yours too.
Explore Models →