Generate Image
generate_imageCreate images from text prompts using cloud AI models. Saves each image to disk and returns the file path with a preview.
Instructions
Generate one or more images from a text prompt using a cloud AI model. Every image is saved to disk and its absolute path is returned, along with a small inline preview. Use edit_image instead when starting from an existing image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of variations to generate (1-4, parallel requests, billed per image). | |
| model | No | Model slug, e.g. 'google/gemini-2.5-flash-image' or 'openai/gpt-5-image'. Omit to use the configured default. Call list_models to see options. | |
| prompt | Yes | Detailed description of the desired result. Be specific about subject, style, lighting, composition. | |
| output_dir | No | Directory to save into (absolute, or ~ for home). Defaults to the configured output directory. | |
| aspect_ratio | No | Desired aspect ratio. Support varies by model; treated as a strong hint. | |
| filename_prefix | No | Short label used in the saved filename, e.g. 'hero-banner'. Sanitized to letters, digits, dashes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| failed | Yes | Error messages for variations that failed | |
| images | Yes |