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 | Endpoint | Description |
|---|---|---|
| Text to image | POST /api/v1/generate | Base generation from a text prompt. |
| Image to image | POST /api/v1/generate | Condition on a reference image — upload it via /api/v1/files/upload and pass the URL. |
| Poll task | GET /api/v1/task/{id}?model=nano-banana-2 | Retrieve state and result URLs. |
Input parameters
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | textarea | required | Enter a text description of the image you want to generate |
| image_input | image | optional | Drag and drop or click to upload your images |
| aspect_ratio | select | optional | 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 |
| resolution | select | optional | 1K, 2K, 4K |
| output_format | select | optional | jpg, png |
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":"Turn this idea into a clean infographic: the water cycle in four labeled steps, minimalist icons, soft palette.","aspect_ratio":"auto","resolution":"1K","output_format":"jpg"}}'