Skip to main content
GPT Image Editing
Edit one or more images with GPT Image using the OpenAI Images editing request format. POST https://api.mixroute.ai/v1/images/edits

Models

Request Parameters

Size Rules

GPT Image 2 resolutions above 3686400 total pixels are experimental. These GPT models return Base64 image data; do not send DALL-E-specific response_format or style.
Use multipart/form-data, not a JSON image URL object. Let cURL or the SDK set the multipart boundary. input_fidelity=auto/medium and a top-level images JSON array are not fields of this OpenAI request.

Examples

Use your MixRoute key in the MIXROUTE_API_KEY environment variable. Requests use Authorization: Bearer .... Replace source-image placeholders with accessible images or local files before editing.

Python

For masked editing, add the mask file. For multiple references, provide additional image files; a mask still applies only to the first.

Response

Read each image from data[].b64_json and decode it using the requested output_format. Streaming returns partial/completed image events; use the final completed event for the final file. GPT Image generation