Text Redaction

JSON

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.

post/api/Redact/json

Request body

generatorConfigobject

A dictionary of entity types to their transformation type.

generatorDefault'Off' | 'Synthesis' | 'Redaction' | 'GroupingSynthesis' | 'ReplacementSynthesis'
<p>Possible values:</p> <ul> <li><b>Off</b>: Ignore the PII type</li> <li><b>Synthesis</b>: Synthesize a new, realistic entity</li> <li><b>Redaction</b>: Tokenize the entity, e.g. [NAME_GIVEN_ssys5]</li> <li><b>GroupingSynthesis</b>: Synthesize entities using consistent grouping across the document</li> <li><b>ReplacementSynthesis</b>: Replace entities with LLM generated values. ReplacementSynthesis is no longer used</li> </ul>
docXImagePolicy'Redact' | 'Ignore' | 'Remove'
<p>Possible values:</p> <ul> <li><b>Redact</b>: Run images through OCR and redact sensitive text</li> <li><b>Ignore</b>: Leave images alone</li> <li><b>Remove</b>: Cover image with opaque black box</li> </ul>
rtfImagePolicy'Ignore' | 'Remove'
<p>Possible values:</p> <ul> <li><b>Ignore</b>: Leave images alone</li> <li><b>Remove</b>: Replace each image with an opaque black box of the same size</li> </ul>
docXCommentPolicy'Remove' | 'Ignore'
<p>Possible values:</p> <ul> <li><b>Remove</b>: Remove all comments for file</li> <li><b>Ignore</b>: Leave comments alone</li> </ul>
pdfSignaturePolicy'Redact' | 'Ignore'
<p>Possible values:</p> <ul> <li><b>Redact</b>: Cover signature with opaque black box</li> <li><b>Ignore</b>: Do not attempt to detect signature</li> </ul>
pdfSynthModePolicy'V1' | 'V2' | 'V5'
<p>Possible values:</p> <ul> <li><b>V1</b>: Original mode with incorrect font, size and style</li> <li><b>V2</b>: Legacy style-aware mode. Persisted V2 values now use the V5 font detector.</li> <li><b>V5</b>: Style-aware mode backed by the V5 OpenVINO font model</li> </ul>
docXTablePolicy'Redact' | 'Remove'
<p>Possible values:</p> <ul> <li><b>Redact</b>: Treat table content normally, feed into redaction process.</li> <li><b>Remove</b>: Replace all characters and symbols in table with a placeholder.</li> </ul>
llmClassificationPolicy'Disabled' | 'Enabled' | 'PdfIdentificationAndSynthesis'
<p>Possible values:</p> <ul> <li><b>Disabled</b>: Do not use LLM for structured data classification</li> <li><b>Enabled</b>: Use LLM to classify structured data for PII detection</li> <li><b>PdfIdentificationAndSynthesis</b>: Use an LLM instead of the NER model and C# generators for PDF PII identification and synthesis. Other file types continue to use their existing detection and synthesis paths.</li> </ul>
llmTableClassificationPolicy'Disabled' | 'Enabled' | 'PdfIdentificationAndSynthesis'
<p>Possible values:</p> <ul> <li><b>Disabled</b>: Do not use LLM for structured data classification</li> <li><b>Enabled</b>: Use LLM to classify structured data for PII detection</li> <li><b>PdfIdentificationAndSynthesis</b>: Use an LLM instead of the NER model and C# generators for PDF PII identification and synthesis. Other file types continue to use their existing detection and synthesis paths.</li> </ul>
labelBlockListsobject

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

labelAllowListsobject

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

generatorMetadataobject

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

customPiiEntityIdsstring[] nullable

A list of custom Pii Entity names to use for NER

customEntityRankingModesobject nullable

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.

customEntityConfidenceThresholdsobject nullable

Optional per-entity minimum detection confidence thresholds 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); each value is in (0, 1], and detections for that entity whose score falls below it are ignored. Omit to keep today's behavior of no confidence cutoff. Supplying a key that does not match any requested custom-PII or model-based entity Name, or a value outside (0, 1], is rejected as a 400 error.

jsonTextstring required

The JSON body to redact

jsonPathAllowListsobject

Optional mapping of JSON paths to entity labels

jsonPathIgnorePathsstring[] nullable

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 request

{
  "generatorConfig": {
    "NAME_GIVEN": "Redaction",
    "NAME_FAMILY": "Redaction"
  },
  "labelBlockLists": {
    "NAME_FAMILY": {
      "regexes": [
        ".*\\s(disease|syndrom|disorder)"
      ]
    }
  },
  "labelAllowLists": {
    "HEALTHCARE_ID": {
      "regexes": [
        "[a-z]{2}\\d{9}"
      ]
    }
  },
  "customEntityRankingModes": {
    "MY_CUSTOM_ENTITY": "Standard"
  },
  "customEntityConfidenceThresholds": {
    "MY_CUSTOM_ENTITY": 0.5
  },
  "jsonText": "{\"Name\": \"John Smith\", \"Description\": \"John lives in Atlanta, Ga.\"}",
  "jsonPathAllowLists": {
    "NAME_GIVEN": [
      "$.name.first"
    ]
  },
  "jsonPathIgnorePaths": [
    "$.id",
    "$.metadata.timestamp"
  ]
}

Response

Returns the redacted JSON

originalTextstring

The original input text before redaction.

redactedTextstring

The text after redaction has been applied.

usageinteger

The number of words processed.