Model Overview
Gemini 2.5 Flash Image (gemini-2.5-flash-image) editing feature supports intelligent editing and transformation of existing images. Upload single or multiple images and use text descriptions to achieve advanced functions like element addition, style conversion, and image composition.
🎨 Intelligent Image Editing
Upload image + text description = precise editing! Supports multi-image composition, element modification, style conversion, and more.
Upload image + text description = precise editing! Supports multi-image composition, element modification, style conversion, and more.
🔀 Two Calling Methods
| Feature | OpenAI Compatible Mode | Google Native Format |
|---|---|---|
| Endpoint | /v1/chat/completions | /v1beta/models/gemini-2.5-flash-image:generateContent |
| Output Size | Default ratio | Supports 10 aspect ratios |
| Multi-image | ✅ Supported | ✅ Supported |
| Compatibility | Perfect OpenAI SDK compatibility | Requires native calling |
| Return Format | Base64 | Base64 |
| Image Input | URL or Base64 | Base64 (inline_data) |
🌟 Key Features
- 🔄 Flexible Editing: Supports element addition/removal, style conversion, image composition, etc.
- 🎭 Multi-image Processing: Can process multiple images simultaneously for fusion, splicing, and other effects
- 📐 Custom Dimensions: Google native format supports 10 aspect ratio outputs
- 💰 Great Value: $0.025/edit, per-request billing, transparent pricing
- 🚀 Fast Processing: Completes editing in ~10 seconds on average
- 📦 Base64 Output: Returns edited base64 image data directly
📋 Feature Comparison
| Feature | Gemini Flash Image | GPT-4o Edit | DALL·E 2 Edit | Flux Edit |
|---|---|---|---|---|
| Price | $0.025/edit | Token-based | $0.018/image | $0.035/edit |
| Multi-image Input | ✅ Supported | ✅ Supported | ❌ Not supported | ❌ Native not supported |
| Custom Dimensions | ✅ 10 ratios | ❌ Fixed | ❌ Fixed | ✅ Partial support |
| Response Speed | ~10s | ~20s | Slower | Medium |
| Return Format | Base64 | Base64 | URL | URL |
| Chinese Support | ✅ Perfect | ✅ Perfect | ❌ Translation needed | ❌ Translation needed |
🚀 Quick Start
Prerequisites
1
Create Token
Log in to LaoZhang API Token Management and create a per-request billing token

2
Select Billing Method
Important: Must select “Per-Request Billing” type, not “Pay-As-You-Go”
3
Save Token
Copy the generated token, format is
sk-xxxxxx💰 Great Value Advantage
- LaoZhang API: $0.025/edit (37.5% cheaper than official)
- Official Price: $0.04/edit
- Top-up Bonus: Top up $100 get +10% bonus
- Exchange Rate Advantage: Total equals ~73% of official price
Method 1: OpenAI Compatible Mode
Single Image Edit - Curl
Single Image Edit - Python SDK
Multi-image Composition - Python SDK
Method 2: Google Native Format (Custom Aspect Ratios)
Complete Python Tool Script
Expand to view complete Python script (with aspect ratio support)
Expand to view complete Python script (with aspect ratio support)
🎯 Use Cases
Element Addition
Add new elements to existing images (people, animals, objects, etc.)
Style Conversion
Convert images to different art styles (oil painting, watercolor, cartoon, etc.)
Multi-image Composition
Merge multiple images into one creative work
Scene Transformation
Change image background, lighting, season, and other environmental factors
Product Display
Place product images in different scenarios for display
Creative Design
Provide rapid prototyping and creative inspiration for designers
💡 Best Practices
Editing Prompt Tips
1
Preserve Original
If you want to preserve most of the original, clearly state “keep the original composition” or similar
2
Specific Description
Describe in detail the elements to add or modify, including position, size, style, etc.
3
Style Consistency
If style consistency is needed, state “in the same style as the original image”
4
Multi-image Processing
When processing multiple images, clearly explain how to combine them (“merge”, “combine”, “place side by side”, etc.)
Aspect Ratio Selection Guide
| Original Ratio | Recommended Output | Notes |
|---|---|---|
| Landscape photo | 16:9 or 4:3 | Suitable for horizontal display |
| Portrait photo | 9:16 or 3:4 | Suitable for phone wallpaper, posters |
| Square | 1:1 | Suitable for social media |
| Uncertain | 1:1 | Universal choice |
❓ FAQ
What image formats are supported?
What image formats are supported?
Supports common image formats:
- JPG/JPEG
- PNG
- WebP
- GIF (static)
Is there a size limit?
Is there a size limit?
- Recommended size: Single image ≤ 5MB
- Maximum size: ≤ 10MB
- Oversized images increase processing time, recommend compressing before upload
How many images can be processed at once?
How many images can be processed at once?
- OpenAI Compatible Mode: Supports multiple images (recommend ≤ 4)
- Google Native Format: Supports multiple images (recommend ≤ 4)
- Too many images affect generation quality and processing time
What if results are unsatisfactory?
What if results are unsatisfactory?
Try:
- Optimize Prompt: Provide more detailed, specific descriptions
- Adjust Aspect Ratio: Choose more suitable output dimensions
- Step-by-step Processing: Complex edits can be done in multiple steps
- Multiple Attempts: AI generation has randomness, try multiple times
How to ensure consistent style after editing?
How to ensure consistent style after editing?
Clearly state in the prompt:
- “in the same style as the original image”
- “keep the original lighting and color tone”
- “seamlessly integrate”