Skip to main content

AI Image Generation Setup

AI image generation is an optional feature. When enabled, users can generate images for project covers, character portraits, and other visuals.

For how users interact with this feature, see the User Guide: AI Image Generation.

Supported Providers

ProviderRequirements
OpenAIOpenAI API key
OpenRouterOpenRouter API key
Fal.aiFal.ai API key
Stable DiffusionSelf-hosted AUTOMATIC1111 WebUI with --api flag

Configuration

Navigate to Admin → AI Image Generation.

Global Toggle

Enable Image Generation controls whether the feature is available to users. When disabled, no generation buttons appear in the UI.

Image Model Profiles

Profiles define which AI models users can choose from. Each profile wraps a provider + model combination.

To create a profile:

  1. Click Create Profile
  2. Select a provider
  3. Select a model
  4. Configure:
    • Name — What users see
    • Supported Sizes — Available dimensions
    • Default Size — Pre-selected option

Provider Setup

Expand a provider card and add your API key to enable it.

ProviderAPI Key Source
OpenAIplatform.openai.com/api-keys
OpenRouteropenrouter.ai/keys
Fal.aifal.ai/dashboard/keys
Stable DiffusionSelf-hosted — enter your WebUI endpoint URL

Environment Variables

Providers can be configured via environment variables:

AI_IMAGE_ENABLED=true

# OpenAI
AI_IMAGE_OPENAI_ENABLED=true
OPENAI_API_KEY=sk-...

# OpenRouter
AI_IMAGE_OPENROUTER_ENABLED=true
AI_IMAGE_OPENROUTER_API_KEY=sk-or-...

# Fal.ai
AI_FALAI_ENABLED=true
AI_FALAI_API_KEY=fal-...

# Stable Diffusion
AI_IMAGE_SD_ENABLED=true
AI_IMAGE_SD_ENDPOINT=http://localhost:7860
note

Admin panel settings take precedence over environment variables.

Offline Mode

AI image generation requires a server connection and is not available in offline mode.

Cost Considerations

Costs vary by provider. Check your provider's pricing. Self-hosted Stable Diffusion has no per-image cost.

Troubleshooting

  • Provider not available: Verify API key is correct and has credits
  • Generation failures: Content policy violation, rate limits, or network issues
  • Stable Diffusion not connecting: Ensure WebUI is running with --api flag

API keys are stored encrypted and never displayed after saving.