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/v3/process/files/uri \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"uri": "/home/azureuser/example-image.jpeg",
"entity_detection": {
"return_entity": true
}
}
'{
"result_uri": "<string>",
"processed_text": "<string>",
"entities": [
{
"processed_text": "<string>",
"text": "<string>",
"location": {
"stt_idx": 123,
"end_idx": 123,
"stt_idx_processed": 123,
"end_idx_processed": 123
},
"best_label": "<string>",
"labels": {}
}
],
"entities_present": true,
"languages_detected": {}
}Detect entities such as PII, PHI or PCI in the file located at the provided URI using Private AI’s entity detection engine. After entity detection, a copy of the file with all entities removed is created and placed in the folder specified by PAI_OUTPUT_FILE_DIR on the local host.
This route is similar to /v3/process/files/base64, but relies on URIs instead of base64-encoded strings. As this route avoids the overhead of base64 encoding, it is more suitable for processing large files and large volumes of data.
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/jpeg, image/jpg, image/png, image/tif, image/tiff, image/x-ms-bmp, message/rfc822, text/csv, text/plain
curl --request POST \
--url https://api.private-ai.com/community/v3/process/files/uri \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"uri": "/home/azureuser/example-image.jpeg",
"entity_detection": {
"return_entity": true
}
}
'{
"result_uri": "<string>",
"processed_text": "<string>",
"entities": [
{
"processed_text": "<string>",
"text": "<string>",
"location": {
"stt_idx": 123,
"end_idx": 123,
"stt_idx_processed": 123,
"end_idx_processed": 123
},
"best_label": "<string>",
"labels": {}
}
],
"entities_present": true,
"languages_detected": {}
}URI of the file to be processed. It must be an accessible file path on the host machine (e.g. /Users/sam/files/file.pdf).
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
Options to process PDF files, such as the rendering quality when each page is turned into an image.
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
This section allows the user to generate redacted (default) or masked text.
Show child attributes
Used to categorize requests for reporting purposes. Limited to alphanumeric characters or the following special characters :_-
60^[a-zA-Z0-9\-_\:]*$Successful Response
URI of the processed file in the output directory (e.g. /Users/sam/files/file.redacted.pdf).
This field contains the redacted version of any text that was extracted from the input file. It corresponds to a redacted ASR transcript for audio files and any text found inside a document such as a PDF or image file.
A list of all entities found in the provided file.
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