Generate Image
generate_imageGenerate a custom image from your text prompt using Gemini. Save it to any file path and select your preferred aspect ratio from ten options.
Instructions
Generate an image from a text prompt using Gemini. The image is saved to the specified file path and also returned inline. Supports various aspect ratios.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Gemini model name for image generation. Default: gemini-3-pro-image-preview. Example: gemini-2.5-flash-image | |
| prompt | Yes | Text prompt for image generation. English recommended. More specific and detailed prompts yield better results. | |
| output_path | Yes | File path to save the generated image (.png). Example: C:/Users/palan/Pictures/output.png | |
| aspect_ratio | No | Aspect ratio of the output image. Default: 1:1. | 1:1 |