Native OpenAI Format
Edit Image
- Create an edited or extended image from a source image and prompt.
POST
Authorizations
string
required
All endpoints require Bearer Token authentication.Add it to the request headers:
Body
file
required
Image to edit. Must be a valid PNG file, under 4 MB, and square. If no mask is provided, the image must include transparency, which will be used as the mask.Example:
cmMtdXBsb2FkLTE2ODc4MzMzNDc3NTEtMjA=/31225951_59371037e9_small.pngfile
Additional image whose fully transparent areas (for example, areas with alpha zero) indicate where the image should be edited. Must be a valid PNG file, under 4 MB, and the same dimensions as the original image.Example: “
string
required
Text description of the desired image. Maximum length: 1000 characters.Example:
A cute baby sea otter wearing a beret.string
Number of images to generate. Must be between 1 and 10.Example:
1string
Size of the generated image. Must be one of
256x256, 512x512, or 1024x1024.Example: 1024x1024string
Format returned for the generated image. Must be
url or b64_json.Example: urlstring
A unique identifier for your end user, which can help OpenAI monitor and detect abuse. Learn more.Example: “
string
default:"gpt-image-1.5"
Example:
gpt-image-1.5