Introduction
Nano Banana 2 Edit runs Google's Gemini 3.1 Flash Image on images you already have. It accepts one to fourteen sources, keeps the source shape or reframes to one of fourteen shapes, and renders at 0.5k, 1k, 2k or 4k.
Choose a mode by starting material
| What you have | Mode |
|---|---|
| a written brief | Nano Banana 2 Text to image |
| an image to change | Nano Banana 2 Edit |
Key features & highlights
Up to fourteen references
Combine people, outfits, settings and products from up to fourteen images, each described by its role in the prompt. The economy route takes up to ten; with more, the edit runs on the official route, where each source adds a small fixed charge, so pass only the ones the edit needs.
Reframe while editing
Aspect ratio auto keeps the source shape; any of fourteen shapes reframes the result, as in our example where a 4:1 banner became a 16:9 night scene.
Fast at every size
The same tiers as text to image, from 0.5k drafts to 4k finals, with the price set by the tier; on the official route each source adds a small charge.
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 | 1 to 14 source images. Say in the prompt what each one contributes: the person, the setting, the product. at least 1 items · at most 14 items |
aspect_ratio | No | auto (default) keeps the shape of the source image; or pick one of fourteen shapes, including the extreme banners 4:1, 1:4, 8:1 and 1:8. The shape does not change the price. |
resolution | No | 0.5k, 1k (default), 2k or 4k. A square frame is 512, 1024, 2048 or 4096 pixels across; each tier has its own price. |
enable_web_search | No | Off by default. When on, the model looks up current facts such as weather, dates or landmarks before drawing. Default: |
enable_image_search | No | Off by default. When on, the model looks up reference pictures on the web before drawing, useful for real places and products. Default: |
official_fallback | No | On by default. Each edit runs on the economy route first. Default: |
Pricing
Billed per image by size tier. Each edit starts on the economy route at the economy price, with no charge per source image. With Official fallback on, the default, an edit the economy route refuses or cannot complete, or one with more than 10 source images, runs on the official route at the official price, which also adds a small fixed charge for each source image; turn it off to pay only the economy price. Edits at 0.5k or with web search or image search run on the official route, and each search adds a charge. The quote shows the starting price and the most the edit can cost. On the official route, a refusal that comes back as a short text reply instead of an image counts as a completed generation and is billed at the official price; other refusals are not charged.
| 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
Relocation and time-of-day changes
Move a person to a new place or turn day into night for a campaign, keeping the face, the outfit and the pose.
Reformatting finished images
Turn a wide banner into a 16:9 or 9:16 version with new content at the edges instead of a simple crop.
Styled product groups
Arrange several product shots into one styled scene, naming each product and where it should sit.
Prompt guide & pro tips
List what must stay
Name the face, hair, outfit and pose you want kept after describing the change; the model respects a written list.
Describe the new frame when reframing
When the shape changes, say what the added space should hold: more sky, another table, the rest of the street.
Keep search for real references
Switch on image search only when the edit depends on a real place or product the model needs to see.
Draft edits at 0.5k
Test the instruction at 0.5k first; if the change reads correctly, run the same request at 2k or 4k.
Match the tier to the source
An edit cannot add detail the source never had; 2k is usually enough unless the source itself is large.
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.





