Edit image response based on given prompt.
The authentication header format is Bearer <API_KEY>, where <API_KEY> is your API token.
The picture to be edited. Must be a supported image file or image array. For gpt-image-1, each image should be a png, webp, or jpg file smaller than 25MB. For dall-e-2, you can only provide one image, and it should be a square png file smaller than 4MB.
A text description of the desired image. The maximum length of dall-e-2 is 1000 characters and the maximum length of gpt-image-1 is 32000 characters.
An additional image with fully transparent areas (for example, an alpha value of zero) indicating where the image should be edited. If multiple images are provided, the mask will be applied to the first image. Must be a valid PNG file, smaller than 4MB, and the same size as the image.
The model used to generate the image. Only dall-e-2 and gpt-image-1 are supported. Defaults to dall-e-2 unless parameters specific to gpt-image-1 are used.
The quality of the resulting image. Only gpt-image-1 supports high, medium and low quality. dall-e-2 only supports standard quality. The default is auto.
auto, high, medium, low, standard Returns the format of the generated image. Must be one of url or b64_json. The URL is valid for 60 minutes after the image is generated. This parameter only applies to dall-e-2 since gpt-image-1 always returns a base64 encoded image.
url, b64_json The size of the generated image. Must be one of 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto (default) for gpt-image-1; must be one of 256x256, 512x512, or 1024x1024 for dall-e-2.
auto, 1024x1024, 1536x1024, 1024x1536, 256x256, 512x512