generate_image
Create an image from a text prompt using gpt-image-2, with optional reference images to guide the output.
Instructions
Generate one image with gpt-image-2, optionally guided by reference images.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Output size, for example 1536x1024. | 1024x1024 |
| model | No | Model name; only gpt-image-2 is supported. | |
| prompt | Yes | Image description. | |
| api_key | No | Per-call API key; OPENAI_API_KEY is preferred. | |
| quality | No | auto | |
| base_url | No | OpenAI-compatible base URL ending in /v1. | |
| output_path | No | Optional local path to save the generated image. Relative paths resolve from the MCP working directory. Existing files are not overwritten. | |
| output_format | No | png | |
| reference_images | No | Optional reference images as absolute local paths or HTTP(S) URLs. |