generate_image
Creates images from detailed text prompts using Gemini 3.1 Flash via OpenRouter, saving files locally and returning the absolute path and metadata for coding workflows.
Instructions
Generates an image from a detailed text prompt using the Gemini 3.1 Flash Image model via OpenRouter. Saves the image locally and returns the absolute path and metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | OpenRouter model to use. Default: 'google/gemini-3.1-flash-image'. | |
| prompt | Yes | Detailed description of the image to create (subject, setting, style, lighting, composition). | |
| output_path | No | Local path (relative or absolute) where the generated image file should be saved (e.g., './assets/hero.png'). If omitted, automatically saves to the default folder. | |
| aspect_ratio | No | Aspect ratio of the generated image. Default: '1:1'. | |
| output_format | No | Format of the saved image file. Default: 'png'. |