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
client.Images.NewVariation(ctx, body) (*ImagesResponse, error)
POST/images/variations
Create image edit
client.Images.Edit(ctx, body) (*ImagesResponse, error)
POST/images/edits
Create image
client.Images.Generate(ctx, body) (*ImagesResponse, error)
POST/images/generations
ModelsExpand Collapse
type Image struct{…}

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

type ImageEditCompletedEvent struct{…}

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

type ImageEditPartialImageEvent struct{…}

Emitted when a partial image is available during image editing streaming.

type ImageEditStreamEventUnion interface{…}

Emitted when a partial image is available during image editing streaming.

type ImageGenCompletedEvent struct{…}

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

type ImageGenPartialImageEvent struct{…}

Emitted when a partial image is available during image generation streaming.

type ImageGenStreamEventUnion interface{…}

Emitted when a partial image is available during image generation streaming.

type ImageModel string
type ImagesResponse struct{…}

The response from the image generation endpoint.