ImagenSafetySettings interface

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).

Settings for controlling the aggressiveness of filtering out sensitive content.

See the documentation for more details.

Signature:

export interface ImagenSafetySettings 

Properties

Property Type Description
personFilterLevel ImagenPersonFilterLevel A filter level controlling whether generation of images containing people or faces is allowed.
safetyFilterLevel ImagenSafetyFilterLevel A filter level controlling how aggressive to filter out sensitive content from generated images.

ImagenSafetySettings.personFilterLevel

A filter level controlling whether generation of images containing people or faces is allowed.

Signature:

personFilterLevel?: ImagenPersonFilterLevel;

ImagenSafetySettings.safetyFilterLevel

A filter level controlling how aggressive to filter out sensitive content from generated images.

Signature:

safetyFilterLevel?: ImagenSafetyFilterLevel;