Baidu ERNIE 4.5 Turbo (128K)
How TheRouter serves this differently from the vendor
Baidu's own Qianfan platform serves ERNIE 4.5 Turbo via its proprietary REST API and SDK, with pricing in CNY (0.0008 / 0.0032 per 1K tokens input / output as of 2026-07-29). The vendor API uses a different authentication scheme and endpoint structure from OpenAI. Context window is 128K; max output is 8K per the vendor model card.
TheRouter exposes ERNIE 4.5 Turbo as an OpenAI-compatible /v1/chat/completions endpoint under model id baidu/ernie-4.5-turbo-128k. Pricing is converted from CNY at the FX rate recorded in standard-models.yaml ($0.12 input / $0.48 output per 1M tokens as of 2026-07-29). Authentication uses the standard Bearer token scheme. Supported parameters (temperature, max_tokens, top_p, tools, tool_choice, response_format, stop) are taken from the live TheRouter catalog and are a subset of Qianfan's native capability surface.
API guide
Chat completion
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"baidu/ernie-4.5-turbo-128k","messages":[{"role":"user","content":"请简要介绍一下混合专家模型(MoE)的优势。"}]}'Tool use
Supports OpenAI-shape function calling. Use for cost-sensitive Chinese-language tool agents where the full 300B parameter budget is unnecessary.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "baidu/ernie-4.5-turbo-128k",
"messages": [{"role": "user", "content": "今天上海天气如何?"}],
"tools": [{"type":"function","function":{"name":"get_weather","parameters":{"type":"object","properties":{"city":{"type":"string"}}}}}]
}'Fact ledger — every claim on this page traces here
| source | URL | retrieved | |
|---|---|---|---|
| Release date | ernie.baidu.com ↗ | 2026-08-19 | verified |
| Architecture | huggingface.co ↗ | 2026-08-19 | verified |
| Context window | github.com ↗ | 2026-08-19 | verified |
| License | ernie.baidu.com ↗ | 2026-08-19 | verified |
| Training cutoff | — | — | unknown |
| Inference backends | github.com ↗ | 2026-08-19 | verified |
| C-Eval | ernie.baidu.com ↗ | 2026-08-19 | unknown |
| MMLU | github.com ↗ | 2026-08-19 | unknown |
| CMMLU | ernie.baidu.com ↗ | 2026-08-19 | unknown |
| Baidu open-sources ERNIE 4.5 family including the Turbo (21B-A3B) variant | ernie.baidu.com ↗ | 2026-08-19 | verified |
| What is the difference between ERNIE 4.5 Turbo and the baidu/ernie-4.5 flagship? | ernie.baidu.com ↗ | 2026-08-19 | to verify |
| Can I self-host ERNIE 4.5 Turbo? | huggingface.co ↗ | 2026-08-19 | to verify |
| Is ERNIE 4.5 Turbo good for English tasks? | ernie.baidu.com ↗ | 2026-08-19 | to verify |