Solution · Patient messaging
Draft and triage portal messages, safely.
Classify, route and draft replies to patient messages with a chat model that takes PHI under contract and stays in your region.
The problem
Why this is hard
Patient portal volume keeps climbing, and every message is protected health information. Teams want AI to triage urgency and draft replies, but a generic chat API means PHI leaving your jurisdiction to a provider with no BAA. phi-cloud gives you a chat endpoint that takes PHI on verified, resident providers — so the assist is real and the posture survives a questionnaire.
How it works
The pipeline, end to end
- 1
Triage the message
POST /v1/chat/completionsClassify urgency, topic and routing with a resident chat model under X-PHI:true. Use JSON mode for a structured verdict your queue can act on.
- 2
Pull relevant context
POST /v1/embeddingsEmbed the message and retrieve prior thread context or care-pathway snippets from your own vector store — all in the same resident 4096-d space.
- 3
Draft a reply
POST /v1/chat/completionsGenerate a grounded draft for a human to review and send. Tool calling can enforce safe templates and required disclaimers.
- 4
Human in the loop
Your appphi-cloud returns the draft and the audit headers; your workflow keeps a clinician in control of what actually goes to the patient.
Why phi-cloud
What makes it compliant
Region-pinned
Structured output
Zero retention
In code
A representative call
Triage a message into a structured verdict your queue can route on — in the EU, under the PHI gate.
curl https://phi-cloud.com/api/v1/chat/completions \
-H "Authorization: Bearer $PHI_API_KEY" \
-H "X-Region: EU" -H "X-PHI: true" \
-d '{
"model": "gemma-4",
"response_format": {"type": "json_object"},
"messages": [
{"role":"system","content":"Return {urgency, topic, route}."},
{"role":"user","content":"Patient message: ..."}
]
}'x-phi-routed: scaleway-gemma-4-26b/EU/phi
x-phi-tier: phiCompliance posture
- EU messaging → Scaleway (GDPR Art. 28 DPA, zero-retention, no-train).
- CH messaging → Infomaniak (Swiss-resident, nFADP/GDPR).
- PHI is gated per call; an unverified region returns phi_blocked rather than routing out.
- phi-cloud never sees your patients — it forwards the request and stores nothing.
FAQ
Common questions
Ready when you are
Build patient messaging on a gateway that survives the audit.
Free to test. Prepaid credits when you go live. The residency and PHI posture is the same in production.
Free to test · Prepaid credits, no subscription · No data retained