For the complete documentation index, see llms.txt. This page is also available as Markdown.

Redact text strings

You can use the Tonic Textual REST API to redact text strings, including:

  • Plain text

  • JSON

  • XML

  • HTML

Textual provides a specific endpoint for each format. For JSON, XML, and HTML, Textual only redacts the text values. It preserves the underlying structure.

Plain text

post

Returns a modified version of the provided text string that redacts or synthesizes the detected entity values.

Body

Request to redact PII from plain text.

generatorConfigobjectOptional

A dictionary of entity types to their transformation type.

Example: {"NAME_GIVEN":"Redaction","NAME_FAMILY":"Redaction"}
generatorDefaultstring · enumOptional

Possible values:

  • Off: Ignore the PII type
  • Synthesis: Synthesize a new, realistic entity
  • Redaction: Tokenize the entity, e.g. [NAME_GIVEN_ssys5]
  • GroupingSynthesis: Synthesize entities using consistent grouping across the document
  • ReplacementSynthesis: Replace entities with LLM generated values. ReplacementSynthesis is no longer used
Possible values:
docXImagePolicystring · enumOptional

Possible values:

  • Redact: Run images through OCR and redact sensitive text
  • Ignore: Leave images alone
  • Remove: Cover image with opaque black box
Possible values:
rtfImagePolicystring · enumOptional

Possible values:

  • Ignore: Leave images alone
  • Remove: Replace each image with an opaque black box of the same size
Possible values:
docXCommentPolicystring · enumOptional

Possible values:

  • Remove: Remove all comments for file
  • Ignore: Leave comments alone
Possible values:
pdfSignaturePolicystring · enumOptional

Possible values:

  • Redact: Cover signature with opaque black box
  • Ignore: Do not attempt to detect signature
Possible values:
pdfSynthModePolicystring · enumOptional

Possible values:

  • V1: Original mode with incorrect font, size and style
  • V2: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.
  • V5: Style-aware mode backed by the V5 OpenVINO font model
Possible values:
docXTablePolicystring · enumOptional

Possible values:

  • Redact: Treat table content normally, feed into redaction process.
  • Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
llmClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
llmTableClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
labelBlockListsobjectOptional

A list of regexes to match against the specified entity type for exclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"NAME_FAMILY":{"regexes":[".*\\s(disease|syndrom|disorder)"]}}
labelAllowListsobjectOptional

A list of regexes to match against the specified entity type for inclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"HEALTHCARE_ID":{"regexes":["[a-z]{2}\\d{9}"]}}
generatorMetadataobjectOptional

A dictionary mapping entity type names to their transformation metadata configuration.

customPiiEntityIdsstring[]Optional

A list of custom Pii Entity names to use for NER

customEntityRankingModesobjectOptional

Optional per-entity ranking overrides for custom-PII and model-based entities detected in this request. Keys are entity Names (the same identifiers used in Solar.Core.Models.BaseApiRedactionRequest.CustomPiiEntityIds); values control whether the custom entity always wins an exact-boundary overlap against a built-in entity (Prioritized) or is compared by score (Standard). Omit to keep today's behavior of treating every requested custom entity as Prioritized. Supplying a key that does not match any requested custom-PII or model-based entity Name is rejected as a 400 error.

Example: {"MY_CUSTOM_ENTITY":"Standard"}
textstringOptional

The plain text to redact

Example: My name is John Smith
Responses
200

Returns the redacted text

The result of a redaction operation, containing the original text, redacted text, and details of each entity replacement.

originalTextstringOptional

The original input text before redaction.

redactedTextstringOptional

The text after redaction has been applied.

usageinteger · int64Optional

The number of words processed.

post/api/Redact

Bulk plain text

post

Returns a modified version of the provided text strings that redacts or synthesizes the detected entity values. Processes multiple text strings in parallel.

Body

Request model for bulk plain text redaction.

generatorConfigobjectOptional

A dictionary of entity types to their transformation type.

Example: {"NAME_GIVEN":"Redaction","NAME_FAMILY":"Redaction"}
generatorDefaultstring · enumOptional

Possible values:

  • Off: Ignore the PII type
  • Synthesis: Synthesize a new, realistic entity
  • Redaction: Tokenize the entity, e.g. [NAME_GIVEN_ssys5]
  • GroupingSynthesis: Synthesize entities using consistent grouping across the document
  • ReplacementSynthesis: Replace entities with LLM generated values. ReplacementSynthesis is no longer used
Possible values:
docXImagePolicystring · enumOptional

Possible values:

  • Redact: Run images through OCR and redact sensitive text
  • Ignore: Leave images alone
  • Remove: Cover image with opaque black box
Possible values:
rtfImagePolicystring · enumOptional

Possible values:

  • Ignore: Leave images alone
  • Remove: Replace each image with an opaque black box of the same size
Possible values:
docXCommentPolicystring · enumOptional

Possible values:

  • Remove: Remove all comments for file
  • Ignore: Leave comments alone
Possible values:
pdfSignaturePolicystring · enumOptional

Possible values:

  • Redact: Cover signature with opaque black box
  • Ignore: Do not attempt to detect signature
Possible values:
pdfSynthModePolicystring · enumOptional

Possible values:

  • V1: Original mode with incorrect font, size and style
  • V2: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.
  • V5: Style-aware mode backed by the V5 OpenVINO font model
Possible values:
docXTablePolicystring · enumOptional

Possible values:

  • Redact: Treat table content normally, feed into redaction process.
  • Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
llmClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
llmTableClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
labelBlockListsobjectOptional

A list of regexes to match against the specified entity type for exclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"NAME_FAMILY":{"regexes":[".*\\s(disease|syndrom|disorder)"]}}
labelAllowListsobjectOptional

A list of regexes to match against the specified entity type for inclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"HEALTHCARE_ID":{"regexes":["[a-z]{2}\\d{9}"]}}
generatorMetadataobjectOptional

A dictionary mapping entity type names to their transformation metadata configuration.

customPiiEntityIdsstring[]Optional

A list of custom Pii Entity names to use for NER

customEntityRankingModesobjectOptional

Optional per-entity ranking overrides for custom-PII and model-based entities detected in this request. Keys are entity Names (the same identifiers used in Solar.Core.Models.BaseApiRedactionRequest.CustomPiiEntityIds); values control whether the custom entity always wins an exact-boundary overlap against a built-in entity (Prioritized) or is compared by score (Standard). Omit to keep today's behavior of treating every requested custom entity as Prioritized. Supplying a key that does not match any requested custom-PII or model-based entity Name is rejected as a 400 error.

Example: {"MY_CUSTOM_ENTITY":"Standard"}
bulkTextstring[]Optional

An array of text strings to redact. Null entries are preserved as null in the response.

Example: ["My name is John Smith","Jane Doe lives in Atlanta"]
Responses
200

Returns the bulk redacted text

application/json

The result of a bulk redaction operation, containing the original texts, redacted texts, and details of each entity replacement.

bulkTextstring[]Optional

The original input texts before redaction.

bulkRedactedTextstring[]Optional

The texts after redaction has been applied.

usageinteger · int64Optional

The total number of words processed across all texts.

post/api/Redact/bulk
200

Returns the bulk redacted text

JSON

post

Returns a modified version of the JSON that redacts or synthesizes the detected entity values. The redacted JSON has the same structure as the input JSON. Only the primitive JSON values, such as strings and numbers, are modified. Optionally, provide an array of JSONPath expressions in jsonPathIgnorePaths to exclude specific values from redaction.

Body

Request to redact PII from a JSON document.

generatorConfigobjectOptional

A dictionary of entity types to their transformation type.

Example: {"NAME_GIVEN":"Redaction","NAME_FAMILY":"Redaction"}
generatorDefaultstring · enumOptional

Possible values:

  • Off: Ignore the PII type
  • Synthesis: Synthesize a new, realistic entity
  • Redaction: Tokenize the entity, e.g. [NAME_GIVEN_ssys5]
  • GroupingSynthesis: Synthesize entities using consistent grouping across the document
  • ReplacementSynthesis: Replace entities with LLM generated values. ReplacementSynthesis is no longer used
Possible values:
docXImagePolicystring · enumOptional

Possible values:

  • Redact: Run images through OCR and redact sensitive text
  • Ignore: Leave images alone
  • Remove: Cover image with opaque black box
Possible values:
rtfImagePolicystring · enumOptional

Possible values:

  • Ignore: Leave images alone
  • Remove: Replace each image with an opaque black box of the same size
Possible values:
docXCommentPolicystring · enumOptional

Possible values:

  • Remove: Remove all comments for file
  • Ignore: Leave comments alone
Possible values:
pdfSignaturePolicystring · enumOptional

Possible values:

  • Redact: Cover signature with opaque black box
  • Ignore: Do not attempt to detect signature
Possible values:
pdfSynthModePolicystring · enumOptional

Possible values:

  • V1: Original mode with incorrect font, size and style
  • V2: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.
  • V5: Style-aware mode backed by the V5 OpenVINO font model
Possible values:
docXTablePolicystring · enumOptional

Possible values:

  • Redact: Treat table content normally, feed into redaction process.
  • Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
llmClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
llmTableClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
labelBlockListsobjectOptional

A list of regexes to match against the specified entity type for exclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"NAME_FAMILY":{"regexes":[".*\\s(disease|syndrom|disorder)"]}}
labelAllowListsobjectOptional

A list of regexes to match against the specified entity type for inclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"HEALTHCARE_ID":{"regexes":["[a-z]{2}\\d{9}"]}}
generatorMetadataobjectOptional

A dictionary mapping entity type names to their transformation metadata configuration.

customPiiEntityIdsstring[]Optional

A list of custom Pii Entity names to use for NER

customEntityRankingModesobjectOptional

Optional per-entity ranking overrides for custom-PII and model-based entities detected in this request. Keys are entity Names (the same identifiers used in Solar.Core.Models.BaseApiRedactionRequest.CustomPiiEntityIds); values control whether the custom entity always wins an exact-boundary overlap against a built-in entity (Prioritized) or is compared by score (Standard). Omit to keep today's behavior of treating every requested custom entity as Prioritized. Supplying a key that does not match any requested custom-PII or model-based entity Name is rejected as a 400 error.

Example: {"MY_CUSTOM_ENTITY":"Standard"}
jsonTextstring · min: 1Required

The JSON body to redact

Example: {"Name": "John Smith", "Description": "John lives in Atlanta, Ga."}
jsonPathAllowListsobjectOptional

Optional mapping of JSON paths to entity labels

Example: {"NAME_GIVEN":["$.name.first"]}
jsonPathIgnorePathsstring[]Optional

Optional array of JSONPath expressions for values that should not be redacted. Any JSON element matching these paths will be left unchanged in the output.

Example: ["$.id","$.metadata.timestamp"]
Responses
200

Returns the redacted JSON

The result of a redaction operation, containing the original text, redacted text, and details of each entity replacement.

originalTextstringOptional

The original input text before redaction.

redactedTextstringOptional

The text after redaction has been applied.

usageinteger · int64Optional

The number of words processed.

post/api/Redact/json

XML

post

Returns a modified version of the XML that redacts or synthesizes the detected entity values. The redacted XML has the same structure as the input XML. Only the XML inner text and attribute values are modified.

Body

Request to redact PII from an XML document.

generatorConfigobjectOptional

A dictionary of entity types to their transformation type.

Example: {"NAME_GIVEN":"Redaction","NAME_FAMILY":"Redaction"}
generatorDefaultstring · enumOptional

Possible values:

  • Off: Ignore the PII type
  • Synthesis: Synthesize a new, realistic entity
  • Redaction: Tokenize the entity, e.g. [NAME_GIVEN_ssys5]
  • GroupingSynthesis: Synthesize entities using consistent grouping across the document
  • ReplacementSynthesis: Replace entities with LLM generated values. ReplacementSynthesis is no longer used
Possible values:
docXImagePolicystring · enumOptional

Possible values:

  • Redact: Run images through OCR and redact sensitive text
  • Ignore: Leave images alone
  • Remove: Cover image with opaque black box
Possible values:
rtfImagePolicystring · enumOptional

Possible values:

  • Ignore: Leave images alone
  • Remove: Replace each image with an opaque black box of the same size
Possible values:
docXCommentPolicystring · enumOptional

Possible values:

  • Remove: Remove all comments for file
  • Ignore: Leave comments alone
Possible values:
pdfSignaturePolicystring · enumOptional

Possible values:

  • Redact: Cover signature with opaque black box
  • Ignore: Do not attempt to detect signature
Possible values:
pdfSynthModePolicystring · enumOptional

Possible values:

  • V1: Original mode with incorrect font, size and style
  • V2: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.
  • V5: Style-aware mode backed by the V5 OpenVINO font model
Possible values:
docXTablePolicystring · enumOptional

Possible values:

  • Redact: Treat table content normally, feed into redaction process.
  • Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
llmClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
llmTableClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
labelBlockListsobjectOptional

A list of regexes to match against the specified entity type for exclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"NAME_FAMILY":{"regexes":[".*\\s(disease|syndrom|disorder)"]}}
labelAllowListsobjectOptional

A list of regexes to match against the specified entity type for inclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"HEALTHCARE_ID":{"regexes":["[a-z]{2}\\d{9}"]}}
generatorMetadataobjectOptional

A dictionary mapping entity type names to their transformation metadata configuration.

customPiiEntityIdsstring[]Optional

A list of custom Pii Entity names to use for NER

customEntityRankingModesobjectOptional

Optional per-entity ranking overrides for custom-PII and model-based entities detected in this request. Keys are entity Names (the same identifiers used in Solar.Core.Models.BaseApiRedactionRequest.CustomPiiEntityIds); values control whether the custom entity always wins an exact-boundary overlap against a built-in entity (Prioritized) or is compared by score (Standard). Omit to keep today's behavior of treating every requested custom entity as Prioritized. Supplying a key that does not match any requested custom-PII or model-based entity Name is rejected as a 400 error.

Example: {"MY_CUSTOM_ENTITY":"Standard"}
xmlTextstringOptional

The XML document redact

Example: <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
Responses
200

Returns the redacted XML

The result of a redaction operation, containing the original text, redacted text, and details of each entity replacement.

originalTextstringOptional

The original input text before redaction.

redactedTextstringOptional

The text after redaction has been applied.

usageinteger · int64Optional

The number of words processed.

post/api/Redact/xml

HTML

post

Returns a modified version of the HTML that redacts or synthesizes the detected entity values. The redacted HTML has the same structure as the input HTML. Only the text contained in the HTML elements is modified.

Body

Request to redact PII from an HTML document.

generatorConfigobjectOptional

A dictionary of entity types to their transformation type.

Example: {"NAME_GIVEN":"Redaction","NAME_FAMILY":"Redaction"}
generatorDefaultstring · enumOptional

Possible values:

  • Off: Ignore the PII type
  • Synthesis: Synthesize a new, realistic entity
  • Redaction: Tokenize the entity, e.g. [NAME_GIVEN_ssys5]
  • GroupingSynthesis: Synthesize entities using consistent grouping across the document
  • ReplacementSynthesis: Replace entities with LLM generated values. ReplacementSynthesis is no longer used
Possible values:
docXImagePolicystring · enumOptional

Possible values:

  • Redact: Run images through OCR and redact sensitive text
  • Ignore: Leave images alone
  • Remove: Cover image with opaque black box
Possible values:
rtfImagePolicystring · enumOptional

Possible values:

  • Ignore: Leave images alone
  • Remove: Replace each image with an opaque black box of the same size
Possible values:
docXCommentPolicystring · enumOptional

Possible values:

  • Remove: Remove all comments for file
  • Ignore: Leave comments alone
Possible values:
pdfSignaturePolicystring · enumOptional

Possible values:

  • Redact: Cover signature with opaque black box
  • Ignore: Do not attempt to detect signature
Possible values:
pdfSynthModePolicystring · enumOptional

Possible values:

  • V1: Original mode with incorrect font, size and style
  • V2: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.
  • V5: Style-aware mode backed by the V5 OpenVINO font model
Possible values:
docXTablePolicystring · enumOptional

Possible values:

  • Redact: Treat table content normally, feed into redaction process.
  • Remove: Replace all characters and symbols in table with a placeholder.
Possible values:
llmClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
llmTableClassificationPolicystring · enumOptional

Possible values:

  • Disabled: Do not use LLM for structured data classification
  • Enabled: Use LLM to classify structured data for PII detection
Possible values:
labelBlockListsobjectOptional

A list of regexes to match against the specified entity type for exclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"NAME_FAMILY":{"regexes":[".*\\s(disease|syndrom|disorder)"]}}
labelAllowListsobjectOptional

A list of regexes to match against the specified entity type for inclusion. Legacy strings inputs are accepted and normalized into regexes.

Example: {"HEALTHCARE_ID":{"regexes":["[a-z]{2}\\d{9}"]}}
generatorMetadataobjectOptional

A dictionary mapping entity type names to their transformation metadata configuration.

customPiiEntityIdsstring[]Optional

A list of custom Pii Entity names to use for NER

customEntityRankingModesobjectOptional

Optional per-entity ranking overrides for custom-PII and model-based entities detected in this request. Keys are entity Names (the same identifiers used in Solar.Core.Models.BaseApiRedactionRequest.CustomPiiEntityIds); values control whether the custom entity always wins an exact-boundary overlap against a built-in entity (Prioritized) or is compared by score (Standard). Omit to keep today's behavior of treating every requested custom entity as Prioritized. Supplying a key that does not match any requested custom-PII or model-based entity Name is rejected as a 400 error.

Example: {"MY_CUSTOM_ENTITY":"Standard"}
htmlTextstringOptional

The HTML document redact

Example: <!DOCTYPE html> <html> <body> <h1>Account Information</h1> <p>Account Holder: John Smith</p> </body> </html>
Responses
200

Returns the redacted HTML

The result of a redaction operation, containing the original text, redacted text, and details of each entity replacement.

originalTextstringOptional

The original input text before redaction.

redactedTextstringOptional

The text after redaction has been applied.

usageinteger · int64Optional

The number of words processed.

post/api/Redact/html

Last updated

Was this helpful?