Skip to main content

Redact sensitive data from several texts

POST 

/api/v2/privacyfilter/batch

Same detection as the redact method over a set of texts in a single round trip, answering one result per input in the same order.

Request​

Body

required

    inputs string[]nullable

    Texts to scan for sensitive data, answered with one result each in the same order.

    placeholders boolean

    Whether the returned texts have 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

  • Array [

  • 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...