Skip to main content
Qianfan is Baidu’s MaaS platform: a unified, OpenAI-compatible API that routes requests to many models behind a single endpoint and API key. OpenClaw ships it as the official external plugin @openclaw/qianfan-provider.

Install plugin

Install the official plugin, then restart Gateway:

Getting started

1

Create a Baidu Cloud account

Sign up or log in at the Qianfan Console and ensure you have Qianfan API access enabled.
2

Generate an API key

Create a new application or select an existing one, then generate an API key. Baidu Cloud keys use the bce-v3/ALTAK-... format.
3

Run onboarding

Non-interactive runs read the key from --qianfan-api-key <key> or QIANFAN_API_KEY. Onboarding writes the provider config, adds the QIANFAN alias for the default model, and sets qianfan/deepseek-v3.2 as the default model when none is configured.
4

Verify the model is available

Built-in catalog

The catalog is static; there is no live model discovery.
You only need to override models.providers.qianfan when you need a custom base URL or model metadata.

Config example

Model refs use the qianfan/ prefix (for example qianfan/deepseek-v3.2).
Qianfan runs through the OpenAI-compatible transport path, not native OpenAI request shaping. Standard OpenAI SDK features work, but provider-specific parameters may not be forwarded.
  • 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.
  • Only change the base URL if you use a custom endpoint or proxy.

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.