Saltar al contenido principal

Redact sensitive data from a text

POST 

/api/v2/privacyfilter/redact

Detects sensitive data in a single text and returns the redacted text along with the spans that were found.

Request​

Body

required

    inputs stringnullable

    Text to scan for sensitive data.

    placeholders boolean

    Whether the returned text has each detected span replaced by an indexed placeholder. Defaults to true.

    categories string[]nullable

    Entity categories to restrict detection to, taken from the info method's labels. Detects every category when omitted.

Responses​

Success

Schema

    text stringnullable

    Input text with every detected span redacted.

    spans

    object[]

    nullable

    Detected sensitive spans, positioned against the original text.

  • Array [

  • entity_group stringnullable

    Detected category, one of the labels reported by the info method.

    score double

    Detection confidence, between 0 and 1.

    word stringnullable

    Matched text.

    start int32

    Start offset in the original text, as a Unicode code point index.

    end int32

    End offset in the original text, as a Unicode code point index.

    placeholder stringnullable

    Placeholder this span was replaced with, when placeholders were requested.

  • ]

Loading...