BaiduPaidOperational
ERNIE 4.0 8K
API model name: ERNIE-4.0-8K
ERNIE 4.0 8K is Baidu's chat model, served on the Api.Airforce unified API. It is priced at $6.97 per million input tokens and $6.97 per million output tokens. Access it through the OpenAI-compatible API with one key, alongside 100+ other models on Api.Airforce.
Pricing
Specifications
- Provider
- Baidu
- Type
- chat model
What is ERNIE 4.0 8K used for?
- Chatbots & assistants — conversational AI, drafting, summarizing and Q&A.
ERNIE 4.0 8K vs. similar models
| Model | Intelligence | Context | Input / 1M | Output / 1M |
|---|---|---|---|---|
| ERNIE 4.0 8K | — | — | $6.97 | $6.97 |
| Embedding V1 | — | — | $0.10 | $0.10 |
| ERNIE 3.5 8K | — | — | $0.78 | $0.78 |
| ERNIE Character 8K | — | — | $0.21 | $0.40 |
Prices are Api.Airforce pay-as-you-go rates per 1M tokens. Context is the maximum input length.
Related models
Embedding V1Baidu · $0.10 / 1MERNIE 3.5 8KBaidu · $0.78 / 1MERNIE Character 8KBaidu · $0.21 / 1MERNIE Functions 8KBaidu · $0.21 / 1MERNIE Lite 8KBaidu · $0.17 / 1MERNIE Speed 128KBaidu · $0.21 / 1MERNIE Speed 8KBaidu · $0.21 / 1MERNIE Tiny 8KBaidu · $0.07 / 1MQwen2.5 72b InstructAlibaba · $101.11 / 1MQwen2.5 7b Instruct 1mAlibaba · $101.11 / 1MQwen3Alibaba · $0.11 / 1MQwen3 0.6bAlibaba · $0.11 / 1M
ERNIE 4.0 8K — frequently asked questions
- How much does ERNIE 4.0 8K cost?
- ERNIE 4.0 8K is billed pay-as-you-go at $6.97 per 1M input tokens and $6.97 per 1M output tokens. There is no subscription — you only pay for what you use.
- What can ERNIE 4.0 8K do?
- ERNIE 4.0 8K is Baidu's chat model, accessible through the Api.Airforce API.
- Is ERNIE 4.0 8K free to use?
- ERNIE 4.0 8K is a paid, pay-as-you-go model — no subscription, you are only charged for usage.
- How do I use ERNIE 4.0 8K via the API?
- ERNIE 4.0 8K is OpenAI-compatible. Point any OpenAI SDK at https://api.airforce/v1 and pass the model ID ERNIE-4.0-8K with your Api.Airforce API key.
- Who makes ERNIE 4.0 8K?
- ERNIE 4.0 8K is Baidu's chat model, served through the unified Api.Airforce gateway alongside 100+ other models.
Loading live metrics…
Loading live metrics…
Loading live metrics…
Use ERNIE 4.0 8K via the API
OpenAI-compatible — point any OpenAI SDK at https://api.airforce/v1 and pass ERNIE-4.0-8K as the model.
cURL
curl https://api.airforce/v1/chat/completions \
-H "Authorization: Bearer $AIRFORCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ERNIE-4.0-8K",
"messages": [{ "role": "user", "content": "Hello!" }]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.airforce/v1", api_key="$AIRFORCE_API_KEY")
r = client.chat.completions.create(
model="ERNIE-4.0-8K",
messages=[{"role": "user", "content": "Hello!"}],
)
print(r.choices[0].message.content)JavaScript
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.airforce/v1", apiKey: process.env.AIRFORCE_API_KEY });
const r = await client.chat.completions.create({
model: "ERNIE-4.0-8K",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(r.choices[0].message.content);