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
class Image: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.
class ImageEditCompletedEvent:Emitted when image editing has completed and the final image is available.
Emitted when image editing has completed and the final image is available.
The type of the event. Always image_edit.completed.
class ImageEditPartialImageEvent:Emitted when a partial image is available during image editing streaming.
Emitted when a partial image is available during image editing streaming.
class ImageEditStreamEvent: A class that can be one of several variants.union Emitted when a partial image is available during image editing streaming.
Emitted when a partial image is available during image editing streaming.
class ImageEditPartialImageEvent:Emitted when a partial image is available during image editing streaming.
Emitted when a partial image is available during image editing streaming.
class ImageEditCompletedEvent:Emitted when image editing has completed and the final image is available.
Emitted when image editing has completed and the final image is available.
The type of the event. Always image_edit.completed.
class ImageGenCompletedEvent:Emitted when image generation has completed and the final image is available.
Emitted when image generation has completed and the final image is available.
The type of the event. Always image_generation.completed.
class ImageGenPartialImageEvent:Emitted when a partial image is available during image generation streaming.
Emitted when a partial image is available during image generation streaming.
class ImageGenStreamEvent: A class that can be one of several variants.union Emitted when a partial image is available during image generation streaming.
Emitted when a partial image is available during image generation streaming.
class ImageGenPartialImageEvent:Emitted when a partial image is available during image generation streaming.
Emitted when a partial image is available during image generation streaming.
class ImageGenCompletedEvent:Emitted when image generation has completed and the final image is available.
Emitted when image generation has completed and the final image is available.
The type of the event. Always image_generation.completed.
class ImagesResponse:The response from the image generation endpoint.
The response from the image generation endpoint.
Optional<Background> backgroundThe 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.
Optional<OutputFormat> outputFormatThe output format of the image generation. Either png, webp, or jpeg.
The output format of the image generation. Either png, webp, or jpeg.