Features

The privacy sidecar for your AI and RAG flows. What it does, explained simply: technical details live in the Docs.

Original text
Sono Marco Rossi, scrivimi a [email protected].
Protected text
Sono [NOME_1], scrivimi a [EMAIL_1].

Two ways to protect data

Choose how to replace sensitive data. Switch the mode and watch the result.

Tag mode: data becomes stable placeholders like [NOME_1]. Perfect to find and restore them when needed.

You get clean text back, tags in the JSON

The API returns the already-protected text and, separately, a map of what was replaced. Your software always knows what was there, without exposing data in the text.

i Original values appear only if you are admin (include_entity_values). Otherwise you only see the tags.
POST /v1/anonymize 200 OK
{
  "text": "Sono [NOME_1], scrivimi a [EMAIL_1].",
  "entities": [
    { "tag": "[NOME_1]", "type": "PERSON", "value": "Marco Rossi" },
    { "tag": "[EMAIL_1]", "type": "EMAIL", "value": "[email protected]" }
  ],
  "reversible": true
}
context_type: "fine_appeal"
Fiscal code, name and phone → protected
Fine date → kept (the text needs it)
Mode and surrogates → set automatically

One word configures everything

You send a single field, context_type, and the system sets policy, mode and what to protect by itself. No rules to rewrite on every call.

Fake data, in the right format

Faker generates realistic values; for Italian formats such as the fiscal code, the core uses a dedicated encoder instead of treating it as a random string.

Real
Mario Rossi · RSSMRA80A01H501U
Valid surrogate
Luca Bianchi · BNCLCU80A01F205X
Detection example 01
Input
Mario Rossi · RSSMRA80A01H501U · IT60X0542811101000001234567
Detected entities
PERSON · FISCAL_CODE · IBAN

DB regex wins over ML layers on overlaps

4-layer detection

The engine combines Presidio + spaCy, privacy-filter, AI4Privacy and DB-configurable regex. When detections overlap, the most reliable layer wins: DB regex has the highest priority for certain formats such as fiscal codes, IBANs, emails, phones and plates.

Reversible tag mode

Personal data becomes stable context-bound tokens such as [PERSON_1] or [FISCAL_CODE_1]. The token-value mapping is stored encrypted and can restore the text through /v1/deanonymize.

Before and after 02
Original
Mr. Mario Rossi, CF RSSMRA80A01H501U
Protected
Mr. [PERSON_1], CF [FISCAL_CODE_1]

Same value + same context_id = same token

Realistic surrogates 03
Original
Mr. Mario Rossi, IBAN IT60X0542811101000001234567
Surrogate
Mr. Luca Bianchi, IBAN IT29P0306901789100000046169

Generated deterministically from value, context_id and language

Deterministic surrogate mode

For RAG, embeddings and testing, real data is replaced with fake but realistic, format-preserving values. The text remains useful for AI while real PII stays out of the model path.

Format-preserving Italian fiscal code

Italian Faker can generate valid fiscal codes, but it does not automatically bind them to a separately generated name. The core therefore includes a dedicated CF encoder: when a CF surrogate is needed, it is built as a valid code, not as a random string.

Italian format 04
Real
Mario Rossi · RSSMRA80A01H501U
Valid synthetic CF
Luca Bianchi · BNCLCU85M12F205X

This is not guaranteed by vanilla Faker: it requires application logic

Resolved policy 05
Request
context_type: "fine_appeal"
Effect
Protects PERSON, CF, EMAIL, PHONE · keeps DATE, LAW_REF, TARGA

Precedence: inline request > domain policy > registry

Context types and domain policies

One field, context_type, selects policy, mode and rules. A fine appeal can keep date and plate because they matter to the case, while a contract workflow can protect plates, companies and financial references.

Registry of about 33 PII types

The registry covers identity, contact, financial, legal, vehicle, network and credential data. Each type has category, default action, faker strategy, reversibility and enabled state.

Categories 06
Types
IDENTITY · CONTACT · FINANCIAL · LEGAL · VEHICLE · NETWORK · CREDENTIAL
Examples
FISCAL_CODE, EMAIL, IBAN, TARGA, API_KEY, SECRET

Governable from the Admin UI with no code change

Contextual rule 07
Before
born in Rome on 01/03/1980 → DATE
After
01/03/1980 → DATE_BORN

Hot-reloaded from database, no restart

Runtime tuning: regex, denylist and reclassification

Operators can fix false positives, add patterns and reclassify entities from surrounding context. A date near "born in ... on", for example, can become DATE_BORN.

Audit log, API keys and roles

Each call can be tracked with action, entity count, context type and the key used. API keys support admin, service and auditor roles, with optional expiry.

Audit event 08
Call
POST /v1/anonymize · role: service
Log
action=anonymize · entities=3 · context_type=fine_appeal

Separate app integration from administrative access

Locale-aware 09
Request
language: "en" · mode: "surrogate"
Output
John Smith → Michael Johnson · +1 phone format

Models and default language managed from UI

Multi-language and Admin UI

The core supports spaCy NER for IT, EN, DE, FR, ES and PT; surrogates use a locale consistent with the requested language. The Admin UI manages runtime language, policies, regex, denylist, context types and keys.

Mask mode — irreversible redaction

POST /v1/mask replaces sensitive data without storing any mapping. Fill style preserves text length (████); label style inserts the type in brackets ([PERSON]). The mask character is configurable per request.

Fill vs label 10
Original
Contact Mario Rossi at 333-1234567
Masked
Contact ██████████ at ███████████

No mapping stored — cannot be reversed

Before and after 11
Original
Reach me at [email protected] for info.
After removal
Reach me at for info.

Configurable per type via domain policy or inline request

Remove mode — erase the value

Configure remove_types in the domain policy or inline to replace PII spans with an empty string. The resulting text is shorter at the removed positions. No mapping is saved.

Block mode — reject the request

Types in block_types cause an HTTP 422 if detected in the text, before any processing. The check runs on all detected entities, even those not in protect_types. CREDIT_CARD and SECRET are blocked by default.

Behaviour 12
Request containing a credit card
"4111 1111 1111 1111" in the text
Response
HTTP 422 · PII_BLOCKED · blocked_types: ["CREDIT_CARD"]

Configure block_types in domain policy or per-request inline

Deterministic tokens 13
Original
Mario Rossi · RSSMRA80A01H501U · [email protected]
Pseudonymized
PSE_a3f1b2c4 · PSE_d7e8f901 · PSE_9a0b1c2d

Same real value → same token (determinism guaranteed per context + key)

Pseudonymization — separate reversible tokens

POST /v1/pseudonymize replaces data with deterministic reversible tokens stored in a keystore separate from anonymization. Useful for analytics pipelines that require unlinkability but must retain the ability for authorised recovery.

Real-time Alerts and Webhooks

Configure alert rules for Inbox, Email, Slack and Microsoft Teams, or HTTP webhooks that fire on any PII engine event. Filter by data type, category, context or minimum number of detected entities.

Event sent 14
Trigger
POST /v1/anonymize → detect.pii_detected
Webhook payload
{ "event": "detect.pii_detected", "pii_types": ["FISCAL_CODE","EMAIL"], "entity_count": 2 }

Conditional filters by PII type, category, context and entity threshold