Back to Models

Baidu ERNIE 4.5 Turbo (128K)

baidubaidu/ernie-4.5-turbo-128k

How TheRouter serves this differently from the vendor

As the vendor operates it

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.

On TheRouter

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
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
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
sourceURLretrieved
Release dateernie.baidu.com ↗2026-08-19verified
Architecturehuggingface.co ↗2026-08-19verified
Context windowgithub.com ↗2026-08-19verified
Licenseernie.baidu.com ↗2026-08-19verified
Training cutoff——unknown
Inference backendsgithub.com ↗2026-08-19verified
C-Evalernie.baidu.com ↗2026-08-19unknown
MMLUgithub.com ↗2026-08-19unknown
CMMLUernie.baidu.com ↗2026-08-19unknown
Baidu open-sources ERNIE 4.5 family including the Turbo (21B-A3B) varianternie.baidu.com ↗2026-08-19verified
What is the difference between ERNIE 4.5 Turbo and the baidu/ernie-4.5 flagship?ernie.baidu.com ↗2026-08-19to verify
Can I self-host ERNIE 4.5 Turbo?huggingface.co ↗2026-08-19to verify
Is ERNIE 4.5 Turbo good for English tasks?ernie.baidu.com ↗2026-08-19to verify
Help & contact