AI Integration
FrankenCMS integrates with AI providers through Prism to help generate content, SEO metadata, and image alt text directly from the admin panel.
echolabs/prism package and an
API key from your chosen provider.
Installation
composer require echolabs/prism
Then add your provider's API key to .env. For example, with OpenAI:
OPENAI_API_KEY=sk-...
See the Prism documentation for the full list of supported environment variables per provider.
Supported Providers
Any provider supported by Prism works with FrankenCMS, including:
- OpenAI
- Anthropic
- Google Gemini
- Ollama (local / self-hosted)
- Mistral, Groq, xAI, DeepSeek
- OpenRouter
Configuration
AI settings are managed through the admin panel under Settings → Igor. From there you can:
- Enable or disable AI features
- Select your provider and model
- Enter your API key
- Customize the prompts used for each generation type
Available models are fetched dynamically from your provider's API and cached for 24 hours. Use the Refresh Models button to update the list.
AI Features
When enabled, AI generation buttons appear alongside supported fields in the post and media editors:
| Feature | Description |
|---|---|
| SEO Title | Generate an optimized page title from your content |
| SEO Description | Generate a meta description for search results |
| Post Teaser | Generate a short excerpt or teaser for post listings |
| Blog Post | Generate a full blog post draft with a focus topic and audience |
| Blog Post Title | Generate a title based on existing content |
| Image Alt Text | Analyze an image and generate descriptive alt text (uses vision) |
| Image Title | Generate a title for an uploaded image (uses vision) |
Each feature can be individually enabled or disabled, and its prompt can be customized from the Igor settings tab.
Programmatic Usage
use FrankenCms\Services\AiService;
$ai = app(AiService::class);
// Generate using an action key and context
$seoTitle = $ai->generate('generate_seo_title', [
'title' => 'My Post Title',
'content' => 'The full post body...',
]);
// With a streaming callback
$ai->generate('generate_seo_description', $context, function (string $chunk) {
// Process each streamed chunk
});