Get Started

PII Removal

Automatically detect and redact sensitive information from documents

PII Removal

DeepRead's PII Removal API automatically detects and redacts personally identifiable information (PII) from your documents. Upload a PDF, image, or text file and get back a clean, redacted version with all sensitive data removed. PII redaction is available on the Enterprise plan; a request from another plan is refused with 402 naming the plan that has it.

Quick example

Upload a document to redact PII:

cURL Example
curl -X POST https://api.deepread.tech/v1/pii/redact \
-H "X-API-Key: $DEEPREAD_API_KEY" \
-F "file=@contract.pdf" \
-F "redaction_style=black_bar"

Check the results

The API returns a job ID immediately. You can track your PII redaction jobs and download results from the Dashboard Jobs page, or poll for results via the API:

cURL Example
curl https://api.deepread.tech/v1/pii/550e8400-e29b-41d4-a716-446655440000 \
-H "X-API-Key: $DEEPREAD_API_KEY"

Response when complete:

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "progress_percent": 100,
  "redacted_file_url": "https://storage.deepread.tech/redacted/abc123.pdf",
  "report": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "page_count": 3,
    "processing_time_ms": 4200,
    "total_redactions": 8,
    "pii_detected": {
      "EMAIL": { "count": 3, "pages": [1, 2], "confidence_avg": 0.97 },
      "PHONE": { "count": 2, "pages": [1], "confidence_avg": 0.94 },
      "SSN": { "count": 1, "pages": [2], "confidence_avg": 0.99 },
      "NAME": { "count": 2, "pages": [1, 3], "confidence_avg": 0.91 }
    }
  }
}

How it works

  1. Upload a document (PDF, image, or text file)
  2. AI detects all PII using LLM-powered analysis across every page
  3. Redaction applies black bar redaction over all detected PII
  4. Download the redacted document from the signed URL

What gets detected

The PII detector automatically finds 14 types of sensitive information including names, emails, phone numbers, SSNs, credit cards, addresses, dates of birth, passport numbers, driver's licenses, bank accounts, IBANs, IP addresses, URLs, and medical records.

See PII Removal Concepts for the full list with examples.

Redaction style

All PII is redacted using black_bar — opaque black rectangles drawn over detected PII, ensuring no trace of the original value remains.

Supported formats

  • PDF - multi-page documents, scanned or digital
  • Images - PNG, JPEG (uses OCR + vision AI)
  • Text - plain text files

Next steps