docs-devsite/ai.imagengenerationresponse.md
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 %}
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>
export interface ImagenGenerationResponse<T extends ImagenInlineImage | ImagenGCSImage>
| Property | Type | Description |
|---|---|---|
| filteredReason | string | 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. |
| images | T[] | 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>. |
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>
filteredReason?: string;
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>
images: T[];