Qianfan is Baidu’s MaaS platform, providing a unified API that routes requests to many models behind a single endpoint and API key. It is OpenAI-compatible, so most OpenAI SDKs work by switching the base URL.Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
| Property | Value |
|---|---|
| Provider | qianfan |
| Auth | QIANFAN_API_KEY |
| API | OpenAI-compatible |
| Base URL | https://qianfan.baidubce.com/v2 |
Getting started
Create a Baidu Cloud account
Sign up or log in at the Qianfan Console and ensure you have Qianfan API access enabled.
Generate an API key
Create a new application or select an existing one, then generate an API key. The key format is
bce-v3/ALTAK-....Built-in catalog
| Model ref | Input | Context | Max output | Reasoning | Notes |
|---|---|---|---|---|---|
qianfan/deepseek-v3.2 | text | 98,304 | 32,768 | Yes | Default model |
qianfan/ernie-5.0-thinking-preview | text, image | 119,000 | 64,000 | Yes | Multimodal |
Config example
Transport and compatibility
Transport and compatibility
Qianfan runs through the OpenAI-compatible transport path, not native OpenAI request shaping. This means standard OpenAI SDK features work, but provider-specific parameters may not be forwarded.
Catalog and overrides
Catalog and overrides
The bundled catalog currently includes
deepseek-v3.2 and ernie-5.0-thinking-preview. Add or override models.providers.qianfan only when you need a custom base URL or model metadata.Model refs use the
qianfan/ prefix (for example qianfan/deepseek-v3.2).Troubleshooting
Troubleshooting
- Ensure your API key starts with
bce-v3/ALTAK-and has Qianfan API access enabled in the Baidu Cloud console. - If models are not listed, confirm your account has the Qianfan service activated.
- The default base URL is
https://qianfan.baidubce.com/v2. Only change it if you use a custom endpoint or proxy.
Related
Model selection
Choosing providers, model refs, and failover behavior.
Configuration reference
Full OpenClaw configuration reference.
Agent setup
Configuring agent defaults and model assignments.
Qianfan API docs
Official Qianfan API documentation.