Skip to main content
POST

Authorizations

x-api-key
string
header
required

Body

application/json
file
File · object
required

Base64 encoded file content.

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.

object_entity_detection
ObjectEntityDetection · object

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).

pdf_options
PDFOptions · object

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

office_options
OfficeOptions · object

Options to process Office files, such as table and chart behaviour.

image_options
ImageOptions · object

Options to process image files, such as the masking mode.

audio_options
AudioOptions · object

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

project_id
string
default:main

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

Maximum string length: 60
Pattern: ^[a-zA-Z0-9\-_\:]*$
ocr_options
AWSTextractOCROptions · object

Options to provide Optical Character Recognition (OCR) details, such as choice of OCR system.

enable_gibberish_detection
boolean
default:false

When set to True, the gibberish detector is enabled, returning a gibberish_score for each entity in the response.

return_extracted_text
boolean
default:false

Controls whether the response contains the extracted_text field, which holds the full text extracted from the input file (via OCR for images and scanned PDFs) before any redaction is applied. Note that the extracted text is not de-identified, so any PII it contains is returned as is, independently of the entity_detection.return_entity setting. Turning this ON can significantly increase the size of the response, so it defaults to False.

Response

Successful Response

entities
(NerFileEntityItem · object | NerOfficeFileEntityItem · object)[]
required

A list of all entities found in the provided file.

Empty

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.

characters_processed
integer
required

The number of characters extracted from the file.

extracted_text
string | null

The full text that was extracted from the input file, before any redaction is applied. It corresponds to the OCR output for image files and scanned PDFs, and to the file contents for text-based formats such as .txt and .csv. Note that this text is not de-identified, so any PII it contains is returned in the clear.

This field is only present if the return_extracted_text option is set to True in the request.

objects
FileObjectEntityItem · object[]

A list of all object entities found in the provided file using object detection.

objects_present
boolean
default:false

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

audio_duration
number | null

The length of the audio file in seconds.

page_count
integer | null

The number of pages in the file.