> ## Documentation Index
> Fetch the complete documentation index at: https://agdiai-597e782f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Qianfan

# Qianfan Provider Guide

Qianfan is Baidu's MaaS platform, provides 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.

## Prerequisites

1. A Baidu Cloud account with Qianfan API access
2. An API key from the Qianfan console
3. Agdi installed on your system

## Getting Your API Key

1. Visit the [Qianfan Console](https://console.bce.baidu.com/qianfan/ais/console/apiKey)
2. Create a new application or select an existing one
3. Generate an API key (format: `bce-v3/ALTAK-...`)
4. Copy the API key for use with Agdi

## CLI setup

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
agdi onboard --auth-choice qianfan-api-key
```

## Related Documentation

* [Agdi Configuration](https://agdiai-597e782f.mintlify.site/gateway/configuration.md)
* [Model Providers](https://agdiai-597e782f.mintlify.site/concepts/model-providers.md)
* [Agent Setup](https://agdiai-597e782f.mintlify.site/concepts/agent.md)
* [Qianfan API Documentation](https://cloud.baidu.com/doc/qianfan-api/s/3m7of64lb)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.