Skip to content

Video

ph0ny treats video the same way it treats voice: one API, many providers. You don't bind to Sora or Runway or HeyGen up front — you call our endpoint and pin a provider per request, or let us route by quality / latency / price.

What you can do

CapabilityUse caseEndpoint
GenerateMarketing b-roll, demo clips, hero animations/v1/video/generate
AvatarTalking-head from a single photo + script/v1/video/avatar
LipsyncRe-voice existing footage cleanly/v1/video/lipsync
DubEnd-to-end translation with lipsync/v1/video/dub
AnalyzeSearch, embed, Q&A over recorded video/v1/video/analyze

Quickstart — generate

ts
import { ph0ny } from '@ph0ny/sdk'

const job = await ph0ny.video.generate({
  prompt: 'Aerial shot of a mountain pass at golden hour, slow drift',
  duration_seconds: 6,
  width: 1280,
  height: 720,
  provider: 'runway',
})

const out = await ph0ny.video.waitForJob(job.id)
console.log(out.result.video_url)

Quickstart — talking-head avatar

A single photo + script becomes a video your agent can use as outbound media — sales decks, voicemails, onboarding clips.

ts
const job = await ph0ny.video.avatar({
  image_url: 'https://uploads.example.com/founder.jpg',
  text: 'Hey, thanks for booking a demo. Quick intro before we meet.',
  voice_id: 'rachel',
  tts_provider: 'elevenlabs',
  provider: 'hallo3',
})

If you already have audio rendered, pass audio_url instead of text + voice_id. ph0ny handles either path.

Picking a provider

The default routes by use case if you omit provider:

Use caseDefaultWhy
Cinematic generationrunwayStrongest motion + composition
Sora-class realismsoraHighest fidelity short clips (BYOK)
Photorealistic avatarheygenBest commercial avatar (BYOK)
Open-source avatarhallo3Best of the self-hosted set
Lipsync dubbingsync-labsTightest mouth alignment
Open-source lipsynclatentsyncHigh fidelity, self-hosted
Video Q&A / searchtwelve-labsMarengo + Pegasus

Always pass provider for production — provider defaults can shift as we add new engines. The full matrix lives on Providers → Video.

Async by default

Every video op returns a VideoJob immediately. Wait via:

  • Webhook: pass webhook_url, we POST a signed payload on completion.
  • Polling: GET /v1/video/:jobId every 1–5s.
  • SDK helper: ph0ny.video.waitForJob(id) does long-poll for you.

Pricing

Video is metered in seconds of output. Self-hosted engines (hallo3, liveportrait, latentsync, etc.) run on ph0ny GPUs at our flat per-second rate. Commercial providers (runway, heygen, sora, sync-labs, twelve-labs) pass through the provider's price. BYOK skips ph0ny metering entirely — bring your own Runway / HeyGen key and only the provider charges you.

See Pricing for the per-second tiers.

Where to next

Built by ph0ny.