---
title: "Nano Banana 2"
method: POST
path: "/v2/generation/nano-banana-2"
tags: ["Image Generation"]
---

# Nano Banana 2

`POST /v2/generation/nano-banana-2`

Image Generation/Edit using Nano Banana 2, 2K or 4K

## Query parameters

- `webhookUrl` string — Your Webhook URL, if specified, the result of the generation will be POSTed to this URL.
- `demoMode` 'failure' | 'success' — This parameter is used when the api key mode is 'development', default value is 'success'. when set to 'failure', the dummy generation will be 'failed' after a few seconds, if set to 'success', the dummy generation will be 'completed' after a few seconds.

## Request body

- object
  - `prompt` string, required
  - `quality` '2K' | '4K', required
  - `images` string[] — An array of image names or download URLs - if you don't have a download URL, you can upload the file and get the file name from the /upload endpoint.
  - `aspectRatio` 'auto' | '21:9' | '1:1' | '4:3' | '3:2' | '2:3' | '5:4' | '4:5' | '3:4' | '16:9' | '9:16', required — When no input image provided, aspect ratio cannot be auto

## Response `200`

Response for status 200

- object
  - `genId` string, required

## Other responses

- `400` — Response for status 400
- `401` — Response for status 401
- `403` — Response for status 403
- `500` — Response for status 500

## Changes

- **2026-09-08** `2e066072b0aa` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/radinai/apis/api/changes/v2/generation/nano-banana-2/post.md)

---

[API](https://skmtc.dev/radinai/apis/api.md) · [All operations](https://skmtc.dev/radinai/apis/api/llms.txt) · [OpenAPI document](https://skmtc.dev/radinai/apis/api/revisions/4555b7f121b7?raw)
