PIICrunch API provides endpoints for handling PII (Personally Identifiable Information) redaction from documents such as images, PDFs, and DOCX files. This API allows you to detect and redact PII from these documents.
Detects PII from an image.
- Request Parameters: Multipart/form-data with an image file.
- Response: JSON object with detected PII tags.
Redacts PII from an image.
- Request Body: Multipart/form-data with an image file and a form field for
pii_to_redact
(comma-separated list of PII types to redact). - Response: Redacted image.
Detects PII from a PDF.
- Request Parameters: Multipart/form-data with the pdf file.
- Response: JSON object with detected PII tags.
Redacts PII from a PDF.
- Request Body: Multipart/form-data with a pdf file and a form field for
pii_to_redact
(comma-separated list of PII types to redact). - Response: Redacted image.
Detects PII from a docx file.
- Request Parameters: Multipart/form-data with the docx file.
- Response: JSON object with detected PII tags.
Redacts PII from a docx file.
- Request Body: Multipart/form-data with a docx file and a form field for
pii_to_redact
(comma-separated list of PII types to redact). - Response: Redacted image.
To start the application using Uvicorn:
uvicorn app.main:app --host 0.0.0.0 --port 8000
Or using Gunicorn:
gunicorn -w 4 -k uvicorn.workers.UvicornWorker app.main:app --bind 0.0.0.0:8000