Process Text

Detect entities such as PII, PHI, PCI, or CCI in the provided text strings using Private AI's entity detection engine. After entity detection, any entities found can be redacted, masked or replaced with AI-generated synthetic entities.

Request
header Parameters
x-api-key
string (X-Api-Key)
Default:
Request Body schema: application/json
required
text
required
Array of strings (Text)

UTF-8 encoded message(s) to process. E.g. ["My name is Adam"] or ["I live at", "263 Spadina Av"]. Request processing time increases linearly with input text length, therefore maximum length is dependent on provisioned hardware and any timeouts set by the user. Private AI has tested up to 500K characters on the CPU and GPU containers.

link_batch
boolean (Link Batch)
Default: false

When set to True, the list of inputs provided in text will be processed together as a single input by the Private AI PII detection model. This shares context between the different inputs and is useful when processing a sequence of short inputs, such as an SMS chat log. This option should only be enabled when the inputs are related, otherwise PII detection performance could be degraded.

object (PIIDetectionParams)

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.

Project Id (string) or Project Id (null) (Project Id)

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

any (Processed Text)
Default: {"coreference_resolution":"heuristics","marker_language":"en","pattern":"[UNIQUE_NUMBERED_ENTITY_TYPE]","type":"MARKER"}

This section allows the user to generate redacted (default), synthetic or masked text.

Responses
200

Successful Response

400

Bad Request

500

Internal Server Error

4XX

Client Error

post/process/text
Request samples
Response samples
application/json
[
  • {
    }
]
© Copyright 2024 Private AI.