Skip to content
Baidu Qianfan

Configure Baidu Qianfan

Baidu Qianfan is a large language model platform launched by Baidu, based on ERNIE (Wenxin) large model technology. It provides powerful Chinese understanding and generation capabilities, supporting multiple versions including ERNIE-4.0 and ERNIE-3.5. Starting from March 2025, individual users can call the API for free.

1. Get Baidu Qianfan API Key

1.1 Access Baidu Intelligent Cloud

Visit the Baidu Intelligent Cloud official website and log in: https://cloud.baidu.com/

If you don't have an account, you need to register a Baidu account first.

Access Baidu Intelligent Cloud

1.2 Enter Baidu Intelligent Cloud Console

After logging in, click the Console button in the upper right corner to enter the Baidu Intelligent Cloud master console.

Baidu Intelligent Cloud is a comprehensive cloud platform providing computing, storage, AI, and other services.

Enter Baidu Intelligent Cloud Console

1.3 Find Qianfan Large Model Platform

In the Baidu Intelligent Cloud console, find the Qianfan Large Model Platform or ERNIE (Wenxin) Large Model service entry:

  • Method 1: Search for "Qianfan" or "ERNIE" on the console homepage
  • Method 2: Find Artificial IntelligenceQianfan Large Model Platform in the left menu
  • Method 3: Directly access the Qianfan platform console: https://console.bce.baidu.com/qianfan/overview

Click to enter the Qianfan Large Model Platform.

Find Qianfan Platform Entry

When entering the Qianfan Large Model Platform for the first time, a user service agreement will pop up, which needs to be agreed to before continuing. Please read and agree to the agreement.

User Service Agreement

1.4 Enter API Key Management Page

In the left menu of the Qianfan Large Model Platform, click the API Key menu item under System Management.

After entering the API Key management page, you can see the page prompt: "API Key is a credential for authentication when calling large model services and tools. Please keep it safe and change it regularly to avoid unnecessary security risks or financial losses."

API Key Management Page

1.5 Create API Key

Click the Create API Key button in the upper right corner (blue button).

Click Create API Key

1.6 Fill in API Key Information

In the pop-up dialog, fill in:

  1. Name: Give this API Key a name, such as "CueMate" (for easy identification of purpose later)
  2. Grant "All Permissions" or "Custom Permissions"
  3. Click the Create button

Fill in API Key Information

1.7 Copy API Key

After successful creation, your API Key will be displayed.

Important Notice:

  • API Key is used for authentication when calling Baidu Qianfan large model API
  • Please keep it safe and do not disclose it to others
  • If the API Key is leaked, please delete it immediately and create a new one

Click the copy button to copy and save the API Key to a notepad or other secure location, which will be used in subsequent configurations.

Copy API Key

2. Configure Baidu Qianfan Model in CueMate

2.1 Enter Model Settings Page

After logging into CueMate, click Model Settings in the dropdown menu in the upper right corner.

Enter Model Settings

2.2 Add New Model

Click the Add Model button in the upper right corner.

Click Add Model

2.3 Select Baidu Qianfan Provider

In the pop-up dialog:

  1. Provider Type: Select Baidu Qianfan
  2. Click to automatically proceed to the next step

Select Baidu Qianfan

2.4 Fill in Configuration Information

Fill in the following information on the configuration page:

Basic Configuration

  1. Model Name: Give this model configuration a name (e.g., ERNIE-4.5-Turbo)
  2. API URL: Keep the default https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat
  3. API Key: Paste the Baidu API Key you just copied
  4. Model Version: Select the model ID to use, commonly used models include:
    • ERNIE-4.5-Turbo: ERNIE 4.5 Turbo version, 16K+ context, most powerful, suitable for complex tasks
    • ERNIE-4.5: ERNIE 4.5 version, 16K+ context, free for individual users
    • ERNIE-Speed-AppBuilder: Speed optimized version, fast response, suitable for high-frequency calls

Fill in Basic Configuration

Advanced Configuration (Optional)

Expand the Advanced Configuration panel to adjust the following parameters:

  1. Temperature: Controls output randomness

    • Range: 0-1 (ERNIE series), 0-2 (DeepSeek/Llama/Qwen series)
    • Default Value:
      • ERNIE series: 0.95
      • DeepSeek series: 1.0
      • Other models: 0.7
    • Effect: Higher values produce more random and creative output, lower values produce more stable and conservative output
    • Usage Recommendations:
      • Creative writing/brainstorming: 0.8-1.0
      • General conversation/Q&A: 0.7-0.9
      • Code generation/precise tasks: 0.3-0.5
      • Logical reasoning/mathematical calculations: 0.1-0.3
  2. Max Tokens: Limits the maximum output length

    • Range: Depending on the model
    • Recommended Value: 4096
    • Effect: Controls the maximum number of tokens in a single model response
    • Model Limits:
      • ERNIE-4.5/ERNIE-4.5-Turbo: max 8192 tokens
      • ERNIE-Speed-AppBuilder: max 4096 tokens
      • DeepSeek-V3/V3.2: max 8192 tokens
      • DeepSeek-V3.1-Think/V3.2-Think: max 8000 tokens
      • Kimi-K2-Instruct: max 4096 tokens
      • Llama series: max 4096 tokens
      • Qwen series: max 6144 tokens
      • GLM-4 series: max 4095 tokens
      • Yi-Lightning: max 4096 tokens
    • Usage Recommendations:
      • Short Q&A: 1024-2048
      • General conversation: 2048-4096
      • Long text generation: 4096-8192
      • Code generation: 2048-4096

Advanced Configuration

Other Advanced Parameters Supported by Baidu Qianfan API:

While the CueMate interface only provides temperature and max_tokens adjustments, if you call Baidu Qianfan directly via API, some models also support the following parameters:

  1. top_p (nucleus sampling)

    • Range: 0-1
    • Default Value: 0.8
    • Effect: Samples from the smallest candidate set with cumulative probability of p
    • Relationship with temperature: Usually only adjust one of them
    • Usage Recommendations:
      • Maintain diversity while avoiding nonsense: 0.9-0.95
      • More conservative output: 0.7-0.8
  2. penalty_score

    • Range: 1.0-2.0
    • Default Value: 1.0
    • Effect: Reduces the probability of repetitive content
    • Usage Recommendations:
      • Reduce repetition: 1.2-1.5
      • Allow moderate repetition: 1.0-1.1 (default)
  3. stream

    • Type: Boolean
    • Default Value: false
    • Effect: Enable SSE streaming return, generating and returning incrementally
    • In CueMate: Automatically handled, no manual setting required

Parameter Tuning Tips:

  • Creative scenarios: High temperature (0.8-1.0) + low penalty_score (1.0-1.1)
  • Precise scenarios: Low temperature (0.1-0.3) + medium penalty_score (1.2-1.3)
  • Balanced scenarios: Medium temperature (0.7) + medium penalty_score (1.1-1.2)
  • Long text generation: Appropriately increase max_tokens, reduce temperature to ensure coherence

2.5 Test Connection

After filling in the configuration, click the Test Connection button to verify if the configuration is correct.

Test Connection

If the configuration is correct, a success message will be displayed with a sample model response.

Test Success

2.6 Save Configuration

After successful testing, click the Save button to complete the model configuration.

Save Configuration

3. Use the Model

Through the dropdown menu in the upper right corner, enter the system settings interface and select the model configuration you want to use in the large model provider section.

After configuration, you can select to use this model in interview training, question generation, and other functions, or of course, you can individually select the model configuration for each interview in the interview options.

Select Model

4. Supported Model List

The Baidu Qianfan platform supports 54+ large models, including Baidu's own ERNIE series and third-party models. The following is a list of commonly used models:

4.1 ERNIE Series (Baidu's own)

No.Model NameModel IDContext LengthUse Cases
1ERNIE-4.5-TurboERNIE-4.5-Turbo16K+ tokensComplex tasks, deep understanding, code generation
2ERNIE-4.5ERNIE-4.516K+ tokensGeneral conversation, daily use (free)
3ERNIE-Speed-AppBuilderERNIE-Speed-AppBuilder8K tokensFast response, high-frequency calls

4.2 DeepSeek Series (Deep Seek)

No.Model NameModel IDContext LengthUse Cases
1DeepSeek-V3.2DeepSeek-V3.216K tokensHigh-performance reasoning, code generation
2DeepSeek-V3.2-ThinkDeepSeek-V3.2-Think16K tokensDeep reasoning, complex problems
3DeepSeek-V3DeepSeek-V316K tokensGeneral conversation
4DeepSeek-V3.1-ThinkDeepSeek-V3.1-Think16K tokensDeep reasoning

4.3 Kimi Series (Moonshot AI)

No.Model NameModel IDContext LengthUse Cases
1Kimi-K2-InstructKimi-K2-Instruct16K tokensLong text understanding, conversation

4.4 Llama Series (Meta)

No.Model NameModel IDContext LengthUse Cases
1Llama-3.3-70B-InstructLlama-3.3-70B-Instruct16K tokensGeneral conversation, code generation
2Llama-3.1-405B-InstructLlama-3.1-405B-Instruct16K tokensHigh-performance reasoning

4.5 Qwen Series (Tongyi Lab/Alibaba)

No.Model NameModel IDContext LengthUse Cases
1Qwen2.5-72B-InstructQwen2.5-72B-Instruct16K tokensGeneral conversation, code generation
2Qwen2.5-7B-InstructQwen2.5-7B-Instruct8K tokensLightweight conversation

4.6 GLM Series (Zhipu AI)

No.Model NameModel IDContext LengthUse Cases
1GLM-4-PlusGLM-4-Plus16K tokensComplex tasks, code generation
2GLM-4-FlashGLM-4-Flash8K tokensFast response

4.7 Yi Series (01.AI)

No.Model NameModel IDContext LengthUse Cases
1Yi-LightningYi-Lightning16K tokensFast response, cost-effective

Note:

  • The above only lists commonly used models, please visit the Baidu Qianfan platform for the complete model list
  • Model IDs need to be filled in accurately when configuring
  • Different models have different billing standards, please check the official pricing information

5. Common Issues

5.1 Invalid API Key

Symptom: API Key error message when testing connection

Solution:

  1. Check if the API Key and Secret Key are correct
  2. Confirm the application has been activated
  3. Check if the account has available quota

5.2 Request Timeout

Symptom: No response for a long time when testing connection or using

Solution:

  1. Check if the network connection is normal
  2. Confirm the API URL address is correct
  3. Check firewall settings

5.3 Insufficient Quota

Symptom: Error message indicating quota has been used up or insufficient balance

Solution:

  1. Log in to the Qianfan platform to check account balance
  2. Recharge or apply for more quota
  3. Optimize usage frequency

Released under the GPL-3.0 License.