Analyze Text

Detect entities in the provided text strings using Private AI's entity detection engine and return the results of the analysis and validation of each entity.

Request
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 :_-

Locale (string) or Locale (null) (Locale)

This optional field serves as a hint to the analyzer to interpret locale-dependent entity types like dates. When set to en-CA, the date 12-10-2024 will be interpreted as October 12, 2024. However, if the hint is set to en-US, the date will be interpreted as December 10, 2024. If no locale is provided the language of the input text will be used.

RelationDetectionParams (object) or null

This section contains a set of parameters to control the relation detection process. It allows the user to select the coreference resolution mode and to enable relation extraction among entities.

Responses
200

Successful Response

400

Bad Request

500

Internal Server Error

4XX

Client Error

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