Skip to main content
POST
Nano Banana 2

Authorizations

x-api-key
string
header
required

Query Parameters

webhookUrl
string

Your Webhook URL, if specified, the result of the generation will be POSTed to this URL.

Body

application/json
prompt
string
required
Required string length: 10 - 5000
Example:

"<your-prompt>"

quality
enum<string>
required
Available options:
2K,
4K
aspectRatio
enum<string>
required

When no input image provided, aspect ratio cannot be auto

Available options:
auto,
21:9,
1:1,
4:3,
3:2,
2:3,
5:4,
4:5,
3:4,
16:9,
9:16
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.

Maximum array length: 14
Minimum string length: 1

Response

Response for status 200

genId
string
required
Last modified on August 2, 2026