openai_generate_image
Generate images from text prompts using OpenAI's API and save them locally to assets/images. Specify size, quality, and number of images as needed.
Instructions
Generate image(s) with OpenAI's Images API and save them to assets/images.
Args: prompt: Text description of the image to generate. size: WIDTHxHEIGHT (e.g. "1024x1024", "1536x1024"). gpt-image-2 supports arbitrary sizes with width/height divisible by 16. quality: "low", "medium", or "high". n: Number of images (1-10 for gpt-image-2). model: Override the model id (default from OPENAI_IMAGE_MODEL / gpt-image-2). filename: Optional base filename (without extension) for a single image.
Returns: A human-readable summary listing the saved file path(s).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| size | No | 1024x1024 | |
| model | No | ||
| prompt | Yes | ||
| quality | No | high | |
| filename | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |