# phi-cloud > phi-cloud is a stateless, OpenAI-compatible AI API gateway with per-request data residency and a hard PHI (protected health information) gate. One drop-in API for chat, embeddings, speech, OCR, vision and media generation — each call routed to the data-resident provider for the region you pin. Operated from Switzerland. Prepaid credits, a flat +10% gateway margin, no subscription and no seats. How it works (the facts an integrating agent needs): - OpenAI base_url: https://phi-cloud.com/api/v1 — point any OpenAI SDK at it and keep your code. - Per-request headers: X-Region (CH | EU | US | UK | ASIA | ANZ | LATAM | MENA | INDIA | WORLD) and X-PHI (true | false). Jurisdiction defaults to WORLD. - Region-resident routing: CH -> Infomaniak, EU -> Scaleway, US -> Together/Fireworks, everywhere else -> Google. Failover stays inside the region. - PHI gate: with X-PHI:true, a request routes only to verified PHI-eligible providers — Infomaniak (CH), Scaleway (EU), Azure (CH/EU/US for OCR/TTS/STT). Where none exists it returns phi_blocked rather than failing over to an unverified provider. - Stateless: no prompt or response is ever logged or persisted. Every response carries audit headers: x-phi-routed, x-phi-tier, x-phi-attempts, x-phi-cost-micro, x-phi-usage. - Canonical model aliases resolve per region: gemma-4, qwen3.5, glm-5.2 (US only), qwen3-embedding-8b (4096-d, every region), whisper, krea-2, wan, avatar. ## Capabilities - [Chat & reasoning](https://phi-cloud.com/capabilities/chat): One OpenAI-compatible chat endpoint over every model family — open-weight and frontier — with the data-residency and PHI gate enforced on every call. (POST /v1/chat/completions) - [Embeddings & search](https://phi-cloud.com/capabilities/embeddings): A single 4096-dimension embedding model in every region — for general and PHI traffic alike — so your vectors stay comparable across Switzerland, the EU and the US. (POST /v1/embeddings) - [Speech (STT / TTS)](https://phi-cloud.com/capabilities/speech): Speech-to-text and text-to-speech on the OpenAI audio shape — Swiss, EU and US only, each pinned to a same-jurisdiction provider with no cross-border failover. (POST /v1/audio/transcriptions · /v1/audio/speech) - [Document OCR](https://phi-cloud.com/capabilities/ocr): Extract text and layout from scanned forms, faxes and PDFs — page-billed, PHI-eligible via Azure, and resident in Switzerland, the EU or the US. (POST /v1/ocr) - [Vision](https://phi-cloud.com/capabilities/vision): Send images alongside text on the standard chat call. Routing biases to a vision-capable, region-resident model — no separate API to learn. (POST /v1/chat/completions (image_url parts)) - [Image & video](https://phi-cloud.com/capabilities/media): Text-to-image, text/image-to-video and audio-driven talking avatars for general (non-PHI) content — paid on fal.ai or free on the self-hosted test tier. (POST /v1/images/generations · /v1/videos/generations) - [Math agent](https://phi-cloud.com/capabilities/math): A chat endpoint that writes and runs Python or R in a region-pinned, network-isolated sandbox to compute and verify — then returns charts as inspectable SVG and diagrams as Mermaid, never opaque raster images. (POST /v1/math/chat/completions) ## Solutions - [Clinical documentation](https://phi-cloud.com/solutions/clinical-documentation): Turn a recorded encounter and the patient’s prior records into a structured note — transcription, OCR and drafting on one PHI-gated, region-resident API. - [Patient messaging](https://phi-cloud.com/solutions/patient-messaging): Classify, route and draft replies to patient messages with a chat model that takes PHI under contract and stays in your region. - [Medical transcription](https://phi-cloud.com/solutions/medical-transcription): Whisper-class transcription on the OpenAI audio shape, per-minute billed, pinned to Switzerland, the EU or the US with no cross-border failover. - [Search & RAG over PHI](https://phi-cloud.com/solutions/secure-rag): Embed, retrieve and answer over clinical corpora in one resident 4096-d vector space — so a single index can span Switzerland, the EU and the US. ## Platform & routing - [Platform overview](https://phi-cloud.com/platform): the OpenAI-compatible gateway, end to end. - [How routing works](https://phi-cloud.com/routing): region pinning, PHI gating, canonical aliases, failover, audit headers. - [Network & coverage](https://phi-cloud.com/network): regions and jurisdictions. - [Vendor matrix](https://phi-cloud.com/vendors): which provider serves each region and its PHI eligibility. - [Compliance & data residency](https://phi-cloud.com/compliance): frameworks (nFADP, GDPR, HIPAA via Azure), DPAs, sub-processors. ## API endpoints (under https://phi-cloud.com/api/v1) - POST /chat/completions — chat, tools, JSON mode, vision (image_url parts), SSE streaming. - POST /math/chat/completions — math agent: runs Python or R in a region-pinned, network-isolated sandbox to compute/verify; returns charts as SVG (XML) and diagrams as Mermaid. General traffic only. - POST /embeddings — qwen3-embedding-8b, 4096-d, one shared space across regions. - POST /audio/transcriptions — speech-to-text (CH/EU/US only, residency-separate). - POST /audio/speech — text-to-speech (EU/US; CH no_route). - POST /ocr — document OCR to per-page markdown (Mistral-native shape; CH/EU/US). - POST /images/generations — text-to-image (synchronous, general/non-PHI only). - POST /videos/generations + GET /videos/{id} — text/image-to-video and talking avatars (async). - GET /models — region/PHI-filtered model catalog with supports_tools. - GET /pricing — public marked-up rate card (region/PHI filtered). - GET /ping — free key + routing diagnostic (reports billing_active). ## Pricing - [Pricing](https://phi-cloud.com/pricing): prepaid credits, 1 USD = 300 credits, $20 minimum top-up. Pay-as-you-go drawdown at the provider list price plus a flat +10% gateway margin. Local currency (USD/EUR/GBP/CHF) at rounded parity. PHI routing carries no surcharge. ## For developers & resellers - [API reference](https://phi-cloud.com/docs): endpoints, headers, errors, code samples. - [Reseller / white-label guide](https://phi-cloud.com/docs/reseller): run phi-cloud under your own brand, read the x-phi-cost-micro header, add your own margin. - [Compare vs OpenRouter](https://phi-cloud.com/alternatives/openrouter-vs-phi-cloud) and [vs AWS Bedrock](https://phi-cloud.com/alternatives/aws-bedrock-vs-phi-cloud). ## Company - [About](https://phi-cloud.com/about): who we are and how we build. - [Blog](https://phi-cloud.com/blog): notes on private AI inference. - Contact: hello@phi-cloud.com