Process File Base64

Detect entities such as PII, PHI or PCI in a base64-encoded file using Private AI's entity detection engine. After entity detection, a copy of the file with all entities removed is created and returned.

This route is similar to /v3/process/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 multiple filetypes, with the content type being set by the user. A future release will add automatic content type detection.

Request
header Parameters
x-api-key
string (X-Api-Key)
Default:
Request Body schema: application/json
required
required
object (File)

File object containing base64 encoded text data and its content type.

object (Entity Detection)
Default: {"accuracy":"high","filter":[],"return_entity":true}

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.

object (Pdf Options)

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

object (Audio Options)
Default: {"bleep_start_padding":0,"bleep_end_padding":0}

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

Responses
200

Successful Response

422

Validation Error

post/v3/process/files/base64
Request samples
Response samples
application/json
{
  • "processed_file": "string",
  • "processed_text": "string",
  • "entities": [
    ],
  • "entities_present": true
}
© Copyright 2024 Private AI.