Safety setting that can be sent as part of request parameters.

**Signature:**

    export interface SafetySetting 

## Properties

| Property | Type | Description |
|---|---|---|
| [category](https://firebase.google.com/docs/reference/js/ai.safetysetting#safetysettingcategory) | [HarmCategory](https://firebase.google.com/docs/reference/js/ai#harmcategory) |   |
| [method](https://firebase.google.com/docs/reference/js/ai.safetysetting#safetysettingmethod) | [HarmBlockMethod](https://firebase.google.com/docs/reference/js/ai#harmblockmethod) | The harm block method.This property is only supported in the Agent Platform Gemini API ([AgentPlatformBackend](https://firebase.google.com/docs/reference/js/ai.agentplatformbackend#agentplatformbackend_class)). When using the Gemini Developer API ([GoogleAIBackend](https://firebase.google.com/docs/reference/js/ai.googleaibackend#googleaibackend_class)), an [AIError](https://firebase.google.com/docs/reference/js/ai.aierror#aierror_class) will be thrown if this property is defined. |
| [threshold](https://firebase.google.com/docs/reference/js/ai.safetysetting#safetysettingthreshold) | [HarmBlockThreshold](https://firebase.google.com/docs/reference/js/ai#harmblockthreshold) |   |

## SafetySetting.category

**Signature:**

    category: HarmCategory;

## SafetySetting.method

The harm block method.

This property is only supported in the Agent Platform Gemini API ([AgentPlatformBackend](https://firebase.google.com/docs/reference/js/ai.agentplatformbackend#agentplatformbackend_class)). When using the Gemini Developer API ([GoogleAIBackend](https://firebase.google.com/docs/reference/js/ai.googleaibackend#googleaibackend_class)), an [AIError](https://firebase.google.com/docs/reference/js/ai.aierror#aierror_class) will be thrown if this property is defined.

**Signature:**

    method?: HarmBlockMethod;

## SafetySetting.threshold

**Signature:**

    threshold: HarmBlockThreshold;