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}.

Image

Text-to-image

POST /v1/images/generations settles per image inline. krea-2 maps to FLUX.1 Krea on fal (paid) or Krea-2 on the worker (free test tier).
Video

Async video

wan (text/image→video) generates asynchronously: enqueue at /v1/videos/generations, then poll /v1/videos/{id}. The job id embeds the model so the poll re-resolves it exactly. Paid video bills once, on first completion.
Avatar

Talking avatars

avatar takes a portrait image plus audio and returns a lip-synced video (InfiniTalk on fal). Sending audio to /v1/videos biases routing to the avatar canonical.
Privacy

Private re-hosting

By default fal stores I/O and serves public URLs; the adapter disables upstream retention (X-Fal-Store-IO:0). Enable the optional R2 re-host to serve outputs from short-lived signed /v1/media URLs instead.

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.

RegionProviderModelTierPrice
Allfal.aikrea-2 (FLUX.1 Krea) · imageGeneral$0.033 / image
Allfal.aiwan (Krea-Wan 14B) · videoGeneral$0.088 / sec
Allfal.aiavatar (InfiniTalk) · videoGeneral$0.22 / sec
AllMedishift workerkrea-2 / bernini / avatarGeneralFree test tier
Anygeneration (PHI)No routephi_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
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" }'
response
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.
Good to know
  • · 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

No. No generation provider is PHI-eligible, so any X-PHI:true generation request returns phi_blocked. Generation is for general / marketing content only.
Render time and output duration are unknown until the job finishes. Enqueuing at /v1/videos/generations and polling /v1/videos/{id} keeps phi-cloud stateless — the job state lives upstream — and lets paid video bill once, on first completion.
The adapter already disables fal’s upstream retention. For confidential content, enable the R2 re-host: outputs are copied to your own bucket and served from short-lived signed /v1/media URLs instead of public fal URLs.

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