ImagenSafetyFilterLevel

public final class ImagenSafetyFilterLevel


Used for safety filtering.

Deprecation Notice: 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)

Summary

Nested types

Public fields

static final @NonNull ImagenSafetyFilterLevel

Strongest filtering level, most strict blocking.

static final @NonNull ImagenSafetyFilterLevel

Block some problematic prompts and responses.

static final @NonNull ImagenSafetyFilterLevel

Turns off all optional safety filters.

static final @NonNull ImagenSafetyFilterLevel

Reduces the number of requests blocked due to safety filters.

Public fields

BLOCK_LOW_AND_ABOVE

public static final @NonNull ImagenSafetyFilterLevel BLOCK_LOW_AND_ABOVE

Strongest filtering level, most strict blocking.

BLOCK_MEDIUM_AND_ABOVE

public static final @NonNull ImagenSafetyFilterLevel BLOCK_MEDIUM_AND_ABOVE

Block some problematic prompts and responses.

BLOCK_NONE

public static final @NonNull ImagenSafetyFilterLevel BLOCK_NONE

Turns off all optional safety filters.

BLOCK_ONLY_HIGH

public static final @NonNull ImagenSafetyFilterLevel BLOCK_ONLY_HIGH

Reduces the number of requests blocked due to safety filters. May increase objectionable content generated by the Imagen model.