Image edits
POST /v1/images/edits
Request fields
Send model, prompt and at least one reference. GPT Image 2.5 accepts one; for 2.6, check the limit for the selected size in authenticated GET /v1/models. Use 1K auto/1k with no quality field on either version. GPT Image 2.6 also accepts 3840x2160/4k with quality omitted or max. Set n: 1. See the Images guide for permitted JSON and multipart inputs.
Edit a local image
Place input.png in your working directory. These 2.6 examples base64-encode the original PNG into a JSON image data URL in cURL, Python and JavaScript. The same JSON shape works with either 2.5 model. For a WebP reference, use image/webp and read the .webp file instead.
IMAGE_BASE64="$(base64 < input.png | tr -d '\r\n')"
curl "https://api.quanteex.com/v1/images/edits" \
-H "Authorization: Bearer $QUANTEEX_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<JSON
{
"model": "gpt-image-2.6-sunburst",
"prompt": "Turn the sky into a watercolor sunset; preserve the buildings",
"size": "auto",
"n": 1,
"images": [
{
"image_url": "data:image/png;base64,$IMAGE_BASE64"
}
]
}
JSONEdit a masked region with 2.5
Only the 2.5 models accept a PNG mask. Match its dimensions to the reference; transparent pixels mark the region to edit. The mask is separate from the single reference. Place input.png and mask.png in your working directory. Do not send this multipart/mask request to a 2.6 model.
curl "https://api.quanteex.com/v1/images/edits" \
-H "Authorization: Bearer $QUANTEEX_API_KEY" \
-F 'model=gpt-image-2.5-sunburst' \
-F 'prompt=Change only the masked region into a flower' \
-F 'size=auto' -F 'n=1' \
-F 'image=@input.png;type=image/png' \
-F 'mask=@mask.png;type=image/png'JSON image references
GPT Image 2.5 accepts one reference per edit or variation. For GPT Image 2.6, check authenticated GET /v1/models for the limit at your chosen size. In JSON, send an images array of {image_url: "data:image/png;base64,..."} objects (PNG/WebP verified). Multipart image or image[] is available on 2.5 and on 2.6 at 3840x2160/4k. Use n: 1. An optional PNG mask is only available on 2.5; match the reference dimensions. File IDs are unavailable.
Result and streaming
Normal responses use data[0].b64_json. For stream: true, wait for image_edit.completed and decode its b64_json. Edits currently deliver only the final image event; progressive previews are unavailable.



