@archastro/sdk
    Preparing search index...

    Interface AIImageResult

    The result returned by an AI image generation or editing operation. Contains the generated image (as inline data or a URL) along with dimension, size, and usage metadata.

    interface AIImageResult {
        aspect_ratio?: string;
        height?: number;
        image_data?: string;
        image_size?: string;
        image_type?: string;
        image_url?: string;
        model: string;
        revised_prompt?: string;
        size?: string;
        usage?: Record<string, unknown>;
        width?: number;
    }
    Index

    Properties

    aspect_ratio?: string

    Aspect ratio of the generated image, e.g. "16:9" or "1:1". null when not reported by the provider.

    height?: number

    Height of the generated image in pixels. null when the provider does not report dimensions.

    image_data?: string

    The generated image encoded as a base64 string. Present when the provider returns inline image data. null when image_url is set instead.

    image_size?: string

    Resolution tier label for the image, e.g. "1K" or "2K". null when the provider does not include a tier label.

    image_type?: string

    MIME type of the generated image, e.g. "image/png" or "image/jpeg". null when the provider does not report a content type.

    image_url?: string

    Temporary URL pointing to the generated image hosted by the provider. Present when the provider returns a URL rather than inline data. null when image_data is set instead.

    model: string

    Identifier of the model that produced the image, e.g. "dall-e-3" or "imagen-3".

    revised_prompt?: string

    The prompt as rewritten by the provider before generation. Some providers (e.g. DALL-E 3) automatically expand or safety-check the original prompt. null when the provider does not revise prompts.

    size?: string

    Canonical size string as returned by the provider, e.g. "1024x1024". null when not reported.

    usage?: Record<string, unknown>

    Provider-reported token and compute usage for the request. Structure varies by provider. null when usage data is unavailable.

    width?: number

    Width of the generated image in pixels. null when the provider does not report dimensions.