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

interface ImageGenPartialImageEvent {
    b64_json: string;
    background: "auto" | "transparent" | "opaque";
    created_at: number;
    output_format: "jpeg" | "png" | "webp";
    partial_image_index: number;
    quality:
        | "low"
        | "medium"
        | "high"
        | "auto";
    size:
        | "auto"
        | "1024x1024"
        | "1536x1024"
        | "1024x1536";
    type: "image_generation.partial_image";
}

Properties

b64_json: string

Base64-encoded partial image data, suitable for rendering as an image.

background: "auto" | "transparent" | "opaque"

The background setting for the requested image.

created_at: number

The Unix timestamp when the event was created.

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

The output format for the requested image.

partial_image_index: number

0-based index for the partial image (streaming).

quality:
    | "low"
    | "medium"
    | "high"
    | "auto"

The quality setting for the requested image.

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

The size of the requested image.

type: "image_generation.partial_image"

The type of the event. Always image_generation.partial_image.