
HIPAA-Compliant AI for Healthcare: On-Premise vs. Cloud API
A practical comparison of on-premise and cloud API architectures for HIPAA-compliant AI in healthcare — covering BAA requirements, PHI handling, and why on-prem is becoming the default.
For most healthcare organisations, on-premise AI deployment is the safer path to HIPAA compliance. It eliminates third-party data transmission, removes BAA complexity, and keeps Protected Health Information (PHI) under the organisation's direct control. Cloud APIs can work with proper BAAs, but the compliance burden is significantly higher.
According to IBM's Cost of a Data Breach Report 2024, healthcare data breaches cost an average of $9.77 million per incident — the highest of any industry for the 14th consecutive year. HIPAA violation penalties range from $141 to $2,134,831 per violation depending on the level of negligence, with annual maximums reaching $2,134,831 per violation category according to the HHS Office for Civil Rights. Meanwhile, according to Morgan Stanley Research, healthcare AI adoption is projected to grow at a 48% CAGR through 2027 — making the compliance question unavoidable.
For AI agencies selling into healthcare, this creates a fundamental architecture question: cloud API or on-premise?
HIPAA Requirements Mapped to AI Deployment
HIPAA's Privacy Rule, Security Rule, and Breach Notification Rule together create a framework that directly constrains how AI can be deployed. Here is how the key requirements map:
The Privacy Rule
The Privacy Rule governs who can access PHI and under what conditions. When you send patient data to a cloud AI API:
- The AI provider becomes a Business Associate and must sign a Business Associate Agreement (BAA)
- The provider must limit use of PHI to the purposes specified in the BAA
- The provider must implement safeguards to prevent unauthorised use or disclosure
- The provider must report any breaches
The challenge: Most AI API providers offer BAAs, but the terms are narrow. OpenAI's BAA, for example, explicitly excludes data used for model training. But the operational reality — data flowing through shared infrastructure, transient storage during processing, logging for abuse detection — creates grey areas that compliance teams struggle with.
The Security Rule
The Security Rule requires administrative, physical, and technical safeguards:
| Safeguard | Cloud API | On-Premise |
|---|---|---|
| Access controls | Depends on provider's implementation | Fully controlled by organisation |
| Audit logging | Provider's logs, limited visibility | Complete logging under org's control |
| Encryption in transit | Yes (TLS) | Yes (internal network) or N/A (air-gapped) |
| Encryption at rest | Provider's responsibility | Organisation's responsibility |
| Integrity controls | Provider's responsibility | Organisation's responsibility |
| Transmission security | Data crosses networks | Data stays on-premise |
On-premise deployment does not automatically satisfy the Security Rule — you still need proper implementation. But it gives the covered entity direct control over every safeguard, which dramatically simplifies compliance documentation and audit responses.
The Breach Notification Rule
If PHI is compromised, the covered entity must notify affected individuals, HHS, and potentially the media (for breaches affecting 500+ individuals).
With a cloud API, a breach at the AI provider's infrastructure triggers notification obligations for the covered entity — even if the breach was entirely outside the entity's control. With on-premise deployment, the attack surface is limited to infrastructure the organisation already secures.
BAA Implications for API Providers
A Business Associate Agreement is required whenever a covered entity shares PHI with a service provider. Here is the practical reality of BAAs with major AI API providers:
OpenAI: Offers a BAA for Enterprise tier customers. Excludes training data. Requires the customer to ensure PHI is appropriately de-identified before sending when possible. The BAA covers the API infrastructure but the shared-infrastructure model means PHI transits through systems that also serve non-healthcare customers.
Anthropic: Offers BAAs for enterprise customers. Similar structural constraints around shared infrastructure.
Google Cloud AI: BAAs available through Google Cloud's broader healthcare compliance framework. More mature infrastructure isolation than pure-play AI providers, but still involves data transmission to Google's data centres.
The core issue is not whether a BAA exists — it is whether the BAA adequately addresses the risk. Healthcare compliance officers increasingly conclude that it does not, because:
- They cannot independently verify the provider's safeguards
- The shared-infrastructure model creates inherent cross-contamination risk
- The BAA places notification and response burden on the covered entity for events outside their control
PHI in Fine-Tuning Data
Fine-tuning introduces an additional layer of complexity. If you are training a model on clinical notes, discharge summaries, or patient communications, that training data contains PHI.
Cloud fine-tuning: Sending PHI to a cloud provider for fine-tuning means the data is stored, processed, and used to modify model weights on the provider's infrastructure. The resulting model may retain information from the training data. The provider must be covered by a BAA, and the fine-tuning process must be isolated from other customers.
On-premise fine-tuning: Training data never leaves the organisation's infrastructure. The resulting model weights stay local. There is no third-party data processor to manage, no BAA to negotiate for the fine-tuning step.
For agencies helping healthcare organisations fine-tune models on clinical data, on-premise fine-tuning eliminates an entire category of compliance risk. Tools like Ertas Studio enable this without requiring ML expertise on the healthcare organisation's staff.
On-Premise as the Compliance-Safe Default
The trajectory is clear. Healthcare organisations are increasingly treating on-premise AI deployment as the path of least resistance for HIPAA compliance.
This does not mean cloud AI is prohibited — HIPAA does not mandate specific technologies. But the compliance burden of cloud deployment is substantial and ongoing: BAA negotiation, vendor risk assessments, incident response planning for third-party breaches, continuous monitoring of the provider's compliance posture.
On-premise deployment reduces these to standard internal IT security obligations that healthcare organisations already manage.
The Practical Architecture
A HIPAA-compliant on-premise AI deployment for a healthcare organisation looks like:
- Inference server: A dedicated machine (RTX 5090 or A6000) in the organisation's data centre or a private rack at a HIPAA-compliant colocation facility
- Fine-tuned model: Trained on de-identified or properly consented clinical data, stored locally
- Inference engine: Ollama or vLLM exposing a local API endpoint
- Integration layer: n8n or similar workflow automation connecting to the EHR system
- Audit logging: All inference requests and responses logged to the organisation's SIEM
- Access controls: Role-based access through the organisation's existing identity provider
This architecture satisfies every HIPAA requirement through controls the organisation already understands and manages.
What This Means for Agencies
If you are an AI agency targeting healthcare, on-premise deployment is not a differentiator — it is table stakes. The agencies winning healthcare contracts are the ones that:
- Understand HIPAA requirements deeply enough to speak the CTO's language
- Can deploy and manage on-premise inference infrastructure
- Handle fine-tuning on sensitive clinical data without the data leaving the client's control
- Provide the audit trails and documentation that compliance teams require
This is a higher bar than selling a chatbot wrapper. But it is also a higher-margin, stickier business with less competition.
Frequently Asked Questions
Is OpenAI HIPAA compliant?
OpenAI offers a Business Associate Agreement (BAA) for Enterprise tier customers, which is a prerequisite for HIPAA compliance. However, having a BAA does not make OpenAI automatically "HIPAA compliant" in all contexts. The BAA excludes data used for model training, and the shared-infrastructure model means PHI transits through systems serving non-healthcare customers. Organisations must conduct their own risk assessment to determine whether OpenAI's safeguards meet their specific HIPAA obligations.
Can hospitals use ChatGPT?
Hospitals can use ChatGPT for tasks that do not involve Protected Health Information (PHI) — for example, drafting general patient education materials or administrative templates. However, entering patient-specific data into ChatGPT's consumer product violates HIPAA because there is no BAA in place. Hospitals using OpenAI's Enterprise API with a signed BAA have more flexibility, but many compliance officers still consider the risk profile unacceptable for direct PHI processing due to the third-party data transmission involved.
What is a BAA in the context of AI?
A Business Associate Agreement (BAA) is a legal contract required by HIPAA whenever a covered entity (such as a hospital or clinic) shares Protected Health Information with a third-party service provider. In the AI context, if you send patient data to a cloud AI API for processing, the API provider becomes a Business Associate and must sign a BAA. The agreement specifies how the provider will safeguard PHI, limits the use of the data, and establishes breach notification obligations.
Is on-premise AI required for HIPAA?
On-premise AI is not legally required by HIPAA. The regulation is technology-neutral and does not mandate specific deployment architectures. However, on-premise deployment is increasingly the practical default because it eliminates third-party data transmission, removes the need to negotiate BAAs with AI providers, and keeps all PHI under the organisation's direct control. This dramatically simplifies compliance documentation and audit responses compared to cloud API deployments.
Ship AI that runs on your users' devices.
Ertas early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.
Further Reading
- GDPR-Compliant AI Development — Parallel compliance requirements in the European context
- Data Sovereignty for AI Agencies — The broader case for local model deployment across regulated industries
Ship AI that runs on your users' devices.
Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.
Keep reading

Deploying Fine-Tuned Models On-Premise for Law Firms: A Compliance Checklist
An actionable compliance checklist for deploying fine-tuned AI models on-premise at law firms — covering data handling, access controls, audit logging, model versioning, and bar association requirements.

Best HIPAA-Compliant RAG Pipeline for Healthcare: On-Premise Document Retrieval Without Data Egress
Healthcare organizations need RAG for clinical AI — but cloud-based retrieval pipelines violate HIPAA when they process PHI. Here is how to build a compliant RAG pipeline that runs entirely on your infrastructure.

Fine-Tuning and Safety Alignment: What You Need to Know Before Deploying
Understanding how fine-tuning affects model safety — why alignment can degrade during training, how to maintain safety guardrails, and practical testing strategies for production deployments.