The response from the image generation endpoint.

interface ImagesResponse {
    background?: "transparent" | "opaque";
    created: number;
    data?: OpenAIClient.Images.Image[];
    output_format?: "jpeg" | "png" | "webp";
    quality?: "low" | "medium" | "high";
    size?: "1024x1024" | "1536x1024" | "1024x1536";
    usage?: OpenAIClient.Images.ImagesResponse.Usage;
}

Properties

background?: "transparent" | "opaque"

The background parameter used for the image generation. Either transparent or opaque.

created: number

The Unix timestamp (in seconds) of when the image was created.

The list of generated images.

output_format?: "jpeg" | "png" | "webp"

The output format of the image generation. Either png, webp, or jpeg.

quality?: "low" | "medium" | "high"

The quality of the image generated. Either low, medium, or high.

size?: "1024x1024" | "1536x1024" | "1024x1536"

The size of the image generated. Either 1024x1024, 1024x1536, or 1536x1024.

For gpt-image-1 only, the token usage information for the image generation.