Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Images

Given a prompt and/or an input image, the model will generate a new image.

Create image variation
ImagesResponse images().createVariation(ImageCreateVariationParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/images/variations
Create image edit
ImagesResponse images().edit(ImageEditParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/images/edits
Create image
ImagesResponse images().generate(ImageGenerateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/images/generations
ModelsExpand Collapse
class Image:

Represents the content or the URL of an image generated by the OpenAI API.

class ImageEditCompletedEvent:

Emitted when image editing has completed and the final image is available.

class ImageEditPartialImageEvent:

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.

class ImageGenCompletedEvent:

Emitted when image generation has completed and the final image is available.

class ImageGenPartialImageEvent:

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.

enum ImageModel:
class ImagesResponse:

The response from the image generation endpoint.