Skip to content
Sign in Create account

HIPAA and CloakAPI

Summary

On CloakAPI’s client-side paths (the desktop app, the browser extension and the local proxy at base_url=http://localhost:8799/v1), tokenization happens inside your perimeter, before the request leaves your infrastructure. Each value the on-device detector matches is replaced with a stand-in, and the mapping stays with you. A value the detector misses can reach CloakAPI as written.

CloakAPI has not launched and has no customers. No customer has concluded that CloakAPI does not create, receive, maintain, or transmit Protected Health Information (PHI). CloakAPI does not state that no Business Associate (BA) relationship arises. That question is for your counsel.

The argument holds only as far as detection does. Structured identifiers are matched by pattern and checksum rules, but free-form patient or clinician names outside the on-device dictionary can be missed and then reach CloakAPI as written; see Detection coverage. For high-assurance use, tokenize known PHI fields in your application before they enter a prompt.

If you point a bare SDK straight at https://api.cloakapi.io/api/v1 instead, the gateway does not tokenize the inference body. It checks the pre-tokenized declaration, the MAC over the submitted bytes, engine identity, content-part types, idempotency hash and body length; it does not check whether the body was tokenized. Missing or invalid proof is refused, but a valid proof does not establish that PII was replaced. The bare-SDK path does not tokenize the body on the device. To tokenize on your own machine, start from the Quickstart and use the local proxy, and review the threat model for your regulatory posture. A BAA is available if your procurement process requires one.

The HIPAA Business Associate definition

Under 45 C.F.R. § 160.103, a Business Associate is a person or entity that, on behalf of a Covered Entity, performs a function or activity involving the use or disclosure of PHI, or provides services to a Covered Entity where the provision of the service involves PHI.

The critical phrase is “involving the use or disclosure of PHI.” A vendor that does not receive PHI in any form, not even encrypted PHI, is not a BA.

How tokenization works on your machine

On the client-side paths:

  1. The desktop app, browser extension or local proxy detects sensitive fields (PII, PHI, credentials) on your machine.
  2. It replaces each detected value with a stand-in. In the default mode a detected name becomes a generated name, so patient_name: "Alice Smith" might become patient_name: "Mark Allen"; in max mode and in the local proxy it becomes an opaque token such as <<CLOAK:PERSON:5e4120>>. Dates of birth become an opaque [CLK-DOB-…] marker.
  3. It stores the mapping in a local vault on your machine. The mapping is not sent.
  4. The CloakAPI gateway receives the body as the client sent it.
  5. The gateway relays the request to the upstream model provider (OpenAI, Anthropic and others).

The mapping table (stand-in → Alice Smith) stays on your infrastructure.

What CloakAPI receives

For values the detector matched, CloakAPI receives stand-ins like these:

FieldExample received by CloakAPIPHI?
Patient nameA generated name, or <<CLOAK:PERSON:5e4120>> in max modeNot the original value
DOB[CLK-DOB-…]Not the original value
Diagnosis codeA generated code, or a <<CLOAK:…>> token in max modeNot the original value
Conversation structure{"role":"user","content":"…"}Structural only
MetadataTenant ID, request timestamp, modelNo PHI

Why this is different from encryption

Encrypted PHI is still PHI: HIPAA’s Security Rule applies to ePHI regardless of encryption. A vendor that receives encrypted PHI and holds the decryption key is a BA.

CloakAPI does not hold decryption keys because there is nothing to decrypt. The stand-ins are not encrypted PHI. They are placeholders derived with no secret key. A placeholder can’t be turned back into the value, but anyone who already holds a candidate value can check whether it matches. The link to the real value exists only on the Covered Entity’s device, so CloakAPI cannot reconstruct the original value from a stand-in, even if compelled.

For detected values, the stand-in rests on what the architecture sends. CloakAPI does not call that a determination that no BA relationship arises. Missed values are not covered by it.

Regulatory basis

The HHS guidance on Business Associates says that a BA relationship arises when PHI is “used or disclosed” on behalf of a Covered Entity. CloakAPI does not treat that sentence as a determination that this architecture is outside the definition. A value the detector misses can still be PHI when it arrives. This is not an HHS determination.

CloakAPI sees the same principle in GDPR Recital 26 (data that does not relate to an identifiable natural person is not personal data), though HIPAA and GDPR use different frameworks.

What this means for healthcare customers

ScenarioCloakAPI’s position
You use a client-side path (desktop app, browser extension or local proxy), so tokenization happens on your machineDetected values are replaced before they reach CloakAPI. Values the detector misses can still arrive as written. CloakAPI does not state that no BA relationship arises. Evaluate this with your counsel.
You point a bare SDK at api.cloakapi.ioThe gateway does not tokenize or scan the inference body. Missing proof is refused, but a valid proof does not certify tokenization. This path does not tokenize on the device: run the local proxy, or sign the BAA and review the threat model.
Your procurement team requires a BAA regardlessA BAA template is available; see the next section.

The BAA also works as a contractual backstop if your procurement policy requires one for every AI vendor.

Available BAA

CloakAPI provides a standard BAA template for healthcare customers. The template covers the required HIPAA provisions: permitted uses, safeguards, breach notification (60-day window), subcontractor obligations, access and amendment rights, accounting of disclosures, and return or destruction of PHI on termination.

To get a countersigned BAA:

  1. Request the BAA template from legal@cloakapi.io. It is not published as a public download.
  2. Have your counsel review it and fill in the bracketed fields.
  3. Email the signed PDF to legal@cloakapi.io.
  4. CloakAPI countersigns and returns it within 5 business days.

The BAA has not been approved by HHS or OCR. It is a starting-point template, not legal advice.

Sub-processors relevant to healthcare customers

If a BAA is executed, CloakAPI’s obligations flow through to the infrastructure sub-processors that run the service. On the client-side paths, what reaches this infrastructure is the tokenized form of the values your on-device detector matched.

Sub-processorRoleHandles PHI?Region
Hetzner Online GmbHCompute and storage; the gateway is operated on Hetzner in Nuremberg, GermanyHandles the request bytes your client submits to the gateway; the gateway proof does not verify tokenizationDE (EU)
Cloudflare, Inc.Authoritative DNS only (grey-cloud: no proxy, CDN, WAF or TLS termination)No. It does not see request payloads.Anycast DNS
Stripe Payments Europe Ltd.Billing only: account and payment dataNo. It does not receive prompts, responses or PHI.IE

The gateway forwards each request to the AI provider you choose for it; that provider may process request data outside the EU.

Upstream AI providers are not listed as PHI sub-processors

CloakAPI does not list the upstream model providers (Anthropic, OpenAI, Google Gemini, Grok, DeepSeek) as PHI sub-processors, for two reasons:

  • On client-side paths, detected values are replaced before the request leaves your machine, and the providers do not receive the re-identification map.
  • BYOK is your own provider relationship. When you bring your own provider key (BYOK), your contract for that model usage is directly between you and the provider. It is not a CloakAPI sub-processing arrangement, and any BAA you need for that path is one you execute with the provider.

For the full general list (GDPR Art. 28) of the vendors that keep the service running, including the upstream AI providers that process request content, see cloakapi.io/legal/subprocessors.

Questions

Contact trust@cloakapi.io for compliance questions, or legal@cloakapi.io to start a BAA.