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 { 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.
ImageEditCompletedEvent { 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.
usage: Usage { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.
For the GPT image models only, the token usage information for the image generation.
ImageEditPartialImageEvent { 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.
ImageEditStreamEvent = ImageEditPartialImageEvent { b64_json, background, created_at, 5 more } | 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 { 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.
ImageEditCompletedEvent { 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.
usage: Usage { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.
For the GPT image models only, the token usage information for the image generation.
ImageGenCompletedEvent { 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.
usage: Usage { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.
For the GPT image models only, the token usage information for the image generation.
ImageGenPartialImageEvent { 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 } | 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 { 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 { 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.
usage: Usage { input_tokens, input_tokens_details, output_tokens, total_tokens } For the GPT image models only, the token usage information for the image generation.
For the GPT image models only, the token usage information for the image generation.
ImagesResponse { created, background, data, 4 more } The response from the image generation endpoint.
The response from the image generation endpoint.
background?: "transparent" | "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.
output_format?: "png" | "webp" | "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.
size?: "1024x1024" | "1024x1536" | "1536x1024"The size of the image generated. Either 1024x1024, 1024x1536, or 1536x1024.
The size of the image generated. Either 1024x1024, 1024x1536, or 1536x1024.