Self-Hosted LLM vs API Data Privacy Comparison: Five Options, Which Fits Your Threat, and What It Costs
A buyer's guide to direct APIs, zero-retention agreements, Bedrock and Azure, managed models in your own VPC, and self-hosted open weights, with each provider's retention terms as of November 17, 2026.
For most organizations, a direct API under a Zero Data Retention agreement, or a model run through a cloud they already trust such as Amazon Bedrock, is private enough: OpenAI, Anthropic, AWS and Microsoft all say API prompts are not used for training, and ZDR removes most stored copies. Self-hosting open weights is the right choice only when data must not leave your environment at all, because it is the one option with no third-party retention, and it fails badly when servers are left open, as 12,269 Ollama instances were in February 2026. One new constraint changes the math for frontier work: Anthropic's most capable Claude models now require 30-day retention on every platform. This guide sets out the five options, the threat each one fits, and what the privacy premium costs.
The five options at a glance
Privacy comes down to four questions: does data leave your environment, how long is it kept, is it used for training, and who could reach it through a breach, a legal demand or a mistake. The table answers the first three; the fourth is covered option by option below.
| Option | Leaves your environment? | Kept, and for how long | Used for training? |
|---|---|---|---|
| Direct API, default terms | Yes | Abuse logs up to 30 days; stateful features until deleted | No, by default |
| Direct API with ZDR | Yes | Not stored after the response, for eligible features and models | No |
| Cloud-hosted (Bedrock, Foundry) | Yes, to your cloud provider | Your setting; up to 30 days for Fable-class Claude on Bedrock | No |
| Managed model in your VPC | No, but the vendor operates it | Only what you log | No |
| Self-hosted open weights | No | Only what you log | No |
If a contractual promise is enough: the direct API
The direct APIs are the simplest choice, and their default terms are better than their reputation. OpenAI's "Your data" guide says API data has not been used for training since March 1, 2023, unless a customer opts in, and keeps abuse-monitoring logs "for up to 30 days, unless longer retention is required by law." Anthropic says "We do not use API data for training (unless you have an agreement with us that states otherwise)." Its commercial retention article, updated July 1, 2026, says inputs and outputs are deleted within 30 days; its API documentation says conversation content "is not retained by default" outside a class of Covered Models. Content flagged for policy violations can be kept for up to two years. That matters for the fourth question: a provider that holds a 30-day log has something to lose in a breach or to produce if a court or regulator asks.
ZDR shrinks the stored footprint, but you have to ask for it: OpenAI makes it "subject to prior approval," and Anthropic enables it per organization through sales. Both providers exclude stateful features. On OpenAI, Files, Assistants, Threads, Vector Stores, Batches and fine-tuning jobs keep data until you delete it, and the Responses API keeps 30 days of state unless store is false. On Anthropic, Batch keeps data for 29 days, Files until deletion or expiry, and code execution for up to 30 days, and the API does not block them under ZDR. Anthropic's Covered Models, from Claude Fable 5 (designated June 9, 2026) to Fable 5.2 (November 9, 2026), "require 30-day data retention" and are outside ZDR unless Anthropic authorizes it. Both providers keep a legal carve-out even under ZDR.
This option fits teams whose risk assessment accepts a vendor's contract, who can live without the stateful endpoints for sensitive data, and who do not need the Covered Models for that data. If you need data residency as well, OpenAI offers in-region processing in the US and Europe, in the UAE for specific models and endpoints, and in Australia, Japan and India for gpt-6-luna only; Anthropic offers US-only inference through its inference_geo setting. For health data, Anthropic offers HIPAA-ready API access under a signed BAA, but its documentation says that arrangement does not cover Claude Code or Claude on Amazon Bedrock and Google-managed Cloud, which follow those platforms' own compliance terms.
If you already trust your cloud: Bedrock or Foundry
Running models through your cloud provider moves custody to a company you probably already have a data processing agreement with. Anthropic's documentation says that on Bedrock and Google-managed Claude, the cloud provider is the data processor. AWS says models run in deployment accounts that "model providers don't have any access to," that customer data "will not be used to train the underlying FMs," and that Bedrock "does not share your content with model providers for any current mode."
On Bedrock you set the retention mode yourself, per Region. Mode none writes nothing to durable storage, and a service control policy can force it across an organization. Two exceptions matter. Fable 5, 5.1 and 5.2 need mode aws_review, which keeps prompts and completions inside AWS for up to 30 days and allows AWS staff to review them; Claude Opus 4.8 runs under none. And AWS's security blog says it may store and review flagged content for CSAM "even when mode is none." A Region you never configure falls back to each model's default.
Microsoft's Foundry page says prompts are "NOT available to OpenAI," are processed in the geography you choose unless you use Global or DataZone deployments, and that stored data stays in your tenant's geography. Its modified abuse monitoring, which stops Microsoft storing flagged prompts for human review, will not be offered for models released on or after November 1, 2026, from a date still to be announced.
This option fits teams under GDPR or sector rules that require a known processing region and an existing cloud contract, and that want frontier models without running GPUs.
If no third party may hold the data: in-VPC or self-hosted
When the requirement is contractual or legal no-egress, the remaining options keep prompts inside your boundary.
A managed model in your VPC splits the work: the vendor runs the serving stack on GPUs in your cloud account, and you keep the weights you deploy and the logs you collect. Fireworks' Bring Your Own Cluster says "Your inference compute runs in your cloud account or data center boundary," with Fireworks operating deployment, autoscaling and upgrades; it is a private preview for Enterprise customers and does not yet support training. Together lists an Enterprise Platform "in your VPC on EKS." The trade-offs are that the vendor has operational access you must govern by contract, that Fireworks' optional overflow to its own capacity would send traffic out if enabled, and that only open-weight models run this way. Anthropic lists its Fable models as available through its own platform and the major clouds, not as deployable weights. How open models compare with them on your workload has not been measured in any published like-for-like test.
Self-hosting removes the vendor entirely, and with it the safety net. Cisco Talos found 1,139 Ollama servers open to the internet in research published September 1, 2025, and LeakIX found 12,269 unauthenticated ones in February 2026, through which anyone could run prompts and pull model weights. Ollama binds to 127.0.0.1 by default and ships without authentication, so exposure comes from operators opening it up. The minimum hardening, drawn from Cisco's and LeakIX's recommendations:
- Keep the server on
127.0.0.1and publish it only through a reverse proxy. - Require authentication at the proxy: bearer token or API key, OAuth2 where possible.
- Isolate the network with private subnets and firewall rules on port 11434.
- Patch promptly and verify model files against a hash before loading.
- Log requests at the proxy and scan your own addresses for exposure.
For coding agents specifically, Parsec sells a context layer whose Pro tier, free to start according to its site, sends chunks of tool output to its scoring API while model calls go to the user's own provider; its Enterprise tier runs that scoring inside the customer's VPC. Parsec's separate custom-model service runs on a shared cluster, and its pages do not mention VPC hosting for it.
If you need both: route by sensitivity
Many teams will end up with two paths. The most sensitive requests, such as patient records or privileged documents, go to an open model in their own account, and everything else goes to an API with ZDR or to Bedrock with retention set to none. Bedrock's project-level retention settings and Anthropic's per-workspace retention controls make the split enforceable rather than a convention: Anthropic lets a ZDR organization enable 30-day retention in one workspace only, so Covered Models can be confined to work that tolerates retention.
What the privacy premium costs
Take a workload of 1 million requests a month, each with 2,000 input and 500 output tokens: 2 billion input and 500 million output tokens. At Anthropic's list prices:
- Claude Sonnet 5.5 at $2 in and $10 out per million tokens: $4,000 + $5,000 = $9,000 a month.
- The same with US-only inference (
inference_geo: "us", a 1.1x multiplier on all token prices): $9,900, a $900 residency premium. Anthropic's pricing page says Bedrock and Google regional endpoints carry a similar 10 percent premium over global ones; OpenAI's residency endpoints carry a 10% uplift on models released on or after March 5, 2026. - Claude Fable 5.2 at $8 and $40: $16,000 + $20,000 = $36,000, with 30-day retention required.
Neither provider's ZDR documentation mentions a price; it is arranged through sales. For a self-hosted comparison, GPU time at Together's dedicated-inference list rate of $5.49 per H100 per hour comes to about $3,950 for one GPU running all month (720 hours) and $7,906 for two, as a reference point only: that rate is for capacity Together hosts, your cloud's rate in your own account will differ, and engineering time is not included. Whether one or two GPUs would carry this workload on an open model of comparable quality has not been measured.
On these assumptions, the GPU bill alone lands in the same range as a mid-tier API before any staff time, so self-hosting is not a cheap way to buy privacy; what it buys is a different guarantee.
Bottom line
If a contract is enough, use the direct API with ZDR, keep store off and the stateful endpoints away from sensitive data, and pick models outside Anthropic's Covered list for that data. If you already trust AWS or Microsoft and need regional control, use Bedrock with retention set to none in every Region or Foundry in a fixed geography, and accept 30 days of in-cloud retention if you need Fable-class models. If data must not leave your environment, run open weights in your own account, managed or self-run, and treat the hardening checklist as part of the deployment. Before signing, confirm every term in this guide against your contract and data processing agreement.
Sources
- OpenAI, Your data (API docs): https://developers.openai.com/api/docs/guides/your-data
- OpenAI, Data residency: https://developers.openai.com/api/docs/guides/data-residency
- Anthropic Privacy Center, Can you delete data that I sent via API?: https://privacy.claude.com/en/articles/7996875-can-you-delete-data-that-i-sent-via-api
- Anthropic Privacy Center, How long do you store my organization's data?: https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data
- Anthropic, API and data retention: https://platform.claude.com/docs/en/manage-claude/api-and-data-retention
- Anthropic, Covered Models: https://support.claude.com/en/articles/15425695
- Anthropic, Pricing: https://platform.claude.com/docs/en/about-claude/pricing
- AWS Machine Learning Blog, Build generative AI applications on Amazon Bedrock: https://aws.amazon.com/blogs/machine-learning/build-generative-ai-applications-on-amazon-bedrock-the-secure-compliant-and-responsible-foundation
- AWS, Amazon Bedrock data protection: https://docs.aws.amazon.com/bedrock/latest/userguide/data-protection.html
- AWS, Amazon Bedrock data retention: https://docs.aws.amazon.com/bedrock/latest/userguide/data-retention.html
- AWS Security Blog, Enforce zero data retention on Amazon Bedrock: https://aws.amazon.com/blogs/security/enforce-zero-data-retention-on-amazon-bedrock-with-bedrock-projects-and-service-control-policies/
- Microsoft, Data, privacy, and security for Foundry Models sold by Azure: https://learn.microsoft.com/en-us/azure/ai-foundry/responsible-ai/openai/data-privacy
- Fireworks, Bring Your Own Cluster overview: https://docs.fireworks.ai/ecosystem/integrations/byoc/overview.md
- Together AI on AWS Marketplace: https://aws.amazon.com/marketplace/pp/prodview-3zxbbifggyplc
- Together AI, Pricing: https://www.together.ai/pricing
- Cisco Talos, Detecting exposed LLM servers: a Shodan case study on Ollama: https://blogs.cisco.com/security/detecting-exposed-llm-servers-shodan-case-study-on-ollama
- LeakIX, 12,000 Ollama instances exposed: https://blog.leakix.net/2026/02/ollama-exposed/
- Ollama, FAQ: https://docs.ollama.com/faq
- Parsec, coding agents: https://parseclab.ai/parsec/
- Parsec, getparsec.ai: https://getparsec.ai/
- Parsec, vs your own GPUs: https://parseclab.ai/compare/own-gpus/