generate_image
Creates a PNG image using a detailed prompt, writes it to disk, and returns the file path. Supports custom dimensions up to 1024x1024 pixels.
Instructions
Generate a PNG image with gpt-image-2 on Azure AI Foundry. The image is written to disk and the tool returns its path; it is not returned inline. Use a detailed prompt covering subject, style, composition, lighting and colors. Each side must be at least 768 pixels and width x height must not exceed 1048576 pixels, so 1024x1024, 768x1024 and 1024x768 are valid but 1024x1536 is not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Image width in pixels. Default 1024. | |
| height | No | Image height in pixels. Default 1024. | |
| prompt | Yes | Description of the image to generate. | |
| output_path | No | Where to write the PNG. Must end in .png. Relative paths resolve against the current working directory. Defaults to a timestamped file in the output directory. |