Interface GenerateImagesConfig

The config for generating an images.

interface GenerateImagesConfig {
    addWatermark?: boolean;
    aspectRatio?: string;
    enhancePrompt?: boolean;
    guidanceScale?: number;
    httpOptions?: HttpOptions;
    includeRaiReason?: boolean;
    includeSafetyAttributes?: boolean;
    language?: ImagePromptLanguage;
    negativePrompt?: string;
    numberOfImages?: number;
    outputCompressionQuality?: number;
    outputGcsUri?: string;
    outputMimeType?: string;
    personGeneration?: PersonGeneration;
    safetyFilterLevel?: SafetyFilterLevel;
    seed?: number;
}

Properties

addWatermark?: boolean

Whether to add a watermark to the generated images.

aspectRatio?: string

Aspect ratio of the generated images.

enhancePrompt?: boolean

Whether to use the prompt rewriting logic.

guidanceScale?: number

Controls how much the model adheres to the text prompt. Large values increase output and prompt alignment, but may compromise image quality.

httpOptions?: HttpOptions

Used to override HTTP request options.

includeRaiReason?: boolean

Whether to include the Responsible AI filter reason if the image is filtered out of the response.

includeSafetyAttributes?: boolean

Whether to report the safety scores of each image in the response.

Language of the text in the prompt.

negativePrompt?: string

Description of what to discourage in the generated images.

numberOfImages?: number

Number of images to generate.

outputCompressionQuality?: number

Compression quality of the generated image (for image/jpeg only).

outputGcsUri?: string

Cloud Storage URI used to store the generated images.

outputMimeType?: string

MIME type of the generated image.

personGeneration?: PersonGeneration

Allows generation of people by the model.

safetyFilterLevel?: SafetyFilterLevel

Filter level for safety filtering.

seed?: number

Random seed for image generation. This is not available when add_watermark is set to true.

MMNEPVFCICPMFPCPTTAAATR