ImagenGenerationResponse interface
Stay organized with collections
Save and categorize content based on your preferences.
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 response from a request to generate images with Imagen.
Signature:
export interface ImagenGenerationResponse<T extends ImagenInlineImage | ImagenGCSImage>
Properties
ImagenGenerationResponse.filteredReason
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 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.
Signature:
filteredReason?: string;
ImagenGenerationResponse.images
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 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
.
Signature:
images: T[];
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 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["# ImagenGenerationResponse interface\n\n\u003e 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.\n\nThe response from a request to generate images with Imagen.\n\n**Signature:** \n\n export interface ImagenGenerationResponse\u003cT extends ImagenInlineImage | ImagenGCSImage\u003e \n\nProperties\n----------\n\n| Property | Type | Description |\n|-------------------------------------------------------------------------------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [filteredReason](./ai.imagengenerationresponse.md#imagengenerationresponsefilteredreason) | string | ***(Public Preview)*** 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](./ai.md#imagensafetyfilterlevel), [ImagenPersonFilterLevel](./ai.md#imagenpersonfilterlevel), or filtering included in the model. The filter levels may be adjusted in your [ImagenSafetySettings](./ai.imagensafetysettings.md#imagensafetysettings_interface).See the [Responsible AI and usage guidelines for Imagen](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen) for more details. |\n| [images](./ai.imagengenerationresponse.md#imagengenerationresponseimages) | T\\[\\] | ***(Public Preview)*** 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`. |\n\nImagenGenerationResponse.filteredReason\n---------------------------------------\n\n\u003e 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.\n\nThe reason that images were filtered out. This property will only be defined if one or more images were filtered.\n\nImages may be filtered out due to the [ImagenSafetyFilterLevel](./ai.md#imagensafetyfilterlevel), [ImagenPersonFilterLevel](./ai.md#imagenpersonfilterlevel), or filtering included in the model. The filter levels may be adjusted in your [ImagenSafetySettings](./ai.imagensafetysettings.md#imagensafetysettings_interface).\n\nSee the [Responsible AI and usage guidelines for Imagen](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen) for more details.\n\n**Signature:** \n\n filteredReason?: string;\n\nImagenGenerationResponse.images\n-------------------------------\n\n\u003e 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.\n\nThe images generated by Imagen.\n\nThe number of images generated may be fewer than the number requested if one or more were filtered out; see `filteredReason`.\n\n**Signature:** \n\n images: T[];"]]