generate_image
Generate and save images at exact pixel sizes using Google Flow's Nano Banana model, with support for multiple variants, formats, and reference images for iterative editing.
Instructions
Generate one or more images with Google Flow and save them to disk. You can ask for an exact pixel size (e.g. 1200x630): it generates at the closest native aspect ratio and crops to the size you asked for. Images cost no credits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | How to fit into `size`: "cover" crops to fill, "contain" fits everything and pads the edges. | cover |
| size | No | Exact output size, "WIDTHxHEIGHT" format, e.g. "1200x630". Omit to use the native size. | |
| count | No | How many variants to generate (1 to 4). | |
| aspect | No | Native aspect ratio. If omitted and `size` is given, the closest one is chosen. | |
| format | No | Output format. | jpg |
| prompt | Yes | Image description. In any language. | |
| out_dir | No | Destination folder. Defaults to FLOW_OUTPUT_DIR. | |
| basename | No | Base filename. Derived from the prompt by default. | |
| background | No | Padding color for fit="contain", as a CSS color ("#0f172a", "black"). White by default. | |
| reference_images | No | Local paths to images to use as references. Flow starts from them instead of from scratch, so the prompt describes what to change rather than what to create. Useful for versioning a logo, iterating on a previous result, or holding a style across pieces. | |
| reference_library_names | No | Filenames ALREADY in the project library, to attach without uploading them again. Use this when iterating on the same reference: re-uploading the same file only leaves duplicate rows in the library and makes each generation slower. |