Interface SafetyRating

Safety rating corresponding to the generated content.

interface SafetyRating {
    blocked?: boolean;
    category?: HarmCategory;
    overwrittenThreshold?: HarmBlockThreshold;
    probability?: HarmProbability;
    probabilityScore?: number;
    severity?: HarmSeverity;
    severityScore?: number;
}

Properties

blocked?: boolean

Output only. Indicates whether the content was filtered out because of this rating.

category?: HarmCategory

Output only. Harm category.

overwrittenThreshold?: HarmBlockThreshold

Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold.

probability?: HarmProbability

Output only. Harm probability levels in the content.

probabilityScore?: number

Output only. Harm probability score.

severity?: HarmSeverity

Output only. Harm severity levels in the content.

severityScore?: number

Output only. Harm severity score.