Long-document content
Contracts, transcripts and support histories pasted in full for summarization or analysis, carrying identifiers throughout rather than in one field.
Solution
Anthropic Claude data privacy for AI applications.
Detect and mask identifiers in the prompt — including long-context documents and retrieved passages — forward only masked text to the Anthropic API under your own credentials, and restore the original values in the response.
How can an AI application protect customer data before sending prompts to Claude?
Place a privacy layer between the application and the Anthropic API. The layer detects sensitive values across the entire assembled prompt — including long-context documents and retrieved passages — replaces them with deterministic placeholders, forwards only the masked text to Claude under your own credentials, and restores the protected values in the response.
Summary
Claude's typical workloads — long-document analysis, agentic and internal tooling, large retrieved context — put more raw material into a single request than short-context use cases, and that material often carries customer or employee identifiers the model does not need.
Detect and mask those values at a gateway before the Anthropic call, then rehydrate the response in memory so the application still sees real data.
When Claude prompts routinely include full documents, chat histories or retrieved context, when an enterprise buyer asks what leaves your systems, or when you run Claude alongside other providers and want one control point.
Masking is best-effort over a supported entity set, does not certify compliance, does not prevent prompt injection, and cannot govern what Anthropic does with what it still receives.
Problem
Claude is frequently chosen for exactly the workloads that carry the most raw data per request: summarizing a long contract, reasoning over an entire support history, driving an agent that pulls several internal documents into context, or answering a question against a large retrieved passage. A large context window is a genuine capability advantage — and it is also the distinctive risk compared with short-context calls. Where a short prompt might carry one or two identifiers, a long-context prompt can carry dozens, embedded in material nobody individually reviewed before it was pasted in.
The practical consequence usually shows up commercially before it shows up as an incident: an enterprise prospect asks what data your Claude-powered features send to Anthropic, and the honest answer is "whatever document or thread the feature was pointed at". See enterprise-ready AI for what buyers expect instead.
The question a security reviewer asks is not "is Claude secure?" — it is "how much of that document did your application actually need to send, and how do you know?"
Exposure surface
Contracts, transcripts and support histories pasted in full for summarization or analysis, carrying identifiers throughout rather than in one field.
Large retrieved passages that carry identifiers from the source document even when the user's own question contains none.
Multi-step agents and internal copilots that assemble context from several systems, compounding what any single request contains.
Customer ids, ticket numbers, invoice and payment references embedded in the documents being analysed.
Card numbers, IBANs and national identifiers appearing inside pasted records or forms.
API keys, tokens and connection strings pasted into debugging or internal-tooling prompts.
Common misconception
Anthropic's own privacy, security and enterprise 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 Anthropic 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 and prompt-debugging tools sit between your application and Anthropic 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 add a second provider alongside Claude, controls applied before the call still apply. Provider-specific settings do not transfer.
The two are complementary: configure Anthropic's controls 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 and every block of retrieved or pasted context, 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 — including your longest documents — 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, ACCOUNT_1. In a long document-analysis prompt the same value maps to the same placeholder everywhere it recurs, so Claude can still track who did what across the document while the identifying value never crosses the boundary.
Application sends to Privian
Summarize the key obligations in this
support escalation thread and flag any
open risk.
---
From: Sarah Chen (sarah.chen@example.com)
Account: ACC-88213
"Following up on invoice INV-4821 —
please confirm the refund to card
ending 4242 by Friday."
---Privian sends to Anthropic
Summarize the key obligations in this
support escalation thread and flag any
open risk.
---
From: PERSON_1 (EMAIL_1)
Account: ACCOUNT_1
"Following up on invoice INV-4821 —
please confirm the refund to card
ending CREDIT_CARD_1 by Friday."
---Control 3
Prompt privacy means the controls live in the request path rather than in each feature that happens to call Claude. A new document-analysis or agent 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 assembled the prompt. The concept is described in more depth under prompt privacy.
Control 4
Because every Claude 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 Claude's response, and then discarded. Your application receives the reply with real names, accounts and addresses; Anthropic 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 Claude:
Prompt logs, traces and analytics are often the largest retained copy of long-context 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 Anthropic's own terms and your configuration — check Anthropic's current documentation rather than a summary.
Multi-provider reality
Most teams that run Claude in production also run at least one other model provider — a second model for a different task, a fallback for availability, or a cheaper model for high-volume calls. Provider-level privacy configuration does not transfer between them: settings, defaults and contractual terms are reviewed and applied per provider, and a control configured for Anthropic says nothing about what a second provider receives.
A gateway-level control applied before the call is the one piece that does transfer, because it sits in front of every provider rather than inside any one of them. See the LLM gateway product page for how routing and masking work across providers, and compare Privian against other gateway approaches.
Commercial impact
Reviewers rarely ask whether you use Claude. They ask what you send, who holds the credentials, what is retained and how you would prove it — and for long-context use cases, how much of a document actually left your systems. 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 documents or 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 Claude-calling 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 full assembled prompt — including retrieved and pasted context — is scanned, supported entities are replaced with deterministic placeholders, and the request-scoped mapping is held in memory.
Anthropic — The masked request is forwarded to Claude using your own encrypted credentials; usage bills against your own Anthropic 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, the key and the model prefix:
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="anthropic/claude-<model>",
messages=[{"role": "user", "content": prompt}],
)The model id above is illustrative — check supported models for which Claude models are currently addressable, and the API reference for full request and response shapes.
Fit
Scope
FAQ
Enterprise review
Trust assets procurement and security teams routinely request.
Plans & pricing
BYOK, zero retention and masking before the provider call — including long-context and agentic workloads. Beta plans may change as the product matures.