HeyGen Avatar (Digital Twin) API
HeyGen's flagship talking-avatar (Digital Twin) on the v3 API — the highest-quality lip-sync available. Drives a pre-trained avatar look with a script (or your own audio), with the Avatar IV motion engine, voice emotion/speed/pitch, captions, and custom backgrounds.
$0.08/s on Varosity credits ($0.08/s with your own key). Clips up to 300s with native audio.
no HeyGen account needed · provider's list price, no markup · failed renders never billed
Best for
- studio-grade lip sync
- Avatar IV / Avatar V motion engines
- voice emotion + speed control
- captions & custom backgrounds
Trade-offs
- requires a pre-trained avatar look id
- fixed framing
How to get the best result
Scripted presenter videos up to 300s with a trained HeyGen avatar (Digital Twin) and studio lip-sync. Pick instead: heygen-photo-avatar to animate any photo; omnihuman for a photo plus your own audio.
Prompting
- The prompt is the spoken script; write it as speech, with punctuation for pacing.
- Pass audioUrl to lip-sync to your own voice track instead of HeyGen TTS.
Settings on Varosity
- providerOptions.avatarId (else a default look) and voiceId; engine avatar_iv (default) or avatar_v.
- referenceImageUrl on this model becomes the BACKGROUND image, not the subject.
- Other options: resolution, caption, background, removeBackground, voiceSettings.
Avoid
- Passing a face photo as referenceImageUrl expecting it to be the speaker.
- Using motionPrompt/expressiveness here; they apply to photo avatars only.
Example prompt
Hi, I'm Sam. In the next sixty seconds I'll show you three ways to cut your weekly planning time in half. Let's start with the simplest one.
From developers.heygen.com, checked against what Varosity sends.
Call it from your code
One Varosity key works for every model. Video renders are async — the response has a jobId; poll GET /api/v1/jobs/{jobId} until status is "succeeded", then read outputUrl.
Before you call it
- On Varosity Credits, heygen-avatar-4 needs providerOptions.avatarId plus providerOptions.voiceId (or an audioUrl) — public ids from GET /api/v1/heygen/library (MCP: list_avatars).
curl -X POST https://varosity.ai/api/v1/video/generate \
-H "Authorization: Bearer $VAROSITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "cinematic aerial of a coastal road at golden hour, slow push-in",
"modelId": "heygen-avatar-4",
"aspectRatio": "16:9",
"durationSec": 5
}'Or use HeyGen Avatar (Digital Twin) over MCP
Connect ChatGPT, Claude, Cursor or any MCP client to https://varosity.ai/api/mcp (sign in, or use your key), then say:
"Use Varosity with heygen-avatar-4 to make a clip of …"MCP setup for your agent
Alternatives to HeyGen Avatar (Digital Twin)
- HeyGen Photo Avatar (Avatar IV)animate ANY photo as the speaker · Avatar IV motion engine$0.08/s
- HeyGen Video Translatemultilingual lip-sync dubbing · preserves original speaker appearance$0.10/s
- OmniHuman 1.5talking avatars · from single photo$0.16/s
- D-ID AI Presentertalking avatars from any photo · text-to-presenter$0.05/s
- HeyGen Video Agentprompt → finished video · agent writes script, picks avatar & scenes$0.12/s
- LatentSync Lip-Syncsmooth temporal consistency · fast inference$0.05/s