Overview
ImageGenerationTool supports:- Text-to-Image: Generate images from text descriptions
- Image Editing: Edit existing images with text prompts
- Person Generation: Create person photos from reference images
- Multiple Models: Flash (fast) and Pro (quality) models
Image generation uses Google’s Gemini models via Vertex AI. Images are generated in high quality and saved to your workflow output.
Models
Gemini 2.5 Flash Image
Best for: Speed and efficiency- Aspect Ratios: 1:1, 16:9, 9:16, 3:4, 4:3
- Image Size: Fixed (not configurable)
- Max Reference Images: 3
- Use Case: Quick image generation, rapid iterations
Gemini 3 Pro Image Preview
Best for: Quality and flexibility- Aspect Ratios: 1:1, 16:9, 9:16, 3:4, 4:3, 21:9
- Image Sizes: 1K, 2K, 4K
- Max Reference Images: 5
- Use Case: High-quality images, detailed editing
Use Cases
1. Text-to-Image Generation
Generate images from text descriptions:2. Image Editing
Edit existing images with text prompts:3. Person Generation
Generate person photos from reference images:Configuration
Config Fields
Create a single config field of typeimage_generation_config:
Configuration Options
| Field | Required | Description | Options |
|---|---|---|---|
model | Yes | Model to use | gemini-2.5-flash-image, gemini-3-pro-image-preview |
aspect_ratio | Yes | Image aspect ratio | Must be supported by selected model |
output_format | No | Output format | png (default), jpeg |
style_instructions | No | Style guidance | Text appended to prompts |
image_size | No | Image size (Pro only) | 1K, 2K, 4K |
reference_images | No | Reference images | List of image paths |
Aspect Ratios
Choose aspect ratios based on your use case:1:1
Square format. Good for social media posts.
16:9
Widescreen. Perfect for banners and headers.
9:16
Vertical. Ideal for mobile content.
3:4
Portrait. Great for photos and portraits.
Output Handling
Saving Generated Images
Generated images must be copied to the block’s output directory:Style Instructions
Add style guidance to your prompts:Best Practices
Choose the Right Model
Choose the Right Model
Use Flash for speed, Pro for quality. Flash is faster and cheaper, Pro produces higher quality images.
Be Specific in Prompts
Be Specific in Prompts
Detailed prompts produce better results. Include style, mood, composition details.
Use Appropriate Aspect Ratios
Use Appropriate Aspect Ratios
Match aspect ratios to your use case. 16:9 for banners, 1:1 for social media.
Save Images Properly
Save Images Properly
Always copy generated images to the block output directory. Don’t rely on temporary paths.
Limitations
Model Limitations
- Flash Model: Fixed image size, limited reference images (3)
- Pro Model: Higher cost, slower generation
- Aspect Ratios: Must match model capabilities
- Reference Images: Limited by model (3-5 images)
General Limitations
- No animation: Static images only
- No video: Cannot generate videos
- File formats: PNG or JPEG only
- Size limits: Maximum 4K for Pro model
Image generation consumes credits based on model and image size. Pro model and larger images cost more credits.
Troubleshooting
Image not generating
Image not generating
- Check that the model supports the aspect ratio
- Verify the prompt is clear and specific
- Ensure config fields are set correctly
- Check credit balance
Image quality issues
Image quality issues
- Try the Pro model for better quality
- Add style instructions to the config
- Be more specific in the prompt
- Use higher image size (Pro model)
Reference images not working
Reference images not working
- Verify image paths are correct
- Check that model supports reference images
- Ensure reference images are accessible
- Check image format (PNG/JPEG)
Related Features
- AI Module - Multi-agent system that uses image generation
- Code Generation - How image generation code is created
- Configs - Configure image generation settings
Image generation is a powerful feature for creating visuals. Experiment with different models, aspect ratios, and prompts to get the best results.