generate_image
Create custom images from text descriptions for development workflows. Specify prompts, models, and aspect ratios to generate PNG files stored locally.
Instructions
Generate an image synchronously. Blocks until the file is on disk.
Typical latency is under 10 seconds. The PNG is written to the configured OUTPUT_DIR and the absolute path is returned.
Args: prompt: Text description of the image to generate. model: "nano-banana" (Gemini 2.5 Flash Image, the default — cheapest and fastest) or "imagen" (Imagen 4, higher quality, higher cost). aspect_ratio: "1:1", "16:9", "9:16", "4:3", or "3:4". negative_prompt: Optional text describing what to avoid. Ignored by Nano Banana; used by Imagen 4 when supplied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| model | No | nano-banana | |
| aspect_ratio | No | 16:9 | |
| negative_prompt | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||