generate_image
Generate images from text prompts using Imagen or Nano Banana models. Save the result to a specified file path.
Instructions
Generates an image using Imagen or Nano Banana (Gemini image) models.
Args: prompt: Text description of the image to generate. output_path: File path to save the generated image. model: Model alias or ID. "imagen" (default, ultra), "imagen-fast", "nano-pro", or "nano-flash". aspect_ratio: Aspect ratio (e.g. "1:1", "16:9", "9:16", "4:3", "3:4"). image_size: Output size for Nano Banana only (e.g. "1024x1024"). Not supported by Imagen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of the image to generate | |
| output_path | Yes | File path to save the generated image | |
| model | No | "imagen" (default, ultra), "imagen-fast", "nano-pro", or "nano-flash" | imagen |
| aspect_ratio | No | Aspect ratio (e.g. "1:1", "16:9", "9:16", "4:3", "3:4") | |
| image_size | No | Output size for Nano Banana only (e.g. "1024x1024"). Not supported by Imagen |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |