RS Infer
Server Endpoints

/pii/redact

Detect and redact PII. Runs detection then applies the `mode`: - `mask` (default): replace each entity with `mask_char` (default `*`) repeated to the entity length. - `remove`: drop the entity text entirely.

POST
/pii/redact

Detect and redact PII. Runs detection then applies the mode:

  • mask (default): replace each entity with mask_char (default *) repeated to the entity length.
  • remove: drop the entity text entirely.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/pii/redact" \  -H "Content-Type: application/json" \  -d '{    "model": "ai4privacy",    "text": "Email john@example.com — John Smith",    "mode": "mask",    "mask_char": "*"  }'
{  "object": "pii.redact",  "model": "string",  "results": [    {      "text": "string",      "entities": [        {          "entity_type": "string",          "text": "string",          "score": 0.1,          "start": 0,          "end": 0        }      ]    }  ],  "usage": {    "prompt_tokens": 0,    "total_tokens": 0  }}