Skip to main content
Endpoint: POST https://fal.run/fal-ai/nano-banana Endpoint ID: fal-ai/nano-banana

Try it in the Playground

Run this model interactively with your own prompts.

Quick Start

import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/nano-banana",
    arguments={
        "prompt": "An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater."
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

Input Schema

prompt
string
required
The text prompt to generate an image from.
num_images
integer
default:"1"
The number of images to generate. Default value: 1Range: 1 to 4
seed
integer
The seed for the random number generator.
aspect_ratio
AspectRatioEnum
default:"1:1"
The aspect ratio of the generated image. Default value: "1:1"Possible values: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16
output_format
OutputFormatEnum
default:"png"
The format of the generated image. Default value: "png"Possible values: jpeg, png, webp
safety_tolerance
SafetyToleranceEnum
default:"4"
The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. Default value: "4"Possible values: 1, 2, 3, 4, 5, 6
sync_mode
boolean
default:"false"
If True, the media will be returned as a data URI and the output data won’t be available in the request history.
limit_generations
boolean
default:"false"
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.

Output Schema

images
list<ImageFile>
required
The generated images.
description
string
required
The description of the generated images.

Input Example

{
  "prompt": "An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater.",
  "num_images": 1,
  "aspect_ratio": "1:1",
  "output_format": "png",
  "safety_tolerance": "4",
  "sync_mode": false,
  "limit_generations": false
}

Output Example

{
  "images": [
    {
      "content_type": "image/png",
      "file_name": "nano-banana-t2i-output.png",
      "url": "https://storage.googleapis.com/falserverless/example_outputs/nano-banana-t2i-output.png"
    }
  ],
  "description": ""
}

Limitations

  • num_images range: 1 to 4
  • output_format restricted to: jpeg, png, webp
  • safety_tolerance restricted to: 1, 2, 3, 4, 5, 6