Baidu Qianfan (ERNIE) is currently disabled by the system administrator.
Existing configurations cannot be tested or used until it is enabled again.
Enable Baidu Qianfan (ERNIE) for AI grading
QuizMachine uses Qianfan's OpenAI-compatible Chat Completions API for advisory free-text/code grading and question review.
Keys are encrypted at rest. Fallback may send an answer to another selected provider and can incur charges.
Activate Qianfan Model Services first
- Activate Model Services in Qianfan Model Hub before creating or testing the API key. Playground and API access remain unavailable until activation finishes.
- Activation can require verified account details and a mobile SMS code.
If Country/Region and the phone prefix are locked to the wrong region, stop. Do not enter false identity, address, or phone information.
Ask Baidu AI Cloud International support to correct the account region.
If Baidu cannot correct the account region or activate Model Services, OpenRouter can be configured as a separate provider. It uses its own key, credits, model catalog, privacy settings, and endpoint; do not paste an OpenRouter key into a Baidu profile.
OpenRouter setup guide.
An inactive service or incomplete model entitlement can return HTTP 403 even when the API key exists and shows Qianfan permissions.
Set up an API key
- Create a Qianfan API key in the Baidu Cloud console.
- Grant it the Qianfan/ModelBuilder resource required by your application.
- Confirm billing, spend limits, and access to the model you intend to select.
- Select a model available to that key, then use Test configuration before saving.
Endpoint and model
Default endpoint: https://api.baiduqianfan.ai/v1/chat/completions. Default model: ernie-5.0. Enter another supported Qianfan model or regional endpoint when your account requires it.
This first integration supports text/code grading and question review. Qianfan is never sent a Diagram Upload question — QuizMachine declines it before any request leaves the server, until its multimodal contract is separately tested. If you have enabled further providers, the declined diagram is then offered to the next provider in priority order, so the diagram and answer can still be transmitted to that provider. Diagram Upload questions go to manual review only once no configured provider has graded them.
Rotation and troubleshooting
Create and test a replacement key before revoking the old one. HTTP 401 usually indicates an invalid key or missing resource permission; HTTP 429 indicates a quota or rate limit.
Reference: supported models; Qianfan text generation API.