PII in PDF mit base64-Eingabe erkennen
Erkennt PII (Personenbezogene Informationen) in einer PDF-Datei ohne Schwärzung. Akzeptiert PDF als base64-kodierte Zeichenkette im Anfragekörper. Gibt erkannte PII-Entitäten und Verarbeitungsmetriken zurück. Unterstützt mehrere OCR-Sprachen, Erkennung von rotiertem Text und anpassbare PII-Tag-Erkennung. Verarbeitet nur die erste Seite der PDF.
Authorization
APIKeyHeader In: header
Request Body
application/json
Base64-encoded PDF document to be processed
List of predefined PII tags to detect. If empty, all available tags are used
[]Force OCR processing even if text is extractable from PDF
falseList of OCR languages to use for text recognition. Available: ENG, SPA, FRA, DEU, ITA, POR, RUS. Multiple languages can be specified for multilingual documents
["eng"]Enable detection and recognition of rotated text in the document
falseList of custom tags to detect. These tags are added to the standard PII tags
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.pdf-redaction.com/api/detect/pii/pdf" \ -H "Content-Type: application/json" \ -d '{ "custom_tags": [ "CUSTOM_TAG_1", "CUSTOM_TAG_2" ], "force_ocr": true, "ocr_langs": [ "eng" ], "pdf": "base64_encoded_pdf_string", "rotated_text": true, "tags": [ "DATE", "PERSON_NAME", "EMAIL", "PHONE" ] }'{
"detected_pii": {
"path": "memory",
"entities": [
{
"entity_group": "PERSON_NAME",
"score": 0.95,
"word": "John Doe",
"start": 0,
"end": 8,
"boxes": [
{
"text": "John Doe",
"score": 0.95,
"x": 100,
"y": 200,
"width": 150,
"height": 25
}
]
},
{
"entity_group": "EMAIL",
"score": 0.98,
"word": "john.doe@example.com",
"start": 0,
"end": 20,
"boxes": [
{
"text": "john.doe@example.com",
"score": 0.98,
"x": 100,
"y": 250,
"width": 200,
"height": 25
}
]
}
],
"exception": "",
"json": ""
},
"processing_time": {
"total": 2.5,
"stages": {
"PdfDataToSingleImage": 0.5,
"Ocr": 0.5,
"Ner": 1.5
}
}
}{
"error_code": "LLM_CALL_ERROR",
"message": "string"
}{
"error_code": "LLM_CALL_ERROR",
"message": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}