Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference
{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Configuration options for generating images with Imagen.
See the documentation for more details.
Signature:
export interface ImagenGenerationConfig
Property | Type | Description |
---|---|---|
addWatermark | boolean | (Public Preview) Whether to add an invisible watermark to generated images.If set to true , an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to false , watermarking will be disabled.For Imagen 3 models, the default value is true ; see the addWatermark documentation for more details. |
aspectRatio | ImagenAspectRatio | (Public Preview) The aspect ratio of the generated images. The default value is square 1:1. Supported aspect ratios depend on the Imagen model, see ImagenAspectRatio for more details. |
imageFormat | ImagenImageFormat | (Public Preview) The image format of the generated images. The default is PNG.See ImagenImageFormat for more details. |
negativePrompt | string | (Public Preview) A description of what should be omitted from the generated images.Support for negative prompts depends on the Imagen model.See the documentation for more details. |
numberOfImages | number | (Public Preview) The number of images to generate. The default value is 1.The number of sample images that may be generated in each request depends on the model (typically up to 4); see the sampleCount documentation for more details. |
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Whether to add an invisible watermark to generated images.
If set to true
, an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to false
, watermarking will be disabled.
For Imagen 3 models, the default value is true
; see the addWatermark documentation for more details.
Signature:
addWatermark?: boolean;
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The aspect ratio of the generated images. The default value is square 1:1. Supported aspect ratios depend on the Imagen model, see ImagenAspectRatio for more details.
Signature:
aspectRatio?: ImagenAspectRatio;
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The image format of the generated images. The default is PNG.
See ImagenImageFormat for more details.
Signature:
imageFormat?: ImagenImageFormat;
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
A description of what should be omitted from the generated images.
Support for negative prompts depends on the Imagen model.
See the documentation for more details.
Signature:
negativePrompt?: string;
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
The number of images to generate. The default value is 1.
The number of sample images that may be generated in each request depends on the model (typically up to 4); see the sampleCount documentation for more details.
Signature:
numberOfImages?: number;