BIFROST
Dashboard
Operational

Baidu / ERNIE

Baidu's ERNIE models with free-tier speed models.

Setup

1. Create an account at cloud.baidu.com.
2. Enable Qianfan and generate an API key.
3. Set the environment variable below.

API Key

BAIDU_API_KEY=...
# or
QIANFAN_API_KEY=...

Base URL

OpenAI-compatible: https://qianfan.baidubce.com/v2
Native: https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop

Models

ernie-speed-128k (free tier)
ernie-4.0-8k

Capabilities

TextStreaming

Example

curl https://qianfan.baidubce.com/v2/chat/completions \
  -H "Authorization: Bearer $BAIDU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ernie-speed-128k",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
← Previous
Zhipu AI
Next →
Tencent / Hunyuan