PagibleAI uses OpenAI for structured content refinement and audio transcription by default. You can skip this setup if you do not use either action.
Configure OpenAI for PagibleAI
Create a project API key
- Sign in to the OpenAI API platform and select the project for this site.
- Create a user-owned key for your own development work or a project service account for a shared deployment.
- Limit the key to the model and audio permissions PagibleAI needs.
- Copy the key to your deployment secret store and set up API billing for the project.
ChatGPT subscriptions do not include API usage. Keep the key on the server and follow OpenAI API key safety practices.
Add the key to PagibleAI
OPENAI_API_KEY is an alias. Map it to the two PagibleAI actions that use OpenAI:
OPENAI_API_KEY="..."
CMS_AI_REFINE_API_KEY="${OPENAI_API_KEY}"
CMS_AI_TRANSCRIBE_API_KEY="${OPENAI_API_KEY}"
Run the command below after editing .env, then restart Octane, queue workers and other long-running PHP processes.
php artisan config:clear
Test OpenAI
Refine a short draft content block. The editor should return structured content. Then transcribe a brief, non-sensitive audio file; the result should contain timestamped segments. Small tests keep the cost low.
Troubleshooting
Why does PagibleAI say “No API key”?
Map CMS_AI_REFINE_API_KEY or CMS_AI_TRANSCRIBE_API_KEY to OPENAI_API_KEY. Clear the configuration cache and restart long-running PHP processes.
Why does OpenAI return 401 or a permission error?
Check that the key is active, belongs to the selected project and can use the requested model or audio endpoint. Do not use an organization admin key for normal requests.
Why does OpenAI report insufficient quota?
Check the API project's billing and credit balance. ChatGPT billing is separate.
What if the key was exposed?
Revoke it, deploy a replacement, clear the configuration cache and restart workers. Check project usage for requests you do not recognize.