Skip to main content
POST
/
v3
/
process
/
files
/
base64
Process Files Base64
curl --request POST \
  --url https://api.private-ai.com/deid/v3/process/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": {
    "accuracy": "high",
    "return_entity": true
  },
  "pdf_options": {
    "density": 150,
    "max_resolution": 2000
  },
  "audio_options": {
    "bleep_start_padding": 0,
    "bleep_end_padding": 0
  }
}
'
{
  "processed_file": "<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": {}
}

Authorizations

x-api-key
string
header
required

Headers

x-api-key
string
default:""

Body

application/json
file
File · object
required

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.

entity_detection
PIIDetectionParams · object

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.

pdf_options
PDFOptions · object

Options to process PDF files, such as the rendering quality when each page is turned into an image.

audio_options
AudioOptions · object

Options to process audio files, such as the padding to add while redacting audio segments.

project_id
string | null

Used to categorize requests for reporting purposes. Limited to alphanumeric characters or the following special characters :_-

Maximum string length: 32
Pattern: ^[a-zA-Z0-9\-_\:]*$

Response

Successful Response

processed_file
string
required

the base64 encoded file content of the redacted file.

processed_text
string
required

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.

entities
FileEntityItem · object[]
required

A list of all entities found in the provided file.

entities_present
boolean
required

Returns True if the list of detected entities is not empty.

languages_detected
Languages Detected · object
required

A dictionary containing ISO 639-1 language labels and the likelihood of their detection in the request payload.