POST
/
v01
/
mask

Body

text
string

The string you want to mask sensitive information from. A simple example could be "My name is Adam. I am 35 and work at Google." Adam, 35, and Google will trigger our systems and be labelled as PERSON, AGE and ORG. This one was trivial, but we cover most PIIs you’ll likely need. Explore all the natively covered entity types.


You can create your own policies to toggle on/off some entity types. Or even add your custom entity types, that we’ll fine-tune on your data. Read more.
context (opt)
list[Entity]

Optionally, you can also give context about what has been masked before. This avoids masking twice the same entities in repeated calls, in say, a conversational setting. This enables you to keep a growing context when integrating filtro into chatbots.


We’ve made it easy to chain calls. You can directly use the list[Entity] object you’ll receive from this query response in your next call to mask.

Response

masked
string

The resulting string with sensitive information masked out. For above example you might get "My name is Sarah. I am 26 and work at Apple." Generation is random, but we make sure downstream LLMs will still be able to operate fine on their tasks.

entities
list[Entity]

The list of detected entities, with confidence scores and their mapping.
Recalling that one Entity type is in fact a json object with these fields

{
  "entity_type": "PERSON",
  # detected entity
  "text": "Adam",
  "start_idx": 11,
  "end_idx": 15,
  # obfuscation info
  "mask": "Sarah",
  "mask_start_idx": 11,
  "mask_end_idx": 16,
  # confidence score
  "score": 0.99
}