Nano Banana 2 is Google's new state-of-the-art image generation and editing model
pip install requestsimport 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"])| Parameter | Type | Description |
|---|---|---|
| prompt | string | The prompt for image editing. |
| aspect_ratio | string | The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. |
| enable_web_search | boolean | 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. |
| resolution | string | The resolution of the image to generate. |
| num_images | integer | The number of images to generate. |
| output_format | string | The format of the generated image. |
| thinking_level | string | When set, enables model thinking with the given level ('minimal' or 'high') and includes thoughts in the generation. Omit to disable. |
| sync_mode | boolean | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. |
| safety_tolerance | string | The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. |
| seed | integer | The seed for the random number generator. |
| image_urls | array | The URLs of the images to use for image-to-image generation or image editing. |
| limit_generations | boolean | 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. |
| Field | Type | Description |
|---|---|---|
| images | json | The edited images. |
| description | string | The description of the generated images. |
FLUX.2 [klein] 9B — Edit
black-forest-labs/flux-2-klein-9b/edit
Image-to-image editing with FLUX.2 [klein] 9B from Black Forest Labs. Precise mo...
Reve Edit
reve/edit
Reve's edit model lets you upload an existing image and then transform it via a ...
Wan 2.7 Pro Edit
alibaba/wan/v2.7/pro/edit
Edit and transform images using text instructions with the WAN 2.7 Pro model for...
Nano Banana Pro — Edit
google/nano-banana-pro/edit
Nano Banana Pro is Google's new state-of-the-art image generation and editing mo...
Get API access in minutes. No GPU setup, no infrastructure to manage.