Image Generation & Editing Skill
Generate and edit images using AI (Google Gemini Nano Banana Pro, OpenAI DALL-E 3).
Capabilities:
- 🎨 Generate: Create new images from text descriptions
- ✏️ Edit: Modify existing images (add/remove elements, change colors)
- 🛍️ Product Placement: Put products into scenes
- 🎭 Style Transfer: Apply artistic styles to photos
- 🖼️ Composite: Combine multiple images into one
Quick Examples
Users can specify what they want:
| User Says |
Mode |
What Happens |
| "Generate an image of a sunset" |
Generate |
Text-to-image, no reference needed |
| "Create a logo for my coffee shop" |
Generate |
Text-to-image with text rendering |
| "Edit this image: add a hat to the cat" |
Edit |
User provides image, AI modifies it |
| "Remove the background from this photo" |
Edit |
User provides image, AI edits it |
| "Put this product on a kitchen counter" |
Product |
User provides product + optional scene |
| "Make this photo look like Van Gogh painted it" |
Style |
User provides photo, AI applies style |
| "Combine these photos into a group shot" |
Composite |
User provides multiple images |
Prerequisites
Environment variables must be configured for the APIs to work. At least one API key is required:
OPENAI_API_KEY - For OpenAI DALL-E 3 image generation
GOOGLE_API_KEY - For Google Gemini (Nano Banana / Nano Banana Pro)
See the repository README for setup instructions.
Available APIs
OpenAI GPT Image (Recommended for pure generation)
- Models:
gpt-image-1.5 (state of the art, best quality)
gpt-image-1 (great quality, cost-effective)
gpt-image-1-mini (fastest, most affordable)
- Best for: High-quality generation, transparency, text rendering, image editing
- Sizes: 1024x1024 (square), 1536x1024 (landscape), 1024x1536 (portrait), or
auto
- Quality: low (fast), medium (balanced), high (best), or
auto
- Background: transparent, opaque, or
auto
- Output formats: png (default), jpeg (faster), webp
- Compression: 0-100% (for jpeg/webp)
- Features:
- Image editing with up to 16 input images
- Transparent backgrounds
- Streaming with partial images
- High input fidelity for preserving faces/logos
- Inpainting with masks
- 32,000 character prompts
⚠️ Note: DALL-E 2 and DALL-E 3 are deprecated and will stop being supported on 05/12/2026.
Google Gemini Native Image Generation (Recommended for editing)
- Nano Banana (
gemini-2.5-flash-image): Fast, efficient, 1K resolution, up to 3 reference images
- Nano Banana Pro (
gemini-3-pro-image-preview): Professional quality, up to 4K, thinking mode, up to 14 reference images (default)
- Aspect ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
- Resolutions (Pro only): 1K, 2K, 4K
- Features:
- Image editing (add/remove elements, color changes)
- Product placement and composition
- Style transfer
- Advanced text rendering
- Google Search grounding (Pro only)
- Thinking mode for complex prompts (Pro only)
Workflow
Step 1: Gather Requirements (REQUIRED)
⚠️ Use interactive questioning — ask ONE question at a time.
Question Flow
⚠️ Use the AskUserQuestion tool for each question below. Do not just print questions in your response — use the tool to create interactive prompts with the options shown.
Q0: Model Selection
"Which image generation model would you like to use?
- Google Gemini (Nano Banana Pro) - Up to 4K, 14 reference images, style transfer, thinking mode (Recommended)
- OpenAI GPT Image 1.5 - State of the art, transparency, streaming, up to 16 input images
- OpenAI GPT Image 1 - Great quality, transparency, image editing
- OpenAI GPT Image 1 Mini - Fastest, most affordable"
Wait for response. If user doesn't have a preference, recommend Gemini for editing/reference tasks or GPT Image 1.5 for pure generation.
Q1: Reference
"I'll generate that image for you! First — do you have any reference images?
- Product photos to include
- Style references
- Images to edit
- No, generate from scratch"
Wait for response.
Q2: Aspect Ratio
"What aspect ratio?
- 1:1 (square)
- 16:9 (landscape/widescreen)
- 9:16 (portrait/vertical)
- 4:3 / 3:4 (classic)
- Other (2:3, 3:2, 4:5, 5:4, 21:9)
- Or specify"
Wait for response.
Q3: Resolution
"What resolution?
- 1K (fast)
- 2K (balanced)
- 4K (highest quality)"
Wait for response.
Q4: Style
"Any style preferences?
- Photorealistic
- Artistic/painterly
- Cartoon/illustration
- 3D render
- Or describe your own"
Wait for response.
Quick Reference
| Question |
Determines |
| Reference |
Generation vs editing mode |
| Aspect Ratio |
Image dimensions |
| Resolution |
Quality level |
| Style |
Prompt enhancement direction |
Parsing:
- If user provides reference images → use image editing mode
- If user doesn't answer all questions → use sensible defaults and note assumptions
- Parse: subject, style, mood, special requirements (colors, text, composition)
Step 2: Craft the Prompt
Transform the user request into an effective image generation prompt:
- Be specific: Add details the user might not have mentioned
- Describe style: "digital art", "oil painting", "photograph", "3D render"
- Include lighting: "soft lighting", "dramatic shadows", "golden hour"
- Specify quality: "highly detailed", "8k", "professional"
Example transformation:
- User: "a cat in space"
- Enhanced: "A majestic orange tabby cat floating in outer space, surrounded by colorful nebulae and distant stars, wearing a small astronaut helmet, digital art style, highly detailed, vibrant colors, cinematic lighting"
Step 3: Select the API
Use the model selected by the user in Q0:
Check which API keys are configured in environment:
OPENAI_API_KEY → GPT Image models available
GOOGLE_API_KEY → Gemini (Nano Banana Pro) available
If the user's selected model isn't available: Inform them and offer alternatives.
Model mapping from Q0:
- "Google Gemini (Nano Banana Pro)" → Use
gemini.py with gemini-3-pro-image-preview
- "OpenAI GPT Image 1.5" → Use
openai_image.py with gpt-image-1.5
- "OpenAI GPT Image 1" → Use
openai_image.py with gpt-image-1
- "OpenAI GPT Image 1 Mini" → Use
openai_image.py with gpt-image-1-mini
Step 4: Generate the Image
Execute the appropriate script from ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/:
For OpenAI GPT Image - Text to Image:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \
--prompt "your enhanced prompt" \
--model "gpt-image-1" \
--size "1024x1024" \
--quality "high" \
--output "/path/to/output.png"
For OpenAI GPT Image - With Transparent Background:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \
--prompt "A product icon with no background" \
--model "gpt-image-1" \
--background "transparent" \
--quality "high" \
--output "/path/to/output.png"
For OpenAI GPT Image - Image Editing (with reference images):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \
--prompt "Add a wizard hat to this cat" \
--model "gpt-image-1" \
--image "/path/to/cat.jpg" \
--input-fidelity "high" \
--output "/path/to/output.png"
For OpenAI GPT Image - Multiple Reference Images:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \
--prompt "Create a gift basket containing these items" \
--model "gpt-image-1" \
--image "/path/to/item1.png" \
--image "/path/to/item2.png" \
--image "/path/to/item3.png" \
--output "/path/to/output.png"
For OpenAI GPT Image - With Mask (Inpainting):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \
--prompt "Replace the pool with a garden" \
--model "gpt-image-1" \
--image "/path/to/scene.jpg" \
--mask "/path/to/mask.png" \
--output "/path/to/output.png"
For OpenAI GPT Image - Streaming with Partial Images:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \
--prompt "A beautiful sunset over mountains" \
--model "gpt-image-1" \
--stream \
--partial-images 2 \
--output "/path/to/output.png"
For Google Gemini (Nano Banana Pro) - Text to Image:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/gemini.py \
--prompt "your enhanced prompt" \
--model "gemini-3-pro-image-preview" \
--aspect-ratio "1:1" \
--resolution "2K" \
--output "/path/to/output.png"
For Google Gemini - With Reference Images (editing, product placement, etc.):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/gemini.py \
--prompt "Add a wizard hat to this cat" \
--image "/path/to/cat.jpg" \
--aspect-ratio "1:1" \
--resolution "2K"
For Google Gemini - Multiple Reference Images (composition, style transfer):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/gemini.py \
--prompt "Place this product on the kitchen counter in this scene" \
--image "/path/to/product.png" \
--image "/path/to/kitchen.jpg" \
--aspect-ratio "16:9" \
--resolution "2K"
For Google Gemini (Nano Banana - faster, fewer features):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/gemini.py \
--prompt "your enhanced prompt" \
--model "gemini-2.5-flash-image" \
--aspect-ratio "1:1"
Step 5: Deliver the Result
- Show the generated image to the user
- Provide the enhanced prompt used (so they can iterate)
- Offer to:
- Generate variations
- Try a different style
- Use a different API/model
- Refine the prompt
Error Handling
Missing API key: Inform the user which key is needed and how to set it up:
API rate limit: Suggest waiting or trying the other API.
Content policy violation: Rephrase the prompt to be more appropriate.
Generation failed: Retry with simplified prompt or different API.
Reference Image Use Cases
Both OpenAI GPT Image and Google Gemini support reference images for advanced editing:
OpenAI GPT Image: Up to 16 input images, with input_fidelity: high for preserving faces/logos
Google Gemini: Nano Banana (up to 3), Nano Banana Pro (up to 14)
Image Editing
- "Add a santa hat to this person" + person.jpg
- "Remove the background and replace with a beach scene" + product.jpg
- "Change the sofa color to blue" + living_room.jpg
Product Placement
- "Place this product on a marble kitchen counter" + product.png + kitchen.jpg
- "Show this watch on a person's wrist" + watch.png + arm.jpg
Style Transfer
- "Transform this photo into Van Gogh's Starry Night style" + photo.jpg
- "Make this look like a watercolor painting" + landscape.jpg
Multi-Image Composition
- "Create a group photo of these people in an office" + person1.jpg + person2.jpg + person3.jpg
- "Combine these elements into a cohesive scene" + element1.png + element2.png + background.jpg
Character Consistency
- "Show this character from a different angle" + character.jpg
- "Put this person in a superhero costume" + person.jpg
Tip: For best results with reference images, be specific about what you want to preserve vs. change.
Prompt Engineering Tips
For Photorealism
- Include "photograph", "DSLR", "35mm film"
- Specify camera settings: "shallow depth of field", "bokeh"
- Add lighting: "natural light", "studio lighting"
For Artistic Styles
- Reference art movements: "impressionist", "art nouveau", "cyberpunk"
- Name artist styles: "in the style of Studio Ghibli", "Moebius style"
- Specify medium: "watercolor", "oil painting", "pencil sketch"
For Consistency
- Use seed values when available
- Save successful prompts for reference
- Note which API produced best results for similar requests
API Comparison
| Feature |
GPT Image 1.5 |
GPT Image 1 |
GPT Image 1 Mini |
Nano Banana |
Nano Banana Pro |
| Provider |
OpenAI |
OpenAI |
OpenAI |
Google |
Google |
| Model ID |
gpt-image-1.5 |
gpt-image-1 |
gpt-image-1-mini |
gemini-2.5-flash-image |
gemini-3-pro-image-preview |
| Best for |
State of the art |
Quality + value |
Speed + cost |
Fast generation |
Professional assets |
| Sizes |
1024², 1536x1024, 1024x1536, auto |
Same |
Same |
1K only |
Up to 4K |
| Quality options |
low, medium, high, auto |
Same |
Same |
N/A |
N/A |
| Aspect ratios |
3 + auto |
Same |
Same |
10 options |
10 options |
| Reference images |
Up to 16 |
Up to 16 |
Up to 16 |
Up to 3 |
Up to 14 |
| Image editing |
Yes |
Yes |
Yes |
Yes |
Yes |
| Inpainting (mask) |
Yes |
Yes |
Yes |
Yes |
Yes |
| Transparent background |
Yes |
Yes |
Yes |
No |
No |
| Streaming |
Yes |
Yes |
Yes |
No |
No |
| Input fidelity |
high/low |
high/low |
low only |
N/A |
N/A |
| Output formats |
png, jpeg, webp |
Same |
Same |
png |
png |
| Compression |
0-100% |
Same |
Same |
No |
No |
| Text rendering |
Excellent |
Excellent |
Good |
Good |
Excellent |
| Thinking mode |
No |
No |
No |
No |
Yes |
| Max prompt length |
32,000 chars |
32,000 chars |
32,000 chars |
N/A |
N/A |
| Speed |
~30-60s |
~20-40s |
~10-20s |
~10-20s |
~30-60s |
⚠️ DALL-E 2 and DALL-E 3 are deprecated and will stop being supported on 05/12/2026. Use GPT Image models instead.
1---2name: image-generation3description: Use this skill for any image-related AI generation or editing task. Triggers include: GENERATE: "generate image", "create image", "make picture", "draw", "visualize", "image of", "create art", "generate art" EDIT: "edit image", "modify image", "change image", "update image", "fix image", "enhance image" ADD/REMOVE: "add to image", "put in image", "remove from image", "delete from image", "add element" STYLE: "style transfer", "make it look like", "convert style", "apply style", "in the style of" PRODUCT: "product photo", "product placement", "place product", "mockup", "put product on" COMPOSITE: "combine images", "merge images", "blend images", "create composite" Supports text-to-image generation, image editing with references, product placement, style transfer, and multi-image composition using Google Gemini (Nano Banana Pro) or OpenAI DALL-E.4---56# Image Generation & Editing Skill78Generate and edit images using AI (Google Gemini Nano Banana Pro, OpenAI DALL-E 3).910**Capabilities:**11- 🎨 **Generate**: Create new images from text descriptions12- ✏️ **Edit**: Modify existing images (add/remove elements, change colors)13- 🛍️ **Product Placement**: Put products into scenes14- 🎭 **Style Transfer**: Apply artistic styles to photos15- 🖼️ **Composite**: Combine multiple images into one1617## Quick Examples1819Users can specify what they want:2021| User Says | Mode | What Happens |22|-----------|------|--------------|23| "Generate an image of a sunset" | Generate | Text-to-image, no reference needed |24| "Create a logo for my coffee shop" | Generate | Text-to-image with text rendering |25| "Edit this image: add a hat to the cat" | Edit | User provides image, AI modifies it |26| "Remove the background from this photo" | Edit | User provides image, AI edits it |27| "Put this product on a kitchen counter" | Product | User provides product + optional scene |28| "Make this photo look like Van Gogh painted it" | Style | User provides photo, AI applies style |29| "Combine these photos into a group shot" | Composite | User provides multiple images |3031## Prerequisites3233Environment variables must be configured for the APIs to work. At least one API key is required:3435- `OPENAI_API_KEY` - For OpenAI DALL-E 3 image generation36- `GOOGLE_API_KEY` - For Google Gemini (Nano Banana / Nano Banana Pro)3738See the repository README for setup instructions.3940## Available APIs4142### OpenAI GPT Image (Recommended for pure generation)43- **Models**:44 - `gpt-image-1.5` (state of the art, best quality)45 - `gpt-image-1` (great quality, cost-effective)46 - `gpt-image-1-mini` (fastest, most affordable)47- **Best for**: High-quality generation, transparency, text rendering, image editing48- **Sizes**: 1024x1024 (square), 1536x1024 (landscape), 1024x1536 (portrait), or `auto`49- **Quality**: low (fast), medium (balanced), high (best), or `auto`50- **Background**: transparent, opaque, or `auto`51- **Output formats**: png (default), jpeg (faster), webp52- **Compression**: 0-100% (for jpeg/webp)53- **Features**:54 - Image editing with up to 16 input images55 - Transparent backgrounds56 - Streaming with partial images57 - High input fidelity for preserving faces/logos58 - Inpainting with masks59 - 32,000 character prompts6061> ⚠️ **Note**: DALL-E 2 and DALL-E 3 are deprecated and will stop being supported on 05/12/2026.6263### Google Gemini Native Image Generation (Recommended for editing)64- **Nano Banana** (`gemini-2.5-flash-image`): Fast, efficient, 1K resolution, up to 3 reference images65- **Nano Banana Pro** (`gemini-3-pro-image-preview`): Professional quality, up to 4K, thinking mode, up to 14 reference images (default)66- **Aspect ratios**: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:967- **Resolutions** (Pro only): 1K, 2K, 4K68- **Features**: 69 - Image editing (add/remove elements, color changes)70 - Product placement and composition71 - Style transfer72 - Advanced text rendering73 - Google Search grounding (Pro only)74 - Thinking mode for complex prompts (Pro only)7576## Workflow7778### Step 1: Gather Requirements (REQUIRED)7980⚠️ **Use interactive questioning — ask ONE question at a time.**8182#### Question Flow8384⚠️ **Use the `AskUserQuestion` tool for each question below.** Do not just print questions in your response — use the tool to create interactive prompts with the options shown.8586**Q0: Model Selection**87> "Which image generation model would you like to use?88>89> - Google Gemini (Nano Banana Pro) - Up to 4K, 14 reference images, style transfer, thinking mode (Recommended)90> - OpenAI GPT Image 1.5 - State of the art, transparency, streaming, up to 16 input images91> - OpenAI GPT Image 1 - Great quality, transparency, image editing92> - OpenAI GPT Image 1 Mini - Fastest, most affordable"9394*Wait for response. If user doesn't have a preference, recommend Gemini for editing/reference tasks or GPT Image 1.5 for pure generation.*9596**Q1: Reference**97> "I'll generate that image for you! First — **do you have any reference images?**98> 99> - Product photos to include100> - Style references101> - Images to edit102> - No, generate from scratch"103104*Wait for response.*105106**Q2: Aspect Ratio**107> "What **aspect ratio**?108> 109> - 1:1 (square)110> - 16:9 (landscape/widescreen)111> - 9:16 (portrait/vertical)112> - 4:3 / 3:4 (classic)113> - Other (2:3, 3:2, 4:5, 5:4, 21:9)114> - Or specify"115116*Wait for response.*117118**Q3: Resolution**119> "What **resolution**?120> 121> - 1K (fast)122> - 2K (balanced)123> - 4K (highest quality)"124125*Wait for response.*126127**Q4: Style**128> "Any **style preferences**?129> 130> - Photorealistic131> - Artistic/painterly132> - Cartoon/illustration133> - 3D render134> - Or describe your own"135136*Wait for response.*137138#### Quick Reference139140| Question | Determines |141|----------|------------|142| Reference | Generation vs editing mode |143| Aspect Ratio | Image dimensions |144| Resolution | Quality level |145| Style | Prompt enhancement direction |146147**Parsing:**148- If user provides reference images → use image editing mode149- If user doesn't answer all questions → use sensible defaults and note assumptions150- Parse: subject, style, mood, special requirements (colors, text, composition)151152### Step 2: Craft the Prompt153154Transform the user request into an effective image generation prompt:1551561. **Be specific**: Add details the user might not have mentioned1572. **Describe style**: "digital art", "oil painting", "photograph", "3D render"1583. **Include lighting**: "soft lighting", "dramatic shadows", "golden hour"1594. **Specify quality**: "highly detailed", "8k", "professional"160161**Example transformation:**162- User: "a cat in space"163- Enhanced: "A majestic orange tabby cat floating in outer space, surrounded by colorful nebulae and distant stars, wearing a small astronaut helmet, digital art style, highly detailed, vibrant colors, cinematic lighting"164165### Step 3: Select the API166167Use the model selected by the user in Q0:1681691. **Check which API keys are configured** in environment:170 - `OPENAI_API_KEY` → GPT Image models available171 - `GOOGLE_API_KEY` → Gemini (Nano Banana Pro) available1721732. **If the user's selected model isn't available**: Inform them and offer alternatives.1741753. **Model mapping from Q0**:176 - "Google Gemini (Nano Banana Pro)" → Use `gemini.py` with `gemini-3-pro-image-preview`177 - "OpenAI GPT Image 1.5" → Use `openai_image.py` with `gpt-image-1.5`178 - "OpenAI GPT Image 1" → Use `openai_image.py` with `gpt-image-1`179 - "OpenAI GPT Image 1 Mini" → Use `openai_image.py` with `gpt-image-1-mini`180181### Step 4: Generate the Image182183Execute the appropriate script from `${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/`:184185**For OpenAI GPT Image - Text to Image:**186```bash187python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \188 --prompt "your enhanced prompt" \189 --model "gpt-image-1" \190 --size "1024x1024" \191 --quality "high" \192 --output "/path/to/output.png"193```194195**For OpenAI GPT Image - With Transparent Background:**196```bash197python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \198 --prompt "A product icon with no background" \199 --model "gpt-image-1" \200 --background "transparent" \201 --quality "high" \202 --output "/path/to/output.png"203```204205**For OpenAI GPT Image - Image Editing (with reference images):**206```bash207python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \208 --prompt "Add a wizard hat to this cat" \209 --model "gpt-image-1" \210 --image "/path/to/cat.jpg" \211 --input-fidelity "high" \212 --output "/path/to/output.png"213```214215**For OpenAI GPT Image - Multiple Reference Images:**216```bash217python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \218 --prompt "Create a gift basket containing these items" \219 --model "gpt-image-1" \220 --image "/path/to/item1.png" \221 --image "/path/to/item2.png" \222 --image "/path/to/item3.png" \223 --output "/path/to/output.png"224```225226**For OpenAI GPT Image - With Mask (Inpainting):**227```bash228python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \229 --prompt "Replace the pool with a garden" \230 --model "gpt-image-1" \231 --image "/path/to/scene.jpg" \232 --mask "/path/to/mask.png" \233 --output "/path/to/output.png"234```235236**For OpenAI GPT Image - Streaming with Partial Images:**237```bash238python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/openai_image.py \239 --prompt "A beautiful sunset over mountains" \240 --model "gpt-image-1" \241 --stream \242 --partial-images 2 \243 --output "/path/to/output.png"244```245246**For Google Gemini (Nano Banana Pro) - Text to Image:**247```bash248python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/gemini.py \249 --prompt "your enhanced prompt" \250 --model "gemini-3-pro-image-preview" \251 --aspect-ratio "1:1" \252 --resolution "2K" \253 --output "/path/to/output.png"254```255256**For Google Gemini - With Reference Images (editing, product placement, etc.):**257```bash258python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/gemini.py \259 --prompt "Add a wizard hat to this cat" \260 --image "/path/to/cat.jpg" \261 --aspect-ratio "1:1" \262 --resolution "2K"263```264265**For Google Gemini - Multiple Reference Images (composition, style transfer):**266```bash267python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/gemini.py \268 --prompt "Place this product on the kitchen counter in this scene" \269 --image "/path/to/product.png" \270 --image "/path/to/kitchen.jpg" \271 --aspect-ratio "16:9" \272 --resolution "2K"273```274275**For Google Gemini (Nano Banana - faster, fewer features):**276```bash277python3 ${CLAUDE_PLUGIN_ROOT}/skills/image-generation/scripts/gemini.py \278 --prompt "your enhanced prompt" \279 --model "gemini-2.5-flash-image" \280 --aspect-ratio "1:1"281```282283### Step 5: Deliver the Result2842851. Show the generated image to the user2862. Provide the enhanced prompt used (so they can iterate)2873. Offer to:288 - Generate variations289 - Try a different style290 - Use a different API/model291 - Refine the prompt292293## Error Handling294295**Missing API key**: Inform the user which key is needed and how to set it up:296- OpenAI: https://platform.openai.com/api-keys297- Google: https://aistudio.google.com/apikey298299**API rate limit**: Suggest waiting or trying the other API.300301**Content policy violation**: Rephrase the prompt to be more appropriate.302303**Generation failed**: Retry with simplified prompt or different API.304305## Reference Image Use Cases306307Both OpenAI GPT Image and Google Gemini support reference images for advanced editing:308309**OpenAI GPT Image**: Up to 16 input images, with `input_fidelity: high` for preserving faces/logos310**Google Gemini**: Nano Banana (up to 3), Nano Banana Pro (up to 14)311312### Image Editing313- "Add a santa hat to this person" + person.jpg314- "Remove the background and replace with a beach scene" + product.jpg315- "Change the sofa color to blue" + living_room.jpg316317### Product Placement318- "Place this product on a marble kitchen counter" + product.png + kitchen.jpg319- "Show this watch on a person's wrist" + watch.png + arm.jpg320321### Style Transfer322- "Transform this photo into Van Gogh's Starry Night style" + photo.jpg323- "Make this look like a watercolor painting" + landscape.jpg324325### Multi-Image Composition326- "Create a group photo of these people in an office" + person1.jpg + person2.jpg + person3.jpg327- "Combine these elements into a cohesive scene" + element1.png + element2.png + background.jpg328329### Character Consistency330- "Show this character from a different angle" + character.jpg331- "Put this person in a superhero costume" + person.jpg332333**Tip**: For best results with reference images, be specific about what you want to preserve vs. change.334335## Prompt Engineering Tips336337### For Photorealism338- Include "photograph", "DSLR", "35mm film"339- Specify camera settings: "shallow depth of field", "bokeh"340- Add lighting: "natural light", "studio lighting"341342### For Artistic Styles343- Reference art movements: "impressionist", "art nouveau", "cyberpunk"344- Name artist styles: "in the style of Studio Ghibli", "Moebius style"345- Specify medium: "watercolor", "oil painting", "pencil sketch"346347### For Consistency348- Use seed values when available349- Save successful prompts for reference350- Note which API produced best results for similar requests351352## API Comparison353354| Feature | GPT Image 1.5 | GPT Image 1 | GPT Image 1 Mini | Nano Banana | Nano Banana Pro |355|---------|---------------|-------------|------------------|-------------|-----------------|356| Provider | OpenAI | OpenAI | OpenAI | Google | Google |357| Model ID | gpt-image-1.5 | gpt-image-1 | gpt-image-1-mini | gemini-2.5-flash-image | gemini-3-pro-image-preview |358| Best for | State of the art | Quality + value | Speed + cost | Fast generation | Professional assets |359| Sizes | 1024², 1536x1024, 1024x1536, auto | Same | Same | 1K only | Up to 4K |360| Quality options | low, medium, high, auto | Same | Same | N/A | N/A |361| Aspect ratios | 3 + auto | Same | Same | 10 options | 10 options |362| Reference images | Up to 16 | Up to 16 | Up to 16 | Up to 3 | Up to 14 |363| Image editing | Yes | Yes | Yes | Yes | Yes |364| Inpainting (mask) | Yes | Yes | Yes | Yes | Yes |365| Transparent background | Yes | Yes | Yes | No | No |366| Streaming | Yes | Yes | Yes | No | No |367| Input fidelity | high/low | high/low | low only | N/A | N/A |368| Output formats | png, jpeg, webp | Same | Same | png | png |369| Compression | 0-100% | Same | Same | No | No |370| Text rendering | Excellent | Excellent | Good | Good | Excellent |371| Thinking mode | No | No | No | No | Yes |372| Max prompt length | 32,000 chars | 32,000 chars | 32,000 chars | N/A | N/A |373| Speed | ~30-60s | ~20-40s | ~10-20s | ~10-20s | ~30-60s |374375> ⚠️ **DALL-E 2 and DALL-E 3 are deprecated** and will stop being supported on 05/12/2026. Use GPT Image models instead.