Edit an image
Edit images with the OpenAI Images Edits API.
Create an edited result from one or more input images and a text prompt. You can also provide a mask to identify the area to change.
/v1/images/editsCreate an edited image based on one or more input images and text prompts. When providing a mask, the transparent area in the mask indicates where editing is needed; When editing multiple images, the mask is applied to the first input image.
The input file type, size, quantity, mask rules, as well as quality and size options depend on the selected model. Please use the model ID visible and supported by the current API Key for image editing
Authorization
bearerAuth Use Bearer your-api-key in the Authorization Header.
In: header
Request Body
multipart/form-data
Use Multipart to submit images, prompts, and optional masks. The client should automatically generate the boundary of the Content-Type from the request library.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json