gpt-image-2-c-edit
Edit an existing image with gpt-image-2-c, the cost-effective variant of GPT Image 2, using a text prompt. Accepts a multipart/form-data body.
Supports up to 16 input images per request (image[]). Input formats: PNG, JPEG. Images must be provided as multipart/form-data file uploads.
Supports response_format. Does not support the n parameter (one image per request).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Model ID.
gpt-image-2-c "gpt-image-2-c"
Text description of the edit you want to apply.
"Change the background to a sunset over the ocean"
Single source image file to edit (PNG or JPEG). Use image[] instead when providing multiple images.
Multiple source image files (PNG or JPEG). Up to 16 images per request. Use instead of image for multi-image input.
Mask image file with an alpha channel. Indicates which areas of the source image to edit. Must be the same format and same size as the source image (< 50MB). Requires selecting the Direct group.
Output image format. Default: png.
png, jpeg Compression level for jpeg output (0–100).
0 <= x <= 100Output image size in {width}x{height} format. Same flexible-resolution constraints as image generation.
"1024x1024"
Response format. Either url or b64_json.
url, b64_json "url"
Response
Image edited successfully.
Array of edited images.