To generate texts/images from prompts, analyze image/video/audio content, or execute actions based on your prompts, you have to configure one or more of the AI service providers supported by the Prisma package.
Note: You only need to configure API keys for the AI service providers you are using, not for all!
For best results and all features, you need Google, OpenAI, Clipdrop, and DeepL at the moment and they are also configured by default. All service providers require to sign-up and create an account first. They will provide an API key which you need to add to your .env file or as environment variable, e.g.:
GEMINI_API_KEY="..."
OPENAI_API_KEY="..."
CLIPDROP_API_KEY="..."
DEEPL_API_KEY="..."
# Text translation
CMS_AI_TRANSLATE_API_KEY="${DEEPL_API_KEY}"
# For DeepL Pro accounts
# CMS_AI_TRANSLATE_URL="https://api.deepl.com/"
# Analyze content and generate text/images
CMS_AI_REFINE_API_KEY="${OPENAI_API_KEY}"
CMS_AI_WRITE_API_KEY="${GEMINI_API_KEY}"
CMS_AI_DESCRIBE_API_KEY="${GEMINI_API_KEY}"
CMS_AI_IMAGINE_API_KEY="${GEMINI_API_KEY}"
CMS_AI_INPAINT_API_KEY="${GEMINI_API_KEY}"
CMS_AI_REPAINT_API_KEY="${GEMINI_API_KEY}"
# Image manipulation
CMS_AI_ERASE_API_KEY="${CLIPDROP_API_KEY}"
CMS_AI_ISOLATE_API_KEY="${CLIPDROP_API_KEY}"
CMS_AI_UNCROP_API_KEY="${CLIPDROP_API_KEY}"
CMS_AI_UPSCALE_API_KEY="${CLIPDROP_API_KEY}"
# Audio transcription
CMS_AI_TRANSCRIBE_API_KEY="${OPENAI_API_KEY}"
If you want to use a different provider or model, you can to configure them in your .env file too. Please have a look into the ./config/cms.php for the used environment variables. If you don't set a model, the provider's default model is used.
Note: You can also configure the base URLs for each provider using the url key in each provider configuration, e.g.:
'transcribe' => [ // Transcribe audio
'provider' => env( 'CMS_AI_TRANSCRIBE', 'openai' ),
'model' => env( 'CMS_AI_TRANSCRIBE_MODEL' ),
'api_key' => env( 'CMS_AI_TRANSCRIBE_API_KEY' ),
'url' => 'https://openai-api.compatible-provider.com'
],
Note: To protect forms like the contact form against misuse and spam, you can configure HCaptcha.