Edit image
edit_image_fileEdit images using multipart file uploads, JSON URLs, or image arrays. Specify a model and prompt to modify images with parameters for size, quality, and format.
Instructions
Edit image Edits an image using multipart image uploads, JSON image URLs, or the official JSON images array for supported GPT Image models.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| mask | No | Pass local file path. | |
| size | No | ||
| user | No | ||
| async | No | ||
| image | No | Source image file(s). Repeat image for multiple source images. GPT Image edits accept up to 16 images; xAI Grok Imagine edit models accept at most 3 source images. Pass local file paths. | |
| model | Yes | Model to use for image edits. Send this explicitly, for example gpt-image-2. | |
| prompt | Yes | ||
| stream | No | Image streaming is not exposed through MCP tool calls; omit stream or set it to false. | |
| image[] | No | Alternative repeated multipart field name for multiple source images. The same model-specific limits apply: GPT Image up to 16, xAI Grok Imagine up to 3. Pass local file paths. | |
| quality | No | ||
| background | No | ||
| moderation | No | ||
| resolution | No | ||
| compression | No | ||
| aspect_ratio | No | ||
| output_format | No | ||
| response_format | No | ||
| output_compression | No |