edit image
Given a hint, the model will return one or more predicted completions and can also return the probability of the surrogate marker for each position. Complete creation for the provided prompts and parameters Official…
/v1/images/editsBody Parametersmultipart/form-data
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 for dall-e-2 is 1000 characters and for gpt-image-1 is 32000 characters.
An additional image whose fully transparent areas (for example, with an alpha value of zero) indicate 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 image.
The model to use for image generation. Only dall-e-2 and gpt-image-1 are supported. Defaults to dall-e-2 unless gpt-image-1-specific parameters are used.
The number of images to generate. Must be between 1 and 10.
The quality of the image that will be generated. Only gpt-image-1 supports high, medium, and low. dall-e-2 only supports standard. Defaults to auto.
The format in which the generated images are returned. Must be one of url or b64_json. URLs are valid for 60 minutes after generation. This parameter is only supported for dall-e-2; gpt-image-1 always returns base64-encoded images.
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.
Responses
List of candidate results
Creation time (Unix timestamp)
Resource or task ID
Object type identifier, e.g. chat.completion
Token usage statistics
