import fal_clientdef 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)
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
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.
{ "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}
import fal_clientdef 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/edit", arguments={ "prompt": "make a photo of the man driving the car down the california coastline", "image_urls": [ "https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png", "https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png" ] }, with_logs=True, on_queue_update=on_queue_update,)print(result)
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
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.
{ "prompt": "make a photo of the man driving the car down the california coastline", "num_images": 1, "aspect_ratio": "auto", "output_format": "png", "safety_tolerance": "4", "sync_mode": false, "image_urls": [ "https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png", "https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png" ], "limit_generations": false}