Image Edit
GPT Image 2
GPT Image 2 Image Edit
Edit images using a text prompt and optional mask with GPT Image 2.
POST
Image Edit
Documentation Index
Fetch the complete documentation index at: https://mulerouter.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Edit existing images using a text prompt with GPT Image 2. Pass one or more input images (URL or Base64) and an optional mask to constrain the edit region. Supports up to 4K output and batch generation of 1–4 edited images per request.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Text prompt describing the desired edit.
Minimum string length:
1Input images to edit. Each item is a URL or Base64-encoded string.
Minimum array length:
1Output image resolution.
Available options:
1024x1024, 1536x1024, 1024x1536, 2048x2048, 2048x1152, 3840x2160, 2160x3840, auto Number of edited images to generate.
Required range:
1 <= x <= 4Optional mask image (URL or Base64-encoded) to specify the edit region.
Output image format.
Available options:
png, jpeg, webp Response
202 - application/json
Accepted - Task created successfully

