Data protection
Detection modes, the 61-detector library, entity detection and its selectable models, security scanning, the model notice, and retention.
Data protection runs on every request before dispatch. The default mode is tokenize: each detected value without a matching exception is swapped for a stable typed token like «EMAIL_1».
Protected values reach the provider only as tokens, and the response is restored to the real values on its way back to you, streamed or not.
The token map lives in memory for the life of the request and is never persisted. Pseudonymization is one way: it protects what you send out.
In Sluis Workspace, public web search results and the model's own output from earlier in the same turn are not newly tokenized. A value the conversation already tokenized stays replaced by its token, and the audit log records when this applied.
# tokenize mode (the default): what you send curl https://api.sluis.ai/v1/chat/completions \ -H "Authorization: Bearer $SLUIS_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "sluis/auto", "messages": [{ "role": "user", "content": "Mail j.devries@acme.nl that IBAN NL91ABNA0417164300 is active." }] }'
# what the model provider receives: only stable typed tokens { "role": "user", "content": "Mail «EMAIL_1» that IBAN «IBAN_1» is active." }
# what you get back: restored at the single client egress, streaming included { "choices": [{ "message": { "role": "assistant", "content": "Draft: Dear j.devries@acme.nl, your account NL91ABNA0417164300 is active…" } }] }
Four modes decide what happens to a detected value:
tokenize(the default) swaps it for a reversible token.maskrewrites it irreversibly.blockrefuses the request with422.allow_logpasses it through while flagging the audit row.

61 built-in detectors ship out of the box: 29 for personal data, from the US Social Security number to national IDs validated with the checksum, date or format rules of each country, and 32 for secrets and credentials. Each one can be toggled per organisation. Custom terms (plain or regex) cover anything specific to your business, and a custom-term label can be up to 32 characters:
Pattern exceptions
In Console › Data protection › Exceptions, add literal text or a regular expression for values you intentionally want to leave unchanged, such as the public mailbox support@northbridge.example.
- Literal patterns ignore letter case, including Unicode letters.
- Regular expressions use Rust regex syntax and are case-sensitive unless you add
(?i). - One exception match in the original text must contain the entire detected value. A partial match is not enough; separate adjacent or overlapping matches are never combined.
Use narrow patterns. An excepted value is not tokenized, masked or used to block the request, so its original text may reach the model provider. Other detected values stay protected.
Exceptions apply to built-in and custom detectors, name recognition, dictionaries and local or hosted entity recognition, including protected document and embedding text. They do not disable prompt-injection scanning or other security checks. Explicit removal terms in sluis.remove or a document request always take precedence.

Entity detection
Persons, organizations and locations are hard to catch by pattern alone. Sluis combines several layers:
- context heuristics
- email correlation
- a tenant name directory
- shipped dictionaries
- optional NER (named entity recognition)
The NER model runs as a network-internal sidecar, so text stays inside the deployment perimeter. These layers also inspect extracted document and OCR text when document protection is enabled.
- With NER on, one request may name up to 100,000 distinct entities and 6.4 million characters of text. Past that ceiling the scan counts as incomplete.
- A name the model detects once is replaced wherever it recurs in the request: the same whole word, with the same casing and the same token, including messages where the model did not report it.
- Lone generic words and short acronyms only cover the place the model reported.
Name dictionary
The name dictionary is the deterministic counterpart to NER: given names and surnames compiled from government open data into a dictionary that ships inside the gateway.
- It matches full names and honorific-anchored names with no added latency and nothing leaving your perimeter.
- Names that are also ordinary words only match with name-shaped context around them.
- Rare names remain the job of the directory or NER.
NER model options
Choose Basic, Expanded or Deep in Data protection.
- Basic is the default for new organisations. It uses built-in detectors and six deterministic name layers, with no model call.
- Expanded adds Swift (spaCy).
- Deep adds GLiNER2-PII instead. It costs more processing time, not a guarantee of higher recall.
- Custom allows individual tuning.
Both model profiles require complete inspection and block model failures or incomplete scans.
- Existing policies, exclusions, directories and workload overrides remain unchanged.
- Unknown-word detection stays off in all three profiles.
- A workload can choose an available NER model even when the organisation default is off.
Billing
- AI name recognition is billed once per customer request it inspects: €0.005 with Swift (Expanded), €0.01 with GLiNER2 (Deep). Basic is included.
- Follow-up calls Sluis makes within that request are not billed again, and an incomplete inspection costs nothing.
- Each charge is a linked audit receipt that counts toward your budgets.
Latency
- Deep adds substantial latency before your chosen model starts generating a response.
- Swift and GLiNER2 scan time grows with input length, message count and load.
- There is no deadline: under load a request waits in a queue instead of being refused, and it only ends if you disconnect. This is not a speed guarantee.
- Optional hosted LLM inspection adds a separate wait before response generation, depending on input length, provider load and retries.

| Model | Coverage | Measured accuracy | Latency |
|---|---|---|---|
| swift · spaCy xx_ent_wiki_sm | multilingual, basic | all-entity F1 0.58 · person F1 0.72 · recall ~0.53 | 3.5 ms p50 (CPU, 919 chars, 30 runs) |
| deep · GLiNER2-PII (mDeBERTa-v3, Apache-2.0) | 7 trained languages (EN, FR, ES, DE, IT, PT, NL) + multilingual backbone transfer | all-entity F1 0.61 · person F1 0.76 · recall ~0.70 | 521.5 ms p50 (CPU, 919 chars, 30 runs) |
Measured 2026-08-12 on an internal benchmark: WikiANN test sentences in six languages (NL, EN, DE, FR, ES, IT; 150 per language), scored as micro-F1 over (label, text) pairs at text level with the production false-positive filter applied, on an Apple-silicon dev machine at FP32. WikiANN is Wikipedia-domain, silver-standard data and spaCy's home turf. Read the numbers as relative guidance between the tiers, not absolute field accuracy.
Security scanning
Prompt-injection and jailbreak detection is opt-in and runs at the gate, before dispatch. It has three modes: off | log | block.
offskips the scan.logrecords findings without blocking traffic.blockrefuses detected attacks. It fails closed when Prompt Guard is unavailable or classification fails or is incomplete. There is no automatic model fallback.
How scanning works
- Security always uses Llama Prompt Guard 2 86M (
sluis/prompt-guard-2-86m), inside Sluis, with no external transfer of scan text. - Overlapping windows of at most 512 model tokens preserve segment boundaries, within a total scan budget of 4096 to 65536 tokens (8192 by default).
- The detection threshold is fixed at 0.8.
- Long inputs use selected excerpts. A safe result covers only the inspected text, not the full input. The audit record keeps the inspected and total bytes.
- Scanning follows data protection, which can retain personal data when it is off or logging only.
- Scans add variable latency. They wait for the scanner until it answers or the caller disconnects, and there is no scan deadline.
Cost and audit
- €0.01 per completed logical scan, once regardless of windows or verdict, including sampled-safe results. No token surcharge.
- Off, preflight refusals and technical failures are not charged.
- Each scan has a separate, linked billable audit entry:
security.scan. Charges can still apply when the parent request is blocked or served from cache. - Workload overrides can change the scan mode.
- Separately, optional Nemotron privacy inspection uses Nebul under your residency policy and is token-priced.
Built with Llama. Meta Llama 4 Community License.
Anomaly detection
Opt-in key-behaviour anomaly detection runs as a background job with zero request latency: per-key baselines from robust statistics with hour-of-week seasonality, plus a multivariate isolation-forest layer.
Alerts are explainable, never a bare score. They appear in the Console's Security view, optionally by email.

Model notice
When tokenization rewrote a request, Sluis injects a leading system message telling the model the «…» tokens are opaque placeholders it must keep intact. That is what keeps the restore reliable. It is on by default, and you can customise or disable it per organisation.
Retention & audit fidelity
Content retention keeps request and response bodies for the audit log. It is on by default and encrypted at rest.
- Audit fidelity chooses whether retained content stores the tokens or the original values.
- Retained content expires after 30 days by default. In the Console's Data protection view you can set another period in days (1 to 36,500) or keep it indefinitely.
- A daily purge applies the current period to content already stored, so shortening it also removes older content.
- Content from Sluis Workspace chats is deleted after the shorter of that period and the Workspace period for personal values in chats (7 days by default).
- The audit metadata ledger is kept and never altered.
- Turn retention off for a metadata-only ledger. That also disables the response cache.

Document anonymization
Send a docx, pdf, image or text file to POST /v1/documents/anonymize and the same document comes back with personal data and secrets replaced by merge tags like «PERSON_NAME_1» in text, and blurred out of images and PDF pages.
- Processing is local to the gateway, OCR included. The operation is sealed in the audit chain and metered per page or image.
- Redacted PDFs keep an invisible searchable text layer built from the anonymized text.
- For large documents, enqueue an async job and collect the result later through a time-limited signed URL.
- On scans, lines the OCR cannot read reliably (signatures, illegible handwriting) and ink outside every recognised text line (initials, stamps) are destroyed rather than guessed at. They read
«UNREADABLE»in the text layer, and the response reports theUNREADABLE_REDACTEDcategory.
Token mapping
The synchronous endpoint returns the token mapping only when you ask for it (include_mapping: true) and the caller is entitled: a workload with documents and documents_reidentify, or a console owner or admin. The mapping is sealed in the audit chain as counts and a hash, and is never stored. Async jobs reject mapping requests with 422.
In transit
The same protection works in transit. With the dlp_documents policy on, files uploaded through /v1/files and inline OCR documents are anonymized before they leave toward a provider, refused under block, and scanned under allow_log.

# enqueue a large document (202 + job id; Idempotency-Key honoured) curl https://api.sluis.ai/v1/documents/anonymize/jobs \ -H "Authorization: Bearer $SLUIS_KEY" \ -F file=@archive.pdf # poll until succeeded; the signed download_url then needs no API key curl https://api.sluis.ai/v1/documents/anonymize/jobs/9c31… \ -H "Authorization: Bearer $SLUIS_KEY"
{
"id": "9c31…",
"state": "succeeded",
"filename": "archive.pdf",
"summary": { "pages": 12, "images": 3, "categories": ["PERSON_NAME", "EMAIL"], "downgraded": false },
"download_url": "https://api.sluis.ai/v1/documents/deliverables/9c31…?tenant=…&exp=…&sig=…"
}Embeddings
Pseudonymized tokens are stable within one request, not across requests, so embeddings of tokenized text may not match between calls.
The dlp_embeddings policy setting controls whether the scan covers /v1/embeddings. It is on by default. Setting it to off sends embedding inputs to the provider unscanned, and every exempted call is recorded in the audit trail.
Per-request removal terms
Any JSON request on the data plane (chat completions, completions, embeddings, responses and the native Anthropic ingresses) may carry a top-level sluis extension with a remove list. It names the terms the gateway must remove from the prompt before dispatch.
- Each entry is a bare string, or an object with a
textand akindofperson | organization | location | term. - At most 128 entries. Each must be non-empty after trimming and at most 256 characters.
- Matching is word-boundary and case-insensitive.
- The extension is a gateway construct. It is always stripped before dispatch and never reaches a provider, the cache or retained content.
# name the terms the gateway must remove: the top-level "sluis" object never leaves the gateway curl https://api.sluis.ai/v1/chat/completions \ -H "Authorization: Bearer $SLUIS_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "mistral/mistral-large-latest", "messages": [{ "role": "user", "content": "Bas Alderding did a good job, send an email explaining how happy you are with that" }], "sluis": { "remove": [{ "text": "Bas Alderding", "kind": "person" }, "Project Nightingale"] } }' # provider receives → "«PERSON_NAME_1» did a good job, send an email explaining how happy you are with that" # you receive back → "Dear Bas Alderding, I am delighted with your work on Project Nightingale…" # audit note → dlp:tokenize:person_name(request)|dlp:tokenize:term(request)
# the OpenAI SDKs forward the gateway extension through extra_body resp = client.chat.completions.create( model="mistral/mistral-large-latest", messages=[{"role": "user", "content": "Bas Alderding did a good job…"}], extra_body={"sluis": {"remove": [{"text": "Bas Alderding", "kind": "person"}]}}, ) # the originals are restored on the way out: the provider only ever saw «PERSON_NAME_1» print(resp.choices[0].message.content)
What happens to a match
Every match becomes a reversible token such as «PERSON_NAME_1» that joins the normal pseudonymization pass:
- Under
tokenize, the default, the original values are restored in the response, streaming included. - Under
maskthe term is replaced by[REDACTED:<kind>]. - Under
blockthe request is refused with422.
The instruction is always honoured, even when the workload sets dlp: off, the organisation runs in allow_log, or /v1/embeddings is exempted. It can only strengthen protection, never weaken it, which is why it is allowed per request where the retired x-sluis-dlp header was not. The listed term never reaches the provider.
Errors and audit
- A malformed directive is never silently ignored. An unknown kind, an entry over the limits or an unknown field inside the extension is refused with
422. - What actually ran is disclosed on the sealed audit row. Caller-supplied terms carry the request layer,
dlp:tokenize:person_name(request), distinct from the(ner)and(directory)layers, so the trail shows where each removal came from. - The synchronous
/v1/documents/anonymizeendpoint accepts the same list as aremoveoption. Async jobs reject it with422.
Workload option overrides
Overrides belong to the workload and apply to all its credentials. Options you leave unset inherit organisation policy.
Choose ner_model as off, swift or deep. Under dlp.entities, set individual name kinds; under dlp.detectors, set built-in detector tags such as record_id or vat_number. Missing choices inherit the organisation default. These choices also apply to documents and images, while the organisation's document-protection switch and action remain in force. Another detector can still match the same value.
- In the Console, an owner or admin configures
option_overridesunder Workloads. - Over the API, set
option_overrideswithPOST /admin/workloadswhen creating a workload.
To edit an existing workload, PATCH /admin/workloads/{workload_id} needs its complete mutable settings, including name, status, limits and budget. It replaces them instead of merging individual fields.

# create a workload with governed overrides; keys inherit its settings curl -X POST https://api.sluis.ai/admin/workloads \ -H "Authorization: Bearer $SLUIS_ADMIN_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "document-review", "option_overrides": { "dlp": { "entities": { "person": true }, "detectors": { "record_id": false } }, "ner_model": "swift", "security": { "prompt_injection": { "mode": "block" } } } }' # sparse: absent fields inherit org policy; every deviation is sealed in the audit trail
The x-sluis-dlp request header has been removed. Requests carrying it receive 400, so configure the workload instead. Effective overrides are recorded in the sealed audit trail.