GPT Image 2 Image Edit
Images
GPT Image 2 Image Edit
POST
GPT Image 2 Image Edit
OpenAI GPT Image 2 image editing API. Edit images based on text prompts, with support for mask inpainting, transparent backgrounds, and multiple quality/size options.
Request Headers
Enum value:
application/jsonBearer authentication format: Bearer {{API Key}}.
Request Body
Number of images to generate. The actual number returned may be less than the requested number.Valid range: [1, 10]
Additional image whose fully transparent areas indicate where edits should be made. Must be in PNG format with an alpha channel.
Size of the generated image.Allowed values:
auto, 688x2048, 880x2048, 1024x1024, 1024x1536, 1024x2048, 1152x2048, 1360x2048, 1536x1024, 1536x2048, 2048x688, 2048x880, 2048x1024, 2048x1152, 2048x1360, 2048x1536, 2048x2048, 2160x3840, 3840x2160Image to edit. Can be a single image URL/base64 or an array of images. Supported formats: PNG, JPEG, GIF, WebP.
Text prompt describing the desired edit, with a maximum length of 32000 characters.Length limit: 0 - 32000
Quality of the generated image. Higher quality takes longer and costs more.Allowed values:
low, medium, highWhether the background is opaque or automatically detected.Allowed values:
opaque, autoOutput image format.Allowed values:
png, jpegResponse Information
Array of generated image URLs.