Back to Firebase Js Sdk

ImagenGenerationResponse interface

docs-devsite/ai.imagengenerationresponse.md

12.12.12.8 KB
Original Source

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 %}

ImagenGenerationResponse interface

Warning: This API is now obsolete.

All Imagen models are deprecated and will shut down as early as June 2026. As a replacement, you can migrate your apps to use Gemini Image models (the "Nano Banana" models)<!-- -->.

The response from a request to generate images with Imagen.

<b>Signature:</b>

typescript
export interface ImagenGenerationResponse<T extends ImagenInlineImage | ImagenGCSImage> 

Properties

PropertyTypeDescription
filteredReasonstringThe reason that images were filtered out. This property will only be defined if one or more images were filtered.<!-- -->Images may be filtered out due to the ImagenSafetyFilterLevel<!-- -->, ImagenPersonFilterLevel<!-- -->, or filtering included in the model. The filter levels may be adjusted in your ImagenSafetySettings<!-- -->.<!-- -->See the Responsible AI and usage guidelines for Imagen for more details.
imagesT[]The images generated by Imagen.<!-- -->The number of images generated may be fewer than the number requested if one or more were filtered out; see <code>filteredReason</code>.

ImagenGenerationResponse.filteredReason

The reason that images were filtered out. This property will only be defined if one or more images were filtered.

Images may be filtered out due to the ImagenSafetyFilterLevel<!-- -->, ImagenPersonFilterLevel<!-- -->, or filtering included in the model. The filter levels may be adjusted in your ImagenSafetySettings<!-- -->.

See the Responsible AI and usage guidelines for Imagen for more details.

<b>Signature:</b>

typescript
filteredReason?: string;

ImagenGenerationResponse.images

The images generated by Imagen.

The number of images generated may be fewer than the number requested if one or more were filtered out; see filteredReason<!-- -->.

<b>Signature:</b>

typescript
images: T[];