Image models
Nano Banana 2
On this page
Nano Banana 2 — fast, high-fidelity AI image generation & editing.
| modelId | nano-banana-2 |
| Modality | image |
| Pricing | See this model on the Pricing page for the current per-call price (with your markup). |
Operations
| Operation | modelId | Endpoint | Required input |
|---|---|---|---|
| Default | nano-banana-2 | POST /api/v1/generate | prompt |
| Poll task | — | GET /api/v1/task/{id}?model=nano-banana-2 | — |
Input parameters
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | string | Yes | A text description of the image you want to generate Max 20000 characters. (default: Turn this idea into a clean infographic: the water cycle in four labeled steps, minimalist icons, soft palette.) |
| image_input | string[] | No | Input images to transform or use as reference (supports up to 14 images) (image URL) |
| aspect_ratio | string | No | Aspect ratio of the generated image (options: 1:1 | 1:4 | 1:8 | 2:3 | 3:2 | 3:4 | 4:1 | 4:3 | 4:5 | 5:4 | 8:1 | 9:16 | 16:9 | 21:9 | auto) (default: auto) |
| resolution | string | No | Resolution of the generated image. Higher resolutions take longer to generate. (options: 1K | 2K | 4K) (default: 1K) |
Example request
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"nano-banana-2","input":{"prompt":"A photorealistic portrait of a red fox in a snowy forest, soft morning light, shallow depth of field, 85mm.","image_input":["https://example.com/input.jpg"],"aspect_ratio":"auto","resolution":"1K"}}'