Nano Banana 2

google/nano-banana-2-image-to-image

post

Nano Banana 2 is Google's new state-of-the-art image generation and editing model

Header parameters
AuthorizationstringRequiredExample: sk-Yf4DNVY
Body
modelstringRequired

model is the model name

Example: google/nano-banana-2-image-to-image
promptstringRequired

The text prompt to generate an image from.

Example: A cute baby sea otter.
seedintegerOptional

The seed for the random number generator.

aspect_ratiostring · enumOptional

The aspect ratio of the generated image. Default value: auto

Possible enum values: auto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16

Default: autoExample: autoPossible values:
safety_tolerancestringOptional

The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. Default value: "4"

Possible enum values: 1, 2, 3, 4, 5, 6

Default: 4Example: 4
image_urlsstring[]Required

The URLs of the images to use for image-to-image generation or image editing.

resolutionstringOptional

The resolution of the image to generate. Default value: "1K"

Possible enum values: 0.5K, 1K, 2K, 4K

Default: 1KExample: 1K
limit_generationsbooleanOptional

Experimental parameter to limit the number of generations from each round of prompting to 1. Set to True to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. Default value: true

Default: true
enable_web_searchbooleanOptional

Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image.

ninteger · enumOptional

The number of images to generate. Default value: 1

Default: 1Example: 1Possible values:
output_formatstring · enumOptional

output_format indicate the output format, default value is url.

Default: urlExample: urlPossible values:
Responses
chevron-right
200Success
application/json
createdintegerRequired
post
/v1/images/edits
200Success

Last updated