> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moderationapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Privacy

> Detect and mask personal information, contact details, and attempts to share them in obfuscated ways.

Privacy policies catch sensitive user information before it reaches your database, public feed, or other users. They cover detection (does this content contain PII?) as well as masking (redact it from the stored content).

## Policies

| `id`                   | Type             | Supported   | What it does                                                                                                                                                                                   |
| ---------------------- | ---------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `personal_information` | `classifier`     | text, audio | Flags content that contains emails, phone numbers, addresses, or other sensitive numbers.                                                                                                      |
| `intent_to_share`      | `classifier`     | text, audio | Flags attempts to share contact details — directly or obfuscated (e.g. "find me on Instagram"). <Tooltip tip="In active development. Behavior and accuracy may change.">Experimental</Tooltip> |
| `pii`                  | `entity_matcher` | text, audio | Extracts specific PII entities (email, phone, address, etc.) and can return masked content with those entities redacted.                                                                       |
| `face_detection`       | `classifier`     | image       | Flags images by how many faces they contain. See [Face detection](#face-detection).                                                                                                            |

## Face detection

Face detection flags images with a single rule you write as a sentence:

> Flag images that contain **at least** / **fewer than** **N** faces.

Both directions are useful, which is why the rule reads this way rather than as a simple on/off:

* **At least 1** — flag any image showing a person. Use it where faces shouldn't appear at all, like product photos or document uploads.
* **Fewer than 1** — flag images with no face. Use it where a face is required, like verifying that a profile picture is actually of someone.
* **At least 3** — flag group photos while letting individual portraits through.

Configure it on a channel's **Policies → Privacy** page. Two settings:

| Setting   | What it does                                                                     |
| --------- | -------------------------------------------------------------------------------- |
| Flagging  | The rule itself — the comparator (`at_least` or `fewer_than`) and the face count |
| Threshold | How confident the detector must be before a face counts                          |

`probability` reports confidence that the rule is satisfied, so an absence match ("fewer than 1 face, and there are none") reports high confidence rather than zero. Detected faces are returned on the policy's `data` field.

<Note>
  Face detection runs on images only. It doesn't identify anyone — it counts faces and returns no identity information.
</Note>

## Reading the result

```javascript theme={"theme":"nord"}
const pii = response.policies.find(p => p.id === "pii");

pii?.matches?.forEach(match => {
  console.log(`${match.match} at ${match.span[0]}–${match.span[1]}`);
});

if (response.content.masked) {
  await store(response.content.modified); // PII redacted
}
```

See [Understanding API responses](/content-moderation/acting-on-responses) for the full response shape and masking behavior.
