ImagenSafetySettings
@available(*, deprecated, message: "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﹚.")
public struct ImagenSafetySettingsSettings for controlling the aggressiveness of filtering out sensitive content.
See the Responsible AI and usage guidelines for more details.
-
Initializes safety settings for the Imagen model.
Declaration
Swift
public init(safetyFilterLevel: ImagenSafetyFilterLevel? = nil, personFilterLevel: ImagenPersonFilterLevel? = nil)Parameters
safetyFilterLevelA filter level controlling how aggressively to filter out sensitive content from generated images.
personFilterLevelA filter level controlling whether generation of images containing people or faces is allowed.