We use analytics and minimal tracking across our websites to help improve performance and user experience. Our privacy policy.
curl --request POST \
--url https://api.private-ai.com/community/ner/files/base64 \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"file": {
"data": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoc2FtcGxlKQovUHJvZHVj...",
"content_type": "application/pdf or image/jpeg"
},
"entity_detection": {
"return_entity": true
},
"pdf_options": {
"density": 150,
"max_resolution": 2000
},
"audio_options": {
"bleep_start_padding": 0,
"bleep_end_padding": 0
},
"ocr_options": {
"ocr_system": "azure_computer_vision"
}
}
'{
"entities": [
{
"text": "<string>",
"location": {
"stt_idx": 123,
"end_idx": 123,
"stt_idx_processed": 123,
"end_idx_processed": 123
},
"label": "<string>",
"likelihood": 123
}
],
"entities_present": true,
"languages_detected": {},
"characters_processed": 123,
"objects": [
{
"type": "FACE",
"location": {
"page": 123,
"x0": 0.5,
"x1": 0.5,
"y0": 0.5,
"y1": 0.5
}
}
],
"objects_present": false,
"audio_duration": 123,
"page_count": 123
}Detect entities such as PII, PHI or PCI in a base64-encoded file using Private AI’s entity detection engine. This is only doing the detection of entities, no redacted file is created.
This route is similar to /ner/files/uri, but passes the file in the POST request itself. This route allows for simple setup and testing, as no folders or volumes need to be mounted to the container.
This route supports the following content types: application/dicom, application/json, application/msword, application/pdf, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/xml, audio/m4a, audio/mp3, audio/mp4, audio/mp4a-latm, audio/mpeg, audio/wav, audio/webm, audio/x-wav, image/bmp, image/gif, image/jpeg, image/jpg, image/png, image/tif, image/tiff, image/x-ms-bmp, text/csv, text/plain
curl --request POST \
--url https://api.private-ai.com/community/ner/files/base64 \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"file": {
"data": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoc2FtcGxlKQovUHJvZHVj...",
"content_type": "application/pdf or image/jpeg"
},
"entity_detection": {
"return_entity": true
},
"pdf_options": {
"density": 150,
"max_resolution": 2000
},
"audio_options": {
"bleep_start_padding": 0,
"bleep_end_padding": 0
},
"ocr_options": {
"ocr_system": "azure_computer_vision"
}
}
'{
"entities": [
{
"text": "<string>",
"location": {
"stt_idx": 123,
"end_idx": 123,
"stt_idx_processed": 123,
"end_idx_processed": 123
},
"label": "<string>",
"likelihood": 123
}
],
"entities_present": true,
"languages_detected": {},
"characters_processed": 123,
"objects": [
{
"type": "FACE",
"location": {
"page": 123,
"x0": 0.5,
"x1": 0.5,
"y0": 0.5,
"y1": 0.5
}
}
],
"objects_present": false,
"audio_duration": 123,
"page_count": 123
}Base64 encoded file content.
Show child attributes
This section contains a set of parameters to control the PII detection process. All fields have sensible default that can be changed for specific needs.
Show child attributes
This section contains a set of parameters to control the object entity detection process. It allows the user to select the object entity types to detect (e.g., to detect FACE but not LICENSE_PLATE).
Show child attributes
Options to process PDF files, such as the rendering quality when each page is turned into an image.
Show child attributes
Options to process Office files, such as table and chart behaviour.
Show child attributes
Options to process image files, such as the masking mode.
Show child attributes
Options to process audio files, such as the padding to add while redacting audio segments.
Show child attributes
Used to categorize requests for reporting purposes. Limited to alphanumeric characters or the following special characters :_-
60^[a-zA-Z0-9\-_\:]*$Options to provide Optical Character Recognition (OCR) details, such as choice of OCR system.
Show child attributes
Successful Response
A list of all entities found in the provided file.
Empty
Show child attributes
Returns True if the list of detected entities is not empty.
A dictionary containing ISO 639-1 language labels and the likelihood of their detection in the request payload.
Show child attributes
The number of characters extracted from the file.
A list of all object entities found in the provided file using object detection.
Show child attributes
Returns True if the list of detected objects is not empty.
The length of the audio file in seconds.
The number of pages in the file.