OPF Privacy Filter

April 23, 2026 ยท View on GitHub

A PII (Personally Identifiable Information) detection and redaction HTTP service built on OpenAI Privacy Filter.

Docker Usage

Pull Image

docker pull ghcr.io/gh0stkey/opf-privacy-filter:latest

Run

docker run -d -p 8000:8000 --name opf ghcr.io/gh0stkey/opf-privacy-filter:latest

With GPU acceleration:

docker run -d -p 8000:8000 --gpus all -e OPF_DEVICE=cuda --name opf ghcr.io/gh0stkey/opf-privacy-filter:latest

Environment Variables

VariableDefaultDescription
OPF_DEVICEcpuInference device: cpu or cuda
OPF_OUTPUT_MODEtypedOutput mode
OPF_CHECKPOINT-Custom model checkpoint path

API Endpoints

The service listens on http://localhost:8000 by default. Model loading takes ~1-2 minutes on first start.

Health Check

curl http://localhost:8000/health

Redact Single Text

curl -X POST http://localhost:8000/redact \
  -H "Content-Type: application/json" \
  -d '{"text": "My name is John and my email is john@example.com"}'

Redact Text Only (returns redacted string)

curl -X POST http://localhost:8000/redact/text \
  -H "Content-Type: application/json" \
  -d '{"text": "My name is John and my email is john@example.com"}'

Batch Redaction

curl -X POST http://localhost:8000/redact/batch \
  -H "Content-Type: application/json" \
  -d '{"texts": ["Call me at 555-1234", "My SSN is 123-45-6789"]}'

Build Locally

docker build -t opf-privacy-filter .
docker run -d -p 8000:8000 opf-privacy-filter