# 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.

- Page: https://models.litellm.ai/models/ernie-5.1
- Lab: Baidu
- LiteLLM model name: `aihubmix/ernie-5.1`
- Context window: 119,000 tokens
- Max output: 65,536 tokens
- Added to LiteLLM: September 16, 2026
- Prices updated: October 10, 2026

## Pricing by provider

Token prices in USD per 1M tokens.

| Provider | Model name | Input | Output | Cache read | Per image | Per second | Context |
|---|---|---|---|---|---|---|---|
| AIHubMix | `aihubmix/ernie-5.1` | $0.5634 | $2.535 | $0.5634 | – | – | 119K |

## Cost examples

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

## Features

Supported: Reasoning, Prompt caching.

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="aihubmix/ernie-5.1",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

## 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.

Source: LiteLLM model price file, https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json
