---
title: Moderation Policies and Rules
url: https://docs.kaltura.com/docs/rich-media-cms-apis/content-moderation/moderation-policies
---

## Moderation Policies and Rules

Moderation policies define what the AI engine checks for when analyzing content. A policy is a named collection of rules, each targeting a specific content concern.

### Text Rules

| Rule | Description |
|------|-------------|
| `profanity` | Detects profanity and vulgar language in transcripts |
| `hate_speech` | Identifies hate speech, slurs, and discriminatory language |
| `pii` | Flags personally identifiable information (names, emails, phone numbers, SSNs) |
| `violence_text` | Detects descriptions of violence or threats in spoken/written content |
| `sexual_text` | Identifies sexually explicit or suggestive language |
| `self_harm` | Flags references to self-harm or suicidal content |
| `dangerous_activities` | Detects instructions for dangerous or illegal activities |
| `custom_keywords` | Matches against a configurable list of blocked terms |

### Visual Rules

| Rule | Description |
|------|-------------|
| `nudity` | Detects nudity or near-nudity in video frames |
| `violence_visual` | Identifies graphic violence, blood, or weapons in frames |
| `drugs` | Detects drug paraphernalia or substance use |
| `alcohol_tobacco` | Flags alcohol or tobacco product visibility |
| `offensive_symbols` | Identifies hate symbols, offensive gestures, or extremist imagery |
| `text_overlay` | Reads and moderates text overlaid on video frames |
| `child_safety` | Detects potential child exploitation or endangerment content |

### Predefined Policies

The platform includes two predefined policies:

| Policy | Rules Included |
|--------|---------------|
| `default_moderation_v2` | profanity, hate_speech, pii, nudity, violence_visual, violence_text, sexual_text |
| `strict_moderation_v1` | All text rules + all visual rules |

### Custom Policies

Create custom policies by selecting specific rules and configuring severity thresholds:

```bash
curl -X POST "$KALTURA_SERVICE_URL/service/moderationPolicy/action/add" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "policy[name]=Corporate Content Policy" \
  -d "policy[rules][0][type]=profanity" \
  -d "policy[rules][0][severity]=high" \
  -d "policy[rules][1][type]=pii" \
  -d "policy[rules][1][severity]=medium" \
  -d "policy[rules][2][type]=custom_keywords" \
  -d "policy[rules][2][keywords]=competitor1,competitor2,internal-codename"
```

### Scoring Algorithm

Each rule produces a severity score when a violation is detected:

| Severity | Score Range | Description |
|----------|------------|-------------|
| `low` | 0.1 – 0.3 | Minor concern — may not require action |
| `medium` | 0.4 – 0.6 | Moderate concern — review recommended |
| `high` | 0.7 – 0.9 | Significant violation — action likely required |
| `critical` | 0.9 – 1.0 | Severe violation — immediate action recommended |

The `overallScore` in the moderation output is the maximum severity across all detected violations. A score of 0.0 means no violations were found.
