Back to Firebase Js Sdk

ImagenSafetySettings interface

docs-devsite/ai.imagensafetysettings.md

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

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

Settings for controlling the aggressiveness of filtering out sensitive content.

See the documentation for more details.

<b>Signature:</b>

typescript
export interface ImagenSafetySettings 

Properties

PropertyTypeDescription
personFilterLevelImagenPersonFilterLevelA filter level controlling whether generation of images containing people or faces is allowed.
safetyFilterLevelImagenSafetyFilterLevelA 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.

<b>Signature:</b>

typescript
personFilterLevel?: ImagenPersonFilterLevel;

ImagenSafetySettings.safetyFilterLevel

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

<b>Signature:</b>

typescript
safetyFilterLevel?: ImagenSafetyFilterLevel;