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

# Privacy filter

> Detect and redact PII with OpenAI Privacy Filter inside an attested enclave.

[OpenAI Privacy Filter](https://openai.com/index/introducing-openai-privacy-filter/) is a token classifier, not a chat model. Tinfoil serves the unmodified upstream model.

## Endpoint

`POST https://pii-filter.tinfoil.sh/redact` requires `Authorization: Bearer <TINFOIL_API_KEY>` and `Content-Type: application/json`.

Use a [Tinfoil SDK](https://docs.tinfoil.sh/sdk/overview.md) verified HTTP client targeting enclave `pii-filter.tinfoil.sh` and configuration repository `tinfoilsh/confidential-pii-cpu`. This is a custom HTTP endpoint, not `/v1/chat/completions` or `/v1/responses`; the SDK's chat methods do not apply.

For [direct HTTP access](https://docs.tinfoil.sh/sdk/direct-api-access.md) without an SDK, manual attestation verification is required for connection-time guarantees. Ordinary HTTPS alone does not verify the enclave's code.

Request:

```json theme={"dark"}
{"text": "Call John Smith at 555-867-5309"}
```

The response contains `schema_version`, `summary`, the original `text`, `detected_spans` (with `label`, `start`, `end`, `text`, and `placeholder`), and `redacted_text`. It passes through the upstream library's result. Treat the response as sensitive: it includes original text and detected values.

Requests can contain up to 4 MiB of JSON.

## Web search

Enable `pii_check_options` to filter outgoing search queries. Websearch applies its own [removal policy](https://docs.tinfoil.sh/guides/web-search.md#pii-protection) to detected spans rather than using the model's placeholder-redacted text.

## Limitations

The model is primarily English and can miss sensitive text or label public information as private. Neither a successful response nor an empty span list guarantees anonymization. See the [model card](https://huggingface.co/openai/privacy-filter) for the taxonomy and limitations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.