Image Generation
Gemini Image Series
Google Gemini image generation — Nano Banana series (original / Pro / 2), generation / editing / multi-image reference / search augmentation
POST
Gemini Image Series
Google Gemini’s native multimodal image series, three generations of Nano Banana plus dual-tier access:Documentation Index
Fetch the complete documentation index at: https://docs.qingbo.dev/llms.txt
Use this file to discover all available pages before exploring further.
- Nano Banana 2 (Gemini 3.1 Flash Image Preview) — lightweight fast tier, low latency, low cost, exclusive support for Google text / image search augmentation, ideal for previewing, batches, and iteration
- Nano Banana Pro (Gemini 3 Pro Image Preview) — flagship tier, native 4K output, professional fidelity, multi-step planning, built-in quality analysis
- Nano Banana (Gemini 2.5 Flash Image Preview) — previous-generation workhorse, low latency, high cost-performance, multi-image fusion, character consistency
-official model id directly to switch channels (clearer semantics), or you can set official_fallback: true on the standard tier to switch at runtime.
Per-image billing. All versions support both Chinese and English prompts.
Pricing
| Model | Price (per image) |
|---|---|
gemini-3-pro-image-preview-official | $0.1139 |
gemini-3-pro-image-preview | $0.0425 |
gemini-3.1-flash-image-preview-official | $0.05695 |
gemini-3.1-flash-image-preview | $0.031875 |
gemini-2.5-flash-image-preview-official | $0.03315 |
gemini-2.5-flash-image-preview | $0.01328125 |
Mode Quick Reference
| Mode | Trigger Fields | Supported Versions |
|---|---|---|
| Text-to-image | prompt only | All |
| Image-to-image | + image_urls + action: "image2image" | All |
| Image editing (instruction-based) | + image_urls + action: "edit" | All |
| Multi-image reference fusion | + image_urls (multiple) + action: "reference" | All |
| Search augmentation (grounding) | action: "search_grounded" or google_search: true | 3.1 Flash series only |
Examples
GET /v1/tasks/{task_id}. See Task System for details.
Available Models
| Model ID | Series | Description |
|---|---|---|
gemini-3-pro-image-preview-official | Nano Banana Pro · Official Direct | Flagship tier, official direct, higher stability |
gemini-3-pro-image-preview | Nano Banana Pro · Standard | Flagship tier, native 4K, professional fidelity, multi-step planning |
gemini-3.1-flash-image-preview-official | Nano Banana 2 · Official Direct | Fast tier with direct channel, search augmentation |
gemini-3.1-flash-image-preview | Nano Banana 2 · Standard | Fast tier with Google text + image search augmentation |
gemini-2.5-flash-image-preview-official | Nano Banana · Official Direct | Previous-gen direct, high cost-performance |
gemini-2.5-flash-image-preview | Nano Banana · Standard | Previous-gen workhorse, low latency, multi-image fusion |
Common Parameters
Pick one from the Available Models list
Operation type, allowed values:
generate— text-to-image (default)image2image— image-to-image (requiresimage_urls)edit— image editing (instruction-based / inpainting)reference— multi-image reference fusionsearch_grounded— search augmentation (3.1 Flash series only)
Image description text; supports CN/EN. The Gemini series excels at natural-language instructions and handles multi-step, multi-constraint prompts well.
Number of images to generate (multiple per call)
Random seed;
-1 means random. A fixed value reproduces similar results.Aspect ratio. Allowed values depend on the model:Standard 10 (supported by all models):
1:1— square2:3/3:2— portrait/landscape camera3:4/4:3— portrait/landscape standard4:5/5:4— portrait/landscape social9:16/16:9— portrait/landscape widescreen21:9— ultra-wide
1:4/4:1— tall column / banner1:8/8:1— extreme column / extreme banner
Output resolution, depends on model:
- 3 Pro:
1K/2K/4K - 3.1 Flash:
0.5K/1K/2K/4K - 2.5 Flash:
1K
Reference image URL array.
image2image / edit typically takes one image; reference takes multiple.Webhook callback URL, invoked when the task reaches a terminal state. See Callback Mechanism.
Callback event filter, e.g.
["completed", "failed"]Model-Specific Parameters
- 3 Pro Official
- 3 Pro
- 3.1 Flash Official
- 3.1 Flash
- 2.5 Flash Official
- 2.5 Flash
model id:
gemini-3-pro-image-preview-officialSeries: Nano Banana Pro · Official DirectSupported actions: generate / image2image / edit / referenceresolution: 1K / 2K / 4Kaspect_ratio: standard 10Highlights: Identical model to the 3 Pro standard tier, with a better channel and stability — suited for SLA-sensitive production lines. Priced ~2.7× the standard tier.This model is already on the official direct tier, so this is typically unnecessary. The field is kept for upstream parameter-template compatibility.
Resource Limits
| Item | Limit |
|---|---|
| Reference images | reference mode recommends ≤ 4; edit / image2image typically 1 |
| Per-image size | ≤ 30MB; supports JPG / PNG / WEBP |
| Output resolution | See each tab (3 Pro up to 4K / 3.1 Flash up to 4K / 2.5 Flash 1K only) |
| Output file | JPG; URLs valid for 24 hours |
| Search augmentation | 3.1 Flash series only; enabling google_search / google_image_search may slightly increase latency |
Related
- Task System Reference — task state machine / polling cadence / async push
- Request & Response — common error codes / headers / rate limits
- Authentication — API key application and usage
Gemini Image Series