Two powerful image generation actions: Gemini for image editing and prompt-based transformations, and Imagen 4 for pure text-to-image generation. No base64 strings to handle!
Overview
This plugin suite provides two complementary server actions for image generation and editing using Google's AI models:
Gemini Nano-Banana ImageImage Editing
Generate images from text and edit existing images using Gemini's multimodal capabilities.
Text → Image generation
Image → Image editing
Supports up to 2 input images
Prompt-based transformations
Imagen 4 GenerateText-to-Image
Generate high-quality images from text descriptions using Google's dedicated Imagen 4 models.
Text → Image generation only
Multiple aspect ratios
Generate up to 4 images at once
Optimized for image quality
Demo Application
Try the plugins in action with our demo Bubble app:
Leave other fields at defaults (1 image, square aspect ratio)
Advanced Options
sample_count: Generate multiple variations (1-4)
aspect_ratio: Choose from supported ratios:
1:1 - Square (default)
16:9 - Landscape
9:16 - Portrait
4:3 - Standard
3:4 - Vertical
Model Support
Gemini Models
Supported:gemini-2.5-flash-image and gemini-2.5-flash-image-preview
Not supported: Other Gemini models without image capabilities
Imagen 4 Models
Supported:
imagen-4.0-generate-001 - Standard quality
imagen-4.0-ultra-generate-001 - Ultra quality
imagen-4.0-fast-generate-001 - Fast generation
Not supported: Older Imagen versions or non-generate models
Choosing between actions:
Use Gemini for image editing, transformations, or when you need to reference existing images
Use Imagen 4 for pure text-to-image generation with potentially higher quality
Troubleshooting
Common Issues
404: Model not found: Check model name spelling and regional availability
No image returned:
Verify you're using an image-capable model
Check safety settings if content might be blocked
Review your prompt for clarity
Uploads fail: Actions return data: URLs as fallback; store these manually
Invalid aspect ratio: Use only supported ratios for Imagen 4
Sample count too high: Imagen 4 supports maximum 4 images
Billing & Limits (Google AI Studio)
Free tier limits: If you see errors or missing results, you may have hit the free tier cap for the Gemini API. Nano Banana features may require the pay-as-you-go plan.
Upgrade your Google AI Studio project to pay-as-you-go (Tier 1):