Send feedback
Stay organized with collections
Save and categorize content based on your preferences.
Firebase. AI. ImagenGenerationConfig
Configuration options for generating images with Imagen.
Summary
See Parameters for Imagen models to learn about parameters available for use with Imagen models, including how to configure them.
Public functions
ImagenGenerationConfig
Firebase :: AI :: ImagenGenerationConfig :: ImagenGenerationConfig (
string negativePrompt ,
int? numberOfImages ,
ImagenAspectRatio ? aspectRatio ,
ImagenImageFormat ? imageFormat ,
bool? addWatermark
)
Initializes configuration options for generating images with Imagen.
Details
Parameters
negativePrompt
Specifies elements to exclude from the generated image; disabled if not specified.
numberOfImages
The number of image samples to generate; defaults to 1 if not specified.
aspectRatio
The aspect ratio of generated images; defaults to to square, 1:1.
imageFormat
The image format of generated images; defaults to PNG.
addWatermark
Whether to add an invisible watermark to generated images; the default value depends on the model.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-22 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-01-22 UTC."],[],[]]