Free Baidu Qianfan API: limits, models & how to get a key
1M free tokens for each of 17 preset models, valid 3 months from first activation
- Credit card
- No card
- From China
- No VPN
- OpenAI
- OpenAI-compatible
- Real-name check
- Real-name check unclear
- Free allowance type
- One-time trial
- Checked
- verified on 2026-11-24 (official)
WebsiteSign upDocsPricing page
Limits
| Per model | 1,000,000 tokens x 17 models |
|---|---|
| Validity | 3 months |
| Scope | Online inference of preset models only; not batch inference |
| Separate voucher | 20 CNY voucher after real-name, valid 1 month (another official page) |
Free models
ERNIE-4.5-Turbo-128KERNIE-4.5-Turbo-VLERNIE-X1-Turbo-32KDeepSeek-R1-250528DeepSeek-V3.1-250821Kimi-K2-InstructQwen3-235B-A22B-Instruct-2507bge-large-zh
How to get a key
- Open the Qianfan platform with a Baidu AI Cloud account and agree to the user agreement; the free quota is granted automatically.
- Create an API key in the console.
- Call https://qianfan.baidubce.com/v2 with the OpenAI SDK, using a listed model name.
- Check remaining quota on each model detail page in the Model Square.
Call it
OpenAI-compatible base URL from this provider’s record: https://qianfan.baidubce.com/v2. Replace YOUR_API_KEY with a key from that provider. The model id is one listed as free.
curl
curl https://qianfan.baidubce.com/v2/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"ERNIE-4.5-Turbo-128K","messages":[{"role":"user","content":"Hello"}]}'Python
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"}],
)
print(response.choices[0].message.content)Notes
- The free-quota page (updated 2026-11-11) does not mention real-name; the 20 CNY voucher page does require it. Treat real-name as likely.
- The table has 17 models in total; only 8 are shown here. Others include ERNIE-4.5-Turbo-32K, DeepSeek-R1, DeepSeek-V3-250324, Qwen3 Coder models and qianfan-sug-8k.
- Base URL comes from Qianfan OpenAI-SDK compatibility docs found via search; the page itself was not opened.
- A Baidu account (likely +86 phone) is needed; not confirmed from official pages.
Sources and check date
Checked on the provider’s own page on 2026-11-24.
Similar providers
- Zhipu BigModel (Z.ai) — GLM-4.7-Flash and several other Flash models are priced at 0 with no token cap
- SiliconFlow — Models marked free on the pricing page cost 0; real-name users can also claim a 16 CNY voucher
- ModelScope — Up to 2,000 free API calls per day per account, at most 200 per model
- iFlytek Spark Lite — Spark Lite is officially free to use (claim the free quota on the product page)
Questions
- Is the Baidu Qianfan API free?
- 1M free tokens for each of 17 preset models, valid 3 months from first activation
- Does Baidu Qianfan require a credit card?
- Our check marked Baidu Qianfan as not requiring a credit card for the free allowance.
- Can I reach Baidu Qianfan from China without a VPN?
- Our check marked Baidu Qianfan as reachable from China without a VPN.
- Is the Baidu Qianfan API OpenAI-compatible?
- Yes. The recorded base URL is https://qianfan.baidubce.com/v2.
- When was the Baidu Qianfan free tier checked?
- We checked Baidu Qianfan on the provider’s own page on 2026-11-24.
Get an email when a free tier changes
Leave an address. We mail it when a free allowance on this list changes.