百度千帆

Baidu Qianfan

🟢 174ms 17 款主流模型各送 100 万 tokens [总计 1700 万 tokens] 📏 128k 60 RPM

🛡️ 🛡️ Free Tier Policy & Rate Limits

Official Permanent Free Pool No Credit Card Identity Verified Zero Unexpected Bill Agent Ready
Context Window 128k
Rate Limit RPM 60 RPM
Daily Quota & Reset No API Call Ceiling · Permanent Availability
Auth & Card Requirement No Card Needed
Supported Capabilities:
multimodal 📝 Text Generation

📋 Core Endpoint & Model Parameters

OpenAI API Compatible
Base URL
https://qianfan.baidubce.com/v2
Model ID
ERNIE-4.5-Turbo-128K
Alternate Model Identifiers
🎁 [Baidu Qianfan Welcome Tier] 1M free tokens per model across 17 models + 20 CNY voucher on ID check
👉 免费领取 1700万 Tokens

💡 Caveats & Rate Limits

🎯 17 top models with 1M tokens each [17M total] · 128K context · Baidu AI cluster direct

📋 Free Tier Quota Rules and Constraints

  • ERNIE Speed and Lite series are permanently free
  • Enterprise-grade free limit of 300 RPM and 300k TPM
  • High availability for batch processing and retrieval workflows

🛡️ Zero-Billing Protection and Risk Prevention

Permanently free zero-cost models with high concurrency.

Quick Integration Code and Client Setup

🍒 Connect Cherry Studio
curl https://qianfan.baidubce.com/v2/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "ERNIE-4.5-Turbo-128K",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }'
from openai import OpenAI

client = OpenAI(
    base_url="https://qianfan.baidubce.com/v2",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="ERNIE-4.5-Turbo-128K",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True
)

for chunk in response:
    content = chunk.choices[0].delta.content or ""
    print(content, end="", flush=True)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://qianfan.baidubce.com/v2",
  apiKey: "YOUR_API_KEY"
});

const stream = await client.chat.completions.create({
  model: "ERNIE-4.5-Turbo-128K",
  messages: [{ role: "user", content: "Hello!" }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
{
  "apiProvider": "openai",
  "openAiBaseUrl": "https://qianfan.baidubce.com/v2",
  "openAiApiKey": "YOUR_API_KEY",
  "openAiModelId": "ERNIE-4.5-Turbo-128K"
}
✓ ✓ Copied