Capability · Generation
Generate images, video and talking avatars.
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
What you get
Built for regulated workloads
Generation is general-content only — there is no PHI generation provider, so an X-PHI:true request returns phi_blocked. Paid keys route to fal.ai; the free shared test key routes to the self-hosted ComfyUI worker at no cost. Images settle synchronously; video is async — enqueue, then poll /v1/videos/{id}.
Async video
Talking avatars
Private re-hosting
Availability & pricing
Where it runs, what it costs
Every route is region-resident and the PHI gate is enforced per call. Prices include the flat +10% gateway margin and mirror the live /v1/pricing rate card.
| Region | Provider | Model | Tier | Price |
|---|---|---|---|---|
| All | fal.ai | krea-2 (FLUX.1 Krea) · image | General | $0.033 / image |
| All | fal.ai | wan (Krea-Wan 14B) · video | General | $0.088 / sec |
| All | fal.ai | avatar (InfiniTalk) · video | General | $0.22 / sec |
| All | Medishift worker | krea-2 / bernini / avatar | General | Free test tier |
| Any | — | generation (PHI) | No route | phi_blocked |
Paid generation runs on fal.ai; the free test key routes to the self-hosted worker. Generation is general/non-PHI only — X-PHI:true returns phi_blocked.
Try it
A real call, end to end
Generate an image on the paid tier. Video follows the same shape but returns a job id to poll.
curl https://phi-cloud.com/api/v1/images/generations \
-H "Authorization: Bearer $PHI_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "krea-2", "prompt": "a calm clinic waiting room, soft light" }'x-phi-tier: non_phi
x-phi-cost-micro: 33000
{ "data": [{ "url": "https://phi-cloud.com/api/v1/media/..." }] }How generation routes
- Paid keys → fal.ai (provider ≠ worker); the free test key → worker only.
- Images are synchronous; video is async (poll /v1/videos/{id}), keeping the proxy stateless.
- Paid video bills once on first completed poll (idempotent via an Upstash claim).
- No PHI: there is no PHI generation provider, so X-PHI:true is refused.
- · fal model ids and hosts are env-overridable (FAL_IMAGE_MODEL / FAL_VIDEO_MODEL / FAL_AVATAR_MODEL).
- · R2 re-hosting is optional and binding-gated; when off, the gateway passes the upstream URL through.
FAQ
Common questions
Ready when you are
Put image & video in production — without giving up your data.
Spin up a key in minutes. The residency and PHI posture above arrives unchanged.
Free to test · Prepaid credits, no subscription · No data retained