Introduction
Nano Banana 2 API brings Gemini 3.1 Flash Image to fast drafts and reframing jobs, including a 0.5K tier and fourteen aspect ratios. Google now lists this model as deprecated, without an announced shutdown date; existing integrations can still use the size and search controls exposed here. For Nano Banana 2 reframing, send 1–14 sources and describe the intended change before listing the details to preserve. Up to 10 images fit economy processing; 11–14 need Official fallback, official pricing and a separate fee for each input.
| Field | Value |
|---|---|
| Input | Image |
| Output | Image |
| Model | Google Gemini 3.1 Flash Image (Nano Banana 2) |
| Endpoints | Nano Banana 2 — Text to image; image editing with 1 to 14 sources |
| Size tiers | 0.5k, 1k (default), 2k, 4k; 1:1 at 512, 1024, 2048 or 4096 pixels square; 0.5k on the official processing option only |
| Aspect ratios | Nano Banana 2 — 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 4:1, 1:4, 8:1, 1:8 |
| Search | Use Nano Banana 2 web search for facts such as a date on a poster; image search supplies visual examples of real places or products. Neither is enabled initially. Each active search can add the fee in the quote and requires Official fallback at official pricing. |
| Output formats | Nano Banana 2 — PNG from text to image, JPEG from editing |
| Content policy | Google's content policy; requests from the Strong level up are refused, and the economy processing option also refuses Mild-level requests |
Key features & highlights
A 4:1 panorama in one call
A couple walking barefoot along the surf at dusk, rendered as a 4:1 banner at the 2k tier: 4128 pixels wide, with beach and sky filling both ends.
Editorial looks with texture
An oversized cream blazer over black lace by a hotel window at night; the lace, the wool and the city lights all read clearly at 1k.
New location, same person
The woman in the red satin dress moved from a jazz lounge to a rooftop pool bar at golden hour, her face, dress and pose kept.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | Up to 5,000 characters. Describe subject, setting, light and lens in plain sentences; words in quotes are rendered as text in the image. at least 1 characters · at most 5000 characters |
image_urls | Yes | For Nano Banana 2 reframing, send 1–14 sources and describe the intended change before listing the details to preserve. at least 1 items · at most 14 items |
aspect_ratio | No | Nano Banana 2 has fourteen aspect ratios reaching 8:1 and 1:8, allowing a draft composition to be explored before choosing a larger output tier; framing itself adds no charge. |
resolution | No | Nano Banana 2 offers 0.5k drafts alongside 1k (default), 2k and 4k; 0.5k requires Official fallback and official pricing. |
enable_web_search | No | Use Nano Banana 2 web search for facts such as a date on a poster; image search supplies visual examples of real places or products. Neither is enabled initially. Default: |
enable_image_search | No | Use Nano Banana 2 web search for facts such as a date on a poster; image search supplies visual examples of real places or products. Neither is enabled initially. Default: |
official_fallback | No | Official fallback is on initially for Nano Banana 2, enabling official-price execution when economy processing cannot finish. Default: |
Pricing
Nano Banana 2 pricing follows the chosen output tier, so a 0.5K draft and a 4K final have different image rates, regardless of aspect ratio. Economy completion uses the starting price; Official fallback can use the quoted maximum instead. That maximum is reserved upfront and any unused difference is returned. Official edits add a fee per source, and enabled searches add their quoted charges. A refusal returned as a short text reply instead of an image during official processing is billed as a completed generation at the official price; refusals outside that case carry no charge. For Nano Banana 2 reframing, send 1–14 sources and describe the intended change before listing the details to preserve. Up to 10 images fit economy processing; 11–14 need Official fallback, official pricing and a separate fee for each input.
| Specification | Price |
|---|---|
| $0.036 / image |
| $0.0384 / image (With Official fallback: up to $0.0536) |
| $0.0602 / image (With Official fallback: up to $0.0808) |
| $0.0902 / image (With Official fallback: up to $0.1208) |
Use cases
Banners and panoramas
Website headers, billboards and scroll banners in 4:1 or 8:1, rendered as one continuous scene instead of stretched or stitched.
Fast campaign iteration
Many directions per hour at 0.5k and 1k, then the chosen one again at 2k or 4k.
Fashion and lifestyle editorials
Evening wear, editorial fashion and couple portraits, which rendered in our text-to-image tests.
Prompt guide & pro tips
Draft at 0.5k
The 0.5k tier returns in seconds. It runs only on the official processing option, at the official price, so keep Official fallback on for it; settle the composition there, then run the same prompt at 2k or 4k.
Switch on search for real-world facts
Web search helps with current details such as weather, dates and landmarks; image search helps with real places and products. Each is off by default and may add a charge per request. Requests with search on run on the official processing option at the official price.
Name each reference’s role
In edits, say which source supplies the person, which the setting and which the product. With up to fourteen sources the model needs that map.
Nano Banana 2 API brings Gemini 3.1 Flash Image to fast drafts and reframing jobs, including a 0.5K tier and fourteen aspect ratios. Google now lists this model as deprecated, without an announced shutdown date; existing integrations can still use the size and search controls exposed here.
For Nano Banana 2 reframing, send 1–14 sources and describe the intended change before listing the details to preserve. Up to 10 images fit economy processing; 11–14 need Official fallback, official pricing and a separate fee for each input.
Use Nano Banana 2 web search for facts such as a date on a poster; image search supplies visual examples of real places or products. Neither is enabled initially. Each active search can add the fee in the quote and requires Official fallback at official pricing.
Nano Banana 2 offers 0.5k drafts alongside 1k (default), 2k and 4k; 0.5k requires Official fallback and official pricing.
Nano Banana 2 pricing follows the chosen output tier, so a 0.5K draft and a 4K final have different image rates, regardless of aspect ratio. Economy completion uses the starting price; Official fallback can use the quoted maximum instead. That maximum is reserved upfront and any unused difference is returned. Official edits add a fee per source, and enabled searches add their quoted charges. A text-only refusal counted as a completed generation in our official-execution test and was billed; other refusals are free.
| a written brief | Nano Banana 2 Text to image | | an image to change | Nano Banana 2 Edit |
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "google/nano-banana-2/edit",
"input": {
"aspect_ratio": "auto",
"enable_image_search": false,
"enable_web_search": false,
"image_urls": [
"https://example.com/reference.png"
],
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"resolution": "1k"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.






