Baidu: ERNIE 4.5 21B A3B✓ Catalog verified
A sophisticated text-based Mixture-of-Experts (MoE) model featuring 21B total parameters with 3B activated per token, delivering exceptional multimodal understanding and generation through heterogeneous MoE structures and modality-isolated routing. Supporting an extensive 131K token context length, the model achieves efficient inference via multi-expert parallel collaboration and quantization, while advanced post-training techniques including SFT, DPO, and UPO ensure optimized performance across diverse applications with specialized routing and balancing losses for superior task handling.
Overview
A sophisticated text-based Mixture-of-Experts (MoE) model featuring 21B total parameters with 3B activated per token, delivering exceptional multimodal understanding and generation through heterogeneous MoE structures and modality-isolated routing. Supporting an extensive 131K token context length, the model achieves efficient inference via multi-expert parallel collaboration and quantization, while advanced post-training techniques including SFT, DPO, and UPO ensure optimized performance across diverse applications with specialized routing and balancing losses for superior task handling.
Access: available through the official Baidu API. Context window: 120K.
Specifications
| API identifier | baidu/ernie-4.5-21b-a3b |
| Provider | Baidu |
| Model type | Text LLM |
| Context window | 120K catalog |
| Input modalities | text |
| Output modalities | text |
| Released | Aug 12, 2025 |
| Moderated | No |
| Architecture modality | text->text |
API defaults
{
"top_p": 0.8,
"temperature": 0.8,
"frequency_penalty": null
}Pricing
Live pricing components for baidu/ernie-4.5-21b-a3b as published in the catalog.
| Pricing component | Raw unit price | Normalized | Unit |
|---|---|---|---|
| Prompt tokens | $7e-8 | $0.07 / 1M | Per input token |
| Completion tokens | $2.8e-7 | $0.28 / 1M | Per output token |
| Request fee | N/A | N/A | Per request |
| Image fee | N/A | N/A | Per image unit |
| Web search fee | N/A | N/A | Per search request |
Cost calculator
Estimate monthly spend from your own token volumes.
Estimated Total Cost
$0.09Calculated from current list pricing in the ModelsAtlas catalog.Capabilities
| Capability | Status | What it means |
|---|---|---|
| Visual Understanding | Not advertised | Image and document analysis support |
| Audio Processing | Not advertised | Speech and voice aligned flows |
| Tool Calling | ✓ Supported | Supports tools / function calling |
| Self-Hosting | Not advertised | Deploy outside managed APIs |
Capability signals
Directional signals derived from model metadata and capability tags — not official benchmark submissions.
Quick start
Call Baidu: ERNIE 4.5 21B A3B through an OpenAI-compatible client.
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="YOUR_API_KEY"
)
response = client.chat.completions.create(
model="baidu/ernie-4.5-21b-a3b",
messages=[{"role": "user", "content": "Explain quantum physics."}]
)
print(response.choices[0].message.content)Alternatives
Closest models by context window from a different provider.
| Model | Provider | Context | Input /1M | Actions |
|---|---|---|---|---|
| Perplexity: Sonar | Perplexity | 127K | $1.00 | View → |
| AllenAI: Olmo 2 32B Instruct | Allenai | 128K | $0.05 | View → |
Sources & attribution
Pricing and metadata are maintained in the ModelsAtlas catalog.
Frequently asked questions
How much does Baidu: ERNIE 4.5 21B A3B cost?
$0.07 per 1M input tokens and $0.28 per 1M output tokens on the official Baidu API.
What is the context window of Baidu: ERNIE 4.5 21B A3B?
Baidu: ERNIE 4.5 21B A3B supports up to 120K tokens of context.
Does Baidu: ERNIE 4.5 21B A3B support tool / function calling?
Yes, Baidu: ERNIE 4.5 21B A3B supports tool / function calling — you can register tools and the model will emit structured tool calls.
How do I access Baidu: ERNIE 4.5 21B A3B?
Use the official Baidu API with the model id `baidu/ernie-4.5-21b-a3b`. See the Quick start section above for code examples.