Mistral can replace the default provider for text generation, content refinement or audio transcription. Each action needs both the provider name and the API key.
Configure Mistral for PagibleAI
Get a Mistral API key
- Sign in to the Mistral console and create or select a workspace.
- Activate billing; keys remain inactive until the workspace has a payment method.
- Create a key for this deployment and set a workspace spending limit.
- Copy the key to your deployment secret store.
Separate development and production workspaces make usage and limits easier to track. Do not commit keys to source control.
Use Mistral for text
Set Mistral as the provider for each text action you want to move. This example moves writing from Gemini and refinement from OpenAI:
MISTRAL_API_KEY="..."
CMS_AI_WRITE="mistral"
CMS_AI_WRITE_API_KEY="${MISTRAL_API_KEY}"
CMS_AI_REFINE="mistral"
CMS_AI_REFINE_API_KEY="${MISTRAL_API_KEY}"
Use Mistral for transcription
Use these variables only if Mistral should also replace OpenAI for transcription:
CMS_AI_TRANSCRIBE="mistral"
CMS_AI_TRANSCRIBE_API_KEY="${MISTRAL_API_KEY}"
Run the command below after editing .env. Restart Octane, queue workers and other long-running PHP processes.
php artisan config:clear
Test Mistral
Test only the actions you changed. Generate a short paragraph, refine a small content block or transcribe a brief audio file. If the request still goes to Gemini or OpenAI, the provider setting has not been loaded.
Troubleshooting
Why does PagibleAI still use Gemini or OpenAI?
An API key does not switch providers. Set CMS_AI_WRITE, CMS_AI_REFINE or CMS_AI_TRANSCRIBE to mistral, clear the configuration cache and restart long-running PHP processes.
Why does Mistral reject a new key?
Check that billing is active for the key's workspace and that the key has not been revoked.
Why does Mistral return 429?
The workspace has reached a rate or spending limit. Check its usage and limits before retrying.
What if the key was exposed?
Revoke it in the Mistral console, deploy a replacement, clear the configuration cache and restart workers.