Images
Given a prompt and/or an input image, the model will generate a new image.
Create image
Create image edit
Create image variation
ModelsExpand Collapse
Image = object { b64_json, revised_prompt, url } Represents the content or the URL of an image generated by the OpenAI API.
Represents the content or the URL of an image generated by the OpenAI API.
The base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if response_format is set to b64_json for dall-e-2 and dall-e-3.
ImageEditCompletedEvent = object { b64_json, background, created_at, 5 more } Emitted when image editing has completed and the final image is available.
Emitted when image editing has completed and the final image is available.
ImageEditPartialImageEvent = object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.
Emitted when a partial image is available during image editing streaming.
background: "transparent" or "opaque" or "auto"The background setting for the requested edited image.
The background setting for the requested edited image.
ImageEditStreamEvent = ImageEditPartialImageEvent { b64_json, background, created_at, 5 more } or ImageEditCompletedEvent { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.
Emitted when a partial image is available during image editing streaming.
ImageEditPartialImageEvent = object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image editing streaming.
Emitted when a partial image is available during image editing streaming.
background: "transparent" or "opaque" or "auto"The background setting for the requested edited image.
The background setting for the requested edited image.
ImageEditCompletedEvent = object { b64_json, background, created_at, 5 more } Emitted when image editing has completed and the final image is available.
Emitted when image editing has completed and the final image is available.
ImageGenCompletedEvent = object { b64_json, background, created_at, 5 more } Emitted when image generation has completed and the final image is available.
Emitted when image generation has completed and the final image is available.
ImageGenPartialImageEvent = object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.
Emitted when a partial image is available during image generation streaming.
ImageGenStreamEvent = ImageGenPartialImageEvent { b64_json, background, created_at, 5 more } or ImageGenCompletedEvent { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.
Emitted when a partial image is available during image generation streaming.
ImageGenPartialImageEvent = object { b64_json, background, created_at, 5 more } Emitted when a partial image is available during image generation streaming.
Emitted when a partial image is available during image generation streaming.
ImageGenCompletedEvent = object { b64_json, background, created_at, 5 more } Emitted when image generation has completed and the final image is available.
Emitted when image generation has completed and the final image is available.
ImagesResponse = object { created, background, data, 4 more } The response from the image generation endpoint.
The response from the image generation endpoint.
background: optional "transparent" or "opaque"The background parameter used for the image generation. Either transparent or opaque.
The background parameter used for the image generation. Either transparent or opaque.
The list of generated images.
The list of generated images.
The base64-encoded JSON of the generated image. Returned by default for the GPT image models, and only present if response_format is set to b64_json for dall-e-2 and dall-e-3.
output_format: optional "png" or "webp" or "jpeg"The output format of the image generation. Either png, webp, or jpeg.
The output format of the image generation. Either png, webp, or jpeg.
quality: optional "low" or "medium" or "high"The quality of the image generated. Either low, medium, or high.
The quality of the image generated. Either low, medium, or high.
size: optional "1024x1024" or "1024x1536" or "1536x1024"The size of the image generated. Either 1024x1024, 1024x1536, or 1536x1024.
The size of the image generated. Either 1024x1024, 1024x1536, or 1536x1024.