Protect
Redact PII
Detect and truly remove personal data from a PDF — the text is deleted from the content stream, not just covered with a black box, and the result is verified to confirm nothing leaked.
Login required 40 credits / callSynchronous
Overview
Upload a PDF; the engine finds PII, removes the underlying glyphs across all pages, then re-extracts the text to confirm none of the redacted values remain (text_fully_removed). Images are preserved — only text is removed.
POST
https://api.bytefuse.in/api/v1/redactThis tool requires authentication
Redaction is not free-to-try — an anonymous call returns401. Send a dt_live_ key or JWT.Request
Content type multipart/form-data:
filefilerequiredThe PDF to redact. Must end in
.pdf or the request returns 415.entity_typesstringoptionalComma-separated PII types to redact, e.g.
EMAIL,CREDIT_CARD. Values are upper-cased and validated; an unknown type returns 422. Omit to redact every supported type.Default: all typesEntity types
The supported types (listed in match-priority order — earlier types win overlaps):
CREDIT_CARD13–19 digit card numbers (Luhn-checked)AADHAARIndian 12-digit Aadhaar (Verhoeff-checked)IBANInternational bank account numbersUS_SSNUS Social Security numbersUS_ITINUS individual taxpayer IDsPAN_INDIAIndian PAN (AAAAA9999A)EMAILEmail addressesIP_ADDRESSIPv4 addressesPHONEInternational / US phone numbersFetch the list at runtime
A UI can read the always-current list from the public, no-auth endpointGET /api/v1/redact/entity-types, which returns the types alphabetically sorted.Response
200 OK, application/json:
200 OK
{
"success": true,
"url": "https://<r2-host>/redacted/20260704/<uuid>.pdf",
"redactions_made": 4,
"entities": { "EMAIL": 3, "CREDIT_CARD": 1 },
"text_fully_removed": true,
"pages": 8,
"credits_charged": 3
}successbooloptionalAlways
true on 200.urlstringoptionalPublic R2 URL of the redacted PDF. No
expires_at.redactions_madeintoptionalTotal redaction boxes applied.
entitiesobjectoptionalPer-type counts, e.g.
{ "EMAIL": 3 }.text_fully_removedbooloptionaltrue if verification confirms no redacted value remains in the text layer — the differentiator versus “black box only” tools.pagesintoptionalPage count of the PDF.
credits_chargedintoptionalAlways
40 (login required). Mirrors X-Credits-Charged.Examples
# redact only emails and cards
curl -X POST https://api.bytefuse.in/api/v1/redact \
-H "X-API-Key: dt_live_your_key" \
-F "file=@contract.pdf" \
-F "entity_types=EMAIL,CREDIT_CARD"
# Omit entity_types to redact every supported type.Errors
401Anonymous / not signed in — redaction is login-only.
415Missing filename or not a
.pdf.422An unknown
entity_types value, or a password-protected / invalid PDF.402 / 429 / 503Insufficient credits, rate limited, or capacity/config error.
500Redaction failed unexpectedly.
