Direct identifiers
Names, emails, phone numbers and postal addresses typed into free-text fields or pulled from records for context.
Solution
OpenAI data privacy for AI SaaS applications.
Detect and mask customer identifiers in the prompt, forward only masked text to the OpenAI API using your own credentials, and restore the original values in the response — without changing how your application code reads.
How can an AI application protect customer data before sending prompts to OpenAI?
Place a privacy layer between the application and the OpenAI API. The layer detects sensitive values in the outbound prompt, replaces them with deterministic placeholders, forwards only the masked text to OpenAI under your own credentials, and restores the protected values in the response. The provider receives the structure of the request without the identifiers.
Summary
Production prompts carry customer identifiers — names, emails, account and ticket references — that the model does not need in order to perform the task, and that leave your boundary on every request.
Detect and mask those values at a gateway before the OpenAI call, then rehydrate the response in memory so the application still sees real data.
When customer or employee data reaches an LLM provider, when an enterprise buyer asks what leaves your systems, or when you want one control point instead of per-feature filtering.
Masking is best-effort over a supported entity set, does not certify compliance, does not prevent prompt injection, and cannot govern what OpenAI does with what it still receives.
Problem
The exposure rarely comes from a deliberate decision to send personal data to a model provider. It comes from ordinary product work: a summarization feature is pointed at a support thread, a copilot is given the current record for context, a retrieval step pulls a document that happens to contain an address. Each request is reasonable in isolation. In aggregate, a third party now receives a continuous stream of your customers' identifiers.
The practical consequence usually shows up commercially before it shows up as an incident: an enterprise prospect asks what data your AI features send to which providers, and the honest answer is "whatever the user typed". That answer is what stalls the deal — see enterprise-ready AI for what buyers expect instead.
The question a security reviewer asks is not "is OpenAI secure?" — it is "what does your application send them, and how do you know?"
Exposure surface
Names, emails, phone numbers and postal addresses typed into free-text fields or pulled from records for context.
Customer ids, ticket numbers, invoice and payment references that map back to a person inside your systems.
Card numbers, IBANs and national identifiers pasted into support and onboarding conversations.
IP addresses, device ids and session identifiers included in diagnostic context.
API keys, tokens, connection strings and env values pasted into debugging prompts in internal tools.
RAG chunks that carry identifiers from the source document even when the user's question contains none.
Common misconception
Provider-side controls are worth configuring, and for some organisations they are a necessary part of the answer. They are a different control from data minimization, and they answer a different question.
Framework
Provider settings govern the provider
They describe what the provider does with data it has already received. They cannot reduce what your application chose to send.
Scope is per provider and per surface
Settings, defaults and contractual terms differ between providers and between product surfaces, and have to be re-verified whenever either changes.
Intermediate hops are out of scope
Logs, traces, analytics, error reporting and prompt-debugging tools sit between your application and the provider and are governed by neither.
Verification is contractual, not observable
You are relying on a stated policy. Masking before egress produces evidence you can demonstrate from your own side of the boundary.
Minimization survives provider changes
If you later add or switch providers, controls applied before the call still apply. Provider-specific settings do not transfer.
The two are complementary: configure the provider correctly, and also reduce what has to be trusted to that configuration.
Provenance
Control 1
Minimization starts with detection: you cannot mask what you have not identified. Privian scans the assembled prompt — every message in the request, not just the latest user turn — for the supported entity set on each request, with no cross-request state.
The current catalog and its known gaps are listed on the PII masking page. Detection is best-effort and should be evaluated against your own data before you rely on it.
Control 2
Each detected value is replaced with a deterministic, type-aware placeholder for the duration of the request — PERSON_1, EMAIL_2, CREDIT_CARD_1. The prompt keeps its shape, so the model can still follow who did what, but the identifying value never crosses the boundary.
Application sends to Privian
Draft a reply to Michael Olsen
(michael@example.com) about
invoice INV-4821.Privian sends to OpenAI
Draft a reply to PERSON_1
(EMAIL_1) about
invoice INV-4821.Control 3
Prompt privacy means the controls live in the request path rather than in each feature that happens to call OpenAI. A new AI feature added six months from now inherits the same treatment as the first one, because the control is attached to the egress point and not to the code that produced the prompt. The concept is described in more depth under prompt privacy.
Control 4
Because every OpenAI call goes through one place, the data path is describable hop by hop: what enters, what is transformed, what is forwarded, what is stored. That description is what a security reviewer actually asks for, and it is published per-hop on the data path page.
Control 5
If masking were one-way, every consuming feature would have to be rewritten to handle placeholders. Instead the mapping is held in memory for the life of the request, applied in reverse to the OpenAI response, and then discarded. Your application receives the reply with real names and addresses; the provider never saw them. Unknown placeholders in a response pass through untouched. See rehydration for the mechanics.
Control 6
Retention has to be answered at each hop, not once. Three of them are usually in scope for an AI feature built on OpenAI:
Prompt logs, traces and analytics are often the largest retained copy of sensitive prompt content, and they are entirely under your control.
Privian does not persist raw prompts or responses. Only structural counters are retained for billing and observability.
Governed by the provider's own terms and your configuration — check OpenAI's current documentation rather than a summary.
Commercial impact
Reviewers rarely ask whether you use OpenAI. They ask what you send, who holds the credentials, what is retained and how you would prove it. Masking before egress changes the answers from intentions to architecture:
Framework
What leaves our systems?
Masked prompts containing placeholders for the supported entity set, rather than raw customer records.
Who holds the provider credentials?
You do — BYOK, encrypted at rest, decrypted in-process at request time.
What does the vendor retain?
No raw prompts or responses; structural counters only.
How is this enforced?
At one egress point that every AI feature passes through, rather than per feature.
What is out of scope?
Compliance certification, prompt-injection defence, and anything the detector does not support.
The document set buyers usually request is collected in the enterprise trust package.
Architecture
Application — Your code calls the OpenAI Chat Completions shape as usual, with the base URL pointed at Privian and a Privian gateway key.
Privian privacy layer — The assembled prompt is scanned, supported entities are replaced with deterministic placeholders, and the request-scoped mapping is held in memory.
OpenAI — The masked request is forwarded to OpenAI using your own encrypted credentials; usage bills against your account.
Privian rehydration — Placeholders in the response are replaced with the original values from the in-memory mapping, which is then discarded.
Application — Your code receives an ordinary OpenAI-shaped response containing real values — no placeholder handling required downstream.
In practice the integration change is the base URL and the key:
from openai import OpenAI
client = OpenAI(
base_url="https://api.privian.io/v1",
api_key=os.environ["PRIVIAN_GATEWAY_API_KEY"],
)
resp = client.chat.completions.create(
model="openai/gpt-4o-mini",
messages=[{"role": "user", "content": prompt}],
)Full request and response shapes are in the API reference; the model catalog is on supported models.
Fit
Scope
FAQ
Enterprise review
Trust assets procurement and security teams routinely request.
Plans & pricing
BYOK, zero retention and masking before the provider call. Beta plans may change as the product matures.