Member Junction
    Preparing search index...

    Class ImageGenerationParams

    Parameters for text-to-image generation

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    aspectRatio?: string

    Aspect ratio as an alternative to explicit size. Format: "width:height" e.g., "16:9", "1:1", "9:16"

    CancellationToken?: AbortSignal

    Optional signal for cancelling the request. The driver is responsible for honoring it: it should refuse the call when the signal is already aborted and hand it to the provider's HTTP client, so an abort tears the request down. A call the signal ends resolves with success: false and an errorInfo that classifies a caller cancellation as Cancelled, which is never failed over (see BaseImageGenerator.CancelledResult).

    model?: string

    Model name/ID to use for generation

    n?: number = 1

    Number of images to generate. Default is 1. Some providers have limits on the maximum number.

    negativePrompt?: string

    Negative prompt - things to avoid in the generated image. Not all providers support this.

    outputFormat?: ImageResponseFormat = 'b64_json'

    How the generated image should be returned

    prompt: string

    Text prompt describing the image to generate. Required.

    providerOptions?: Record<string, unknown>

    Provider-specific additional parameters

    quality?: ImageQuality = 'standard'

    Quality level for the generated image

    seed?: number

    Optional seed for reproducible generation. Not all providers support seeding.

    size?: string = '1024x1024'

    Size of the generated image(s)

    style?: string

    Style preset for the generated image

    user?: string

    User identifier for tracking/abuse prevention