Ernie 5.1 API Pricing
As of October 10, 2026, Ernie 5.1 costs $0.5634 per 1M input tokens and $2.535 per 1M output tokens on AIHubMix, with cache reads at $0.5634 per 1M tokens. It has a 119,000-token context window and returns up to 65,536 tokens per response.
- Input
- $0.5634 / 1M tokens
- Output
- $2.535 / 1M tokens
- Cache read
- $0.5634 / 1M tokens
- Context window
- 119,000 tokens
- Max output
- 65,536 tokens
- Providers
- 1
- Added to LiteLLM
- September 16, 2026
Ernie 5.1 pricing by provider
1 listing across 1 provider. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.
| Provider | Model name in LiteLLM | Input | Output | Cache read | Context |
|---|---|---|---|---|---|
| AIHubMix | aihubmix/ernie-5.1 | $0.5634 | $2.535 | $0.5634 | 119K |
What Ernie 5.1 costs in practice
1,000 requests with 2,000 input and 500 output tokens each
| AIHubMix | $2.394 |
100 long-document requests with 100,000 input and 2,000 output tokens each
| AIHubMix | $6.141 |
Ernie 5.1 features
- Reasoning
- Prompt caching
Use Ernie 5.1 with LiteLLM
Call Ernie 5.1 through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/chat/completions. LiteLLM tracks the cost of every request at these prices.
from litellm import completion
response = completion(
model="aihubmix/ernie-5.1",
messages=[{"role": "user", "content": "Hello!"}],
)model_list:
- model_name: ernie-5.1
litellm_params:
model: aihubmix/ernie-5.1
# credentials: see the provider's LiteLLM docs pagecurl http://0.0.0.0:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-1234" \
-d '{
"model": "ernie-5.1",
"messages": [{"role": "user", "content": "Hello!"}]
}'Ernie 5.1 FAQ
How much does Ernie 5.1 cost?
Ernie 5.1 costs $0.5634 per 1M input tokens and $2.535 per 1M output tokens on AIHubMix, with cache reads at $0.5634 per 1M tokens.
What is the context window of Ernie 5.1?
Ernie 5.1 has a 119,000-token context window and returns up to 65,536 tokens per response.
Which providers offer Ernie 5.1?
Ernie 5.1 is available from AIHubMix through LiteLLM, using the model name aihubmix/ernie-5.1.
How do I call Ernie 5.1 with an OpenAI-compatible API?
Use the LiteLLM Python SDK with model="aihubmix/ernie-5.1", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.
What features does Ernie 5.1 support?
Ernie 5.1 supports reasoning and prompt caching.
When did LiteLLM add Ernie 5.1?
Ernie 5.1 was added to LiteLLM's model price file on September 16, 2026.
Sources
Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:
LiteLLM docs: AIHubMix.
Provider pages: AIHubMix.
