Remove identifiers from a string or multiple strings. You can find examples on how to deidentify text in several different scenarios in our examples repository.
*The try it console only works with the latest version.
required | string or Array of strings UTF-8 encoded message(s) to de-identify. E.g. |
key required | string (Key) License key provided to you by Private AI. Note that this field will be moving to the API header in the upcoming API refactor. |
unique_pii_markers | boolean (Unique Pii Markers) Default: true Specifies whether PII markers in the text should uniquely identify PII. |
enabled_classes | Array of strings (Enabled Classes) Controls which types of PII are removed. See Supported Entity Types for the list of possible entities. |
allow_list | Array of strings (Allow List) Any entities in this list will be ignored by the Private AI system. Note that this feature does not support regex patterns and the match is case-insensitive. If the allow list is |
marker_format | string (Marker Format) Specify a custom redaction marker format. The format must contain one of |
accuracy_mode | string (Accuracy Mode) Default: "high" Selects the model used to identify PII in the input text. By default, the |
fake_entity_accuracy_mode | string (Fake Entity Accuracy Mode) (Beta) Enable fake entity generation using the specified model. Currently this feature is in beta and only supports mode |
preserve_relationships | boolean (Preserve Relationships) Default: true (Beta) Specifies whether multiple instances of the same entity should have the same generated fake entity or not. For example, preserve relationships: |
link_batch | boolean (Link Batch) Default: false When set to true, batch inputs will be joined together internally in the Private AI inference engine, to share context between the different inputs. This is useful when processing a sequence of short inputs, such as an SMS chat log. |
object (Block List) The block list feature allows for PII detection functionality to be customized using Python regular expressions. It is possible to extend existing entity types or define new entity types. Regex patterns are passed as a JSON object with the key representing a label and the value a regex pattern, for example { Since this feature uses regex patterns, you can either pass a word (e.g. the, word, custom, etc.) or you can pass a valid Python regex pattern. It is important to note that regex patterns require escaping the special characters when used in JSON objects. To give an example, if you would like to send the regex pattern It is important to note also that only non-overlapping matches are returned. Lastly,for supported entity types, if you would like the model to pick up only the entities specified from the block list, you can use the enabled classes feature together with the block list feature. This can be done by defining a list of enabled classes and not including the supported label you are adding to the block list. For example, if you would like the label | |
block_list_max_likelihood | number (Block List Max Likelihood) Default: 1 |
request_version | integer (Request Version) Default: 1 |
Successful Response
Bad Request
Internal Server Error
Client Error
{- "result": "string",
- "result_fake": "string",
- "pii": [
- {
- "marker": "string",
- "text": "string",
- "best_label": "string",
- "stt_idx": 0,
- "end_idx": 0,
- "labels": {
- "entitytype1": 0,
- "entitytype2": 0
}, - "fake_text": "string",
- "fake_stt_idx": 0,
- "fake_end_idx": 0
}
], - "api_calls_used": 0,
- "output_checks_passed": true
}