Overview
PolyChat-AI includes powerful AI image generation capabilities using multimodal language models. The system features automatic retry logic, fallback models, and prompt optimization to ensure reliable image generation.Supported Models
Gemini 2.5 Flash
Free tier availableFast generation with good quality
GPT-4o
Premium modelHigh-quality multimodal capabilities
Claude 3.5/3.7
Premium modelExcellent at image generation
Model Selection
From the source code (src/services/openRouter.ts):
Image Sizes
Supported resolution options:- 256×256: Quick previews and thumbnails
- 512×512: Standard social media images
- 1024×1024: High-resolution outputs
Actual size support depends on the specific model selected. Most modern models support all three sizes.
Style Presets
Enhance your images with professional style options:- Artistic Styles
- Traditional Art
- Natural: Photography-like, realistic images
- Vivid: Vibrant colors and high contrast
- Digital Art: Clean, modern digital illustration
- Anime: Japanese animation style
Mood Settings
Set the atmosphere of your generated images:| Mood | Effect |
|---|---|
| Bright | Cheerful, well-lit, positive atmosphere |
| Dark | Moody, mysterious, dramatic shadows |
| Serene | Peaceful, calm, tranquil feeling |
| Dramatic | Intense, high-contrast, impactful |
| Playful | Fun, energetic, whimsical |
| Mysterious | Enigmatic, intriguing, subtle |
Lighting Options
Control the lighting in your images:- Natural: Outdoor daylight simulation
- Studio: Professional controlled lighting
- Dramatic: Strong shadows and highlights
- Soft: Diffused, gentle illumination
- Neon: Vibrant artificial lighting
- Golden Hour: Warm sunset/sunrise glow
Smart Features
Automatic Prompt Optimization
The system automatically enhances your prompts for better results:- Professional quality descriptors
- Resolution and detail specifications
- Style guidance if missing
- Technical quality parameters
Advanced Prompt Builder
For fine-grained control, use the advanced prompt builder:Automatic Retry & Fallback
One of the most powerful features: reliable image generation with automatic retry.How It Works
Fallback Models
If primary fails, try fallback models automatically:
- Gemini 2.5 Flash (free)
- Gemini 2.5 Flash (premium)
- Gemini experimental
- GPT-4o
- Claude 3.5 Sonnet
Retry Configuration
Using Image Generation
Basic Usage
Advanced Usage
Error Handling
Comprehensive Error Messages
When all retries fail, you get detailed guidance:Fallback Response
If generation completely fails, a descriptive fallback is provided:Best Practices
Writing Effective Prompts
Writing Effective Prompts
Be Specific:
- ✅ “A golden retriever puppy playing in autumn leaves, photorealistic”
- ❌ “A dog”
- Subject (what/who)
- Setting (where)
- Style (how it should look)
- Mood (atmosphere)
- Lighting (time of day, type)
- Colors: “vibrant blue”, “muted earth tones”
- Textures: “smooth glass”, “rough stone”
- Atmosphere: “misty morning”, “dramatic sunset”
Choosing Models
Choosing Models
For Speed: Gemini 2.5 Flash (free tier)
- Fast generation
- Good quality
- Free to use
- Superior detail
- Better prompt understanding
- Premium pricing
- Use multi-model chat
- Compare outputs
- Find your preferred model
Optimizing Results
Optimizing Results
Iterate on Prompts:
- Start with basic description
- Add style and mood
- Specify lighting and composition
- Refine based on results
- Specify style preset
- Set mood and lighting
- Choose optimal size
- Request high quality
- System handles failures automatically
- No manual retry needed
- Fallback models ensure success
Managing Costs
Managing Costs
Start Free: Use Gemini 2.5 Flash free tierMonitor Usage: Check dashboard with Ctrl+UOptimize Generation:
- Use 512×512 for drafts
- 1024×1024 only for finals
- Batch similar requests
- Free models for experimentation
- Premium for important projects
Technical Details
API Integration
Response Format
Example Prompts
Next: RAG Context
Learn about RAG-powered context enhancement with local embeddings