Chat and assistant interfaces
Users paste emails, account numbers, contracts and screenshots of records into free-text fields.
Product
Mask sensitive data before prompts reach an LLM.
Privian detects personal identifiers and developer secrets in inbound prompts and replaces them with deterministic placeholders before any provider call. The original values are restored in the response.
What is PII masking for LLMs?
PII masking for LLMs is the detection of personal or sensitive values in a prompt and their replacement with deterministic placeholders before the prompt is sent to a model provider. Privian performs detection and masking at the gateway, forwards only masked content to the provider, and restores the original values in the response inside the request.
Definition
Masking reduces provider exposure before the outbound call; rehydration preserves the application experience without persisting the request mapping.
Most production prompts contain something you would rather not send to a third-party LLM: a customer email, an internal ticket id, a name, an IP address, an API key copied into a debugging prompt. Once that text leaves your network, you lose control of it. PII masking shrinks that exposure surface before the provider call ever happens.
How it works
Framework
Detect
Scan the inbound prompt for supported entity types.
Map
Assign deterministic placeholders within the request.
Forward
Send only masked content to the provider.
Rehydrate
Restore originals in the response inside the gateway.
Discard
Drop the request-scoped mapping.
Step 1
The inbound prompt is scanned for the supported entity set on every request.
Step 2
Each detected value is mapped to a deterministic placeholder for that request, e.g. PERSON_1, EMAIL_2.
Step 3
Only the masked prompt is forwarded to the provider using your BYOK credentials.
Step 4
The provider response may reference the same placeholders.
Step 5
The gateway restores the original values from the in-memory mapping.
Step 6
The mapping is dropped after the response is returned. Nothing is persisted.
Application context
Most AI features send more sensitive data to providers than teams expect, because the data arrives inside otherwise ordinary text. These are the request paths where it usually happens:
Users paste emails, account numbers, contracts and screenshots of records into free-text fields.
Retrieved chunks carry identifiers from source documents into the prompt, even when the user's question contains none.
Transcripts contain names, addresses, phone numbers and payment references by construction.
Debugging prompts routinely include API keys, tokens, connection strings and production identifiers.
Application-level filtering has to be re-implemented for every one of these paths and drifts as features change. Detection at the gateway applies the same controls to all of them, including the ones added after the original review — see the per-hop data path for exactly where it runs.
Coverage
The current beta detects the following entity types. The catalog is evolving — additional locales and identifiers are tracked as future work.
PERSONNamesEMAILEmail addressesPHONEPhone numbersIP_ADDRESSIPv4 / IPv6CREDIT_CARDCard numbers (Luhn-validated)IBANInternational bank accountsSSN_USUS Social Security numbersSIN_CACanadian Social Insurance numbersJWTJSON Web TokensOPENAI_API_KEYOpenAI API keysGITHUB_TOKENGitHub tokensAWS_ACCESS_KEY_IDAWS access key IDsAWS_SECRET_ACCESS_KEYAWS secret keysGENERIC_API_KEYGeneric API keysENV_SECRETEnv-style secret assignmentsSECRET_TOKENPrefixed secret tokensNot yet supported: Norwegian fødselsnummer (tracked as future work).
Example
Inbound prompt
Reply to Michael Olsen
at michael@example.com
about ticket #4821.Forwarded to provider
Reply to PERSON_1
at EMAIL_1
about ticket #4821.Rehydrated response
Hi Michael Olsen,
about ticket #4821 — ...
(sent to michael@example.com)Technical
{TYPE}_{N} shapeTransparency
Use cases
Mask names, emails and phone numbers before they hit OpenAI or Anthropic.
Run AI summarization over tickets without forwarding raw PII.
Iterate on prompts without re-running data-protection reviews.
Catch API keys and tokens accidentally pasted into prompts.
FAQ
Enterprise review
Related
Scope
Enterprise review
Trust assets procurement and security teams routinely request.
Plans & pricing
Privian's pricing is published transparently. Beta plans may change as the product matures.