Runflow
Back to Gallery

google/nano-banana-2/edit

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

$0.08/image 2026-04-06

Install

pip install requests

Run the model

import requests

response = requests.post(
    "https://api.runflow.io/v1/run/nano-banana-2/edit",
    headers={"Authorization": "Bearer RUNFLOW_API_KEY"},
    json={
    "prompt": "Transform this stained glass window into a massive underwater aquarium...",
    "image_urls": [
        "https://public.runflow.io/images/models/google/nano-banana-pro/example-output-0.webp"
    ]
    },
)

data = response.json()
print(data["images"][0]["url"])

Input schema

ParameterTypeDescription
promptstringThe prompt for image editing.
aspect_ratiostringThe aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8.
enable_web_searchbooleanEnable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image.
resolutionstringThe resolution of the image to generate.
num_imagesintegerThe number of images to generate.
output_formatstringThe format of the generated image.
thinking_levelstringWhen set, enables model thinking with the given level ('minimal' or 'high') and includes thoughts in the generation. Omit to disable.
sync_modebooleanIf `True`, the media will be returned as a data URI and the output data won't be available in the request history.
safety_tolerancestringThe safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict.
seedintegerThe seed for the random number generator.
image_urlsarrayThe URLs of the images to use for image-to-image generation or image editing.
limit_generationsbooleanExperimental 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.

Output schema

FieldTypeDescription
imagesjsonThe edited images.
descriptionstringThe description of the generated images.

Related models

Start generating with Nano Banana 2 — Edit

Get API access in minutes. No GPU setup, no infrastructure to manage.