Nano Banana 2 API
Generate images quickly with accurate text and coherent compositions. Suited to rapid iteration, product visuals and campaign assets.
Nano Banana 2 modes
Google · nano-banana-2
Text to image
Generate images quickly with accurate text and coherent compositions. Suited to rapid iteration, product visuals and campaign assets.
Put a prompt and "model": "nano-banana-2" on an image clip, and the render generates it and edits it into the video. To generate it on its own, send the same asset to the generate endpoint.
Built forProduct visuals · Campaign assets · Fast iteration

Technical specifications
| Input | Text prompt |
|---|---|
| Output | Image |
| Resolution | 0.5K, 1K, 2K, 4K |
| Aspect ratios | auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 4:1, 1:4, 8:1, 1:8 |
| Seed | Set a seed for repeatable results |
{
"asset": {
"type": "image",
"prompt": "A speckled stoneware mug of black coffee on a blush-pink backdrop",
"model": "nano-banana-2",
"options": {
"aspectRatio": "4:3",
"resolution": "1K"
}
},
"length": 5
}Google · nano-banana-2-edit
Image to image
Edit images with natural-language instructions and up to 14 references. Suited to product retouching, style changes and combining images.
Put a prompt and "model": "nano-banana-2-edit" on an image clip, and the render generates it and edits it into the video. To generate it on its own, send the same asset to the generate endpoint.
Built forProduct retouching · Style changes · Combining images


Technical specifications
| Input | Text prompt and up to 14 reference images |
|---|---|
| Output | Image |
| Resolution | 0.5K, 1K, 2K, 4K |
| Aspect ratios | auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16, 4:1, 1:4, 8:1, 1:8 |
| Seed | Set a seed for repeatable results |
{
"asset": {
"type": "image",
"prompt": "Change the backdrop to mustard yellow and keep the mug the same",
"model": "nano-banana-2-edit",
"options": {
"imageUrls": [
"https://cdn.shotstack.io/au/v1/generations/35tqpmb0ya/f058f2dc-a092-53ec-be9b-7e918e373889.png"
],
"aspectRatio": "4:3",
"resolution": "1K"
}
},
"length": 5
}Pricing
Generation is paid in credits from the same balance as rendering, at what the model's provider charges plus a small margin. See AI generation pricing.
| Mode | Charged per | Price changes with | Length a quote assumes without one |
|---|---|---|---|
| Text to image | Image | Resolution: 0.5K, 1K (default), 2K, 4K | — |
| Image to image | Image | Resolution: 0.5K, 1K (default), 2K, 4K | — |
Get a quote
POST /generate/quote takes the same body as the generate endpoint and returns what that generation would cost. Nothing is generated, reserved or charged.
curl -X POST \
-H "Content-Type: application/json" \
-H "x-api-key: $SHOTSTACK_API_KEY" \
-d '{
"asset": {
"type": "image",
"prompt": "A speckled stoneware mug of black coffee on a blush-pink backdrop",
"model": "nano-banana-2",
"options": {
"aspectRatio": "4:3",
"resolution": "1K"
}
},
"length": 5
}' \
https://api.shotstack.io/edit/stage/generate/quoteThe response gives credits, the price of that request, and ceiling, which is true when the request has no length for a model charged by length, so the price is an estimate. Prices follow the providers, so ask again rather than storing one.
How it compares
Nano Banana 2 beside the other models in Shotstack that make the same thing.
| Model | Best for | Modes | Max resolution | Aspect ratios | Reference images | Seed | Charged per |
|---|---|---|---|---|---|---|---|
| Nano Banana 2 | Fast iteration, accurate text, product and campaign visuals | Text to image, Image to image | 4K | 14 | Up to 14 | Yes | Image |
| Nano Banana Pro | Complex compositions and precise typography, over speed | Text to image | 4K | 10 | — | Yes | Image |
| GPT Image 2.5 Sunburst | Highly detailed images that follow complex prompts; slower | Text to image, Image to image | 4K | 10 | Up to 16 | — | Image |
| FLUX Schnell | Quick, low-cost drafts and illustrations | Text to image | — | — | — | — | Image, fixed price |