fitstring
How the avatar fits within the output frame. 'contain' keeps the full avatar in view (may letterbox); 'cover' fills the frame (may crop).
Varsayılan: "cover"
Olası değerler: "contain", "cover"
heygen/avatar5/digital-twinAvatar5 Digital Twin by HeyGen - generate cinematic videos from text descriptions with AI. Create high-quality video content with natural motion, camera control, and optional audio generation.
Modeli deneyin
Sırada ne yapmak istersiniz?
Bir örnek seçerek girdilerini ve sonucunu playground'a yükleyin.
{
"prompt": "Hello and welcome to this demonstration of HeyGen Avatar V."
}HeyGen Avatar 5 Digital Twin: a presenter video from a script or audio track, using a stock or custom avatar, up to 4K, with optional captions and background removal.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Script to speak, or direction when audio is supplied. |
aspect_ratio | 16:9 / 9:16 / 5:4 / 4:5 / 1:1 | — | Output frame shape. |
audio | audio URL | — | Optional voice track; otherwise the script is voiced with voice. |
resolution | 720p / 1080p / 4k | 720p | Output resolution. |
output_format | mp4 / webm | mp4 | Output file format. |
remove_background | boolean | false | Transparent background (WebM). |
avatar | string | Abigail Sofa Front | Avatar to use. |
voice | Warm Pro Narrator / Chill Brian / Ivy / John Doe / Monika Sogam / Hope / Archer / Brittney / Patrick / David Castlemore / Michael C / Adam Stone / Juniper / Cassidy / Jessica Anne Bogart / Arabella / Andrew / Spuds Oxley / Grace Elder / Helen / Canyon Rivers / Derya - Lifelike - Excited 🤩 / Mellow Marcus / Jack Sterling - Broadcaster 🎙️ / Brenda - UGC - 1.mp4 / Reid / Reagan / Terry / Jenny / Radio Rick / Denise / Tim in car - Excited 🤩 / Iskander / Thompson / Delicate Daisy - Excited 🤩 / Kingston / George UGC 1 / Bold Blake / Jane / Expressive Evan / Marianne - IA / Aaron / Modern Recipe Host - Voice 1 / Willow / Cute Chloe - Friendly 😊 / Rafael / June - Lifelike / Crisp Chloe / Slick Simon / Nassim - Informative / Baritone Ben / Maxwell / Ellie Faye - Excited 🤩 / Milani / Feisty Fiona - Excited 🤩 / Professor Dean / Rose - UGC - 1.mp4 / Shona / Hudson Wilder / Ann - IA / Alastair Kensington / Oxley / Christina / Andrew Rizz / Peyton / Gerardo - Outdoor / Chloe - Lifelike / Stephanie / Anthony - IA / Signal - Voice 1 / Luca / Lisa - Voice 1 / T.W.Tucker / Jack Sullivan - Serious 😐 / Winter / Mireia - Lifelike / Georgia / Stella / Masha - Lifelike / Charming Charles - Friendly 😊 / Serenity / Annie - Excited / Ralph / Bethany / Dominic / Mason Finn / Leena / Veteran Victor / Tamara / Nik Public / Calm Chloe / Sevik / Reilly / Raul / Imposing Ian / Relaxed Ray / Dexter - Professional / Relaxed Rick / Edwin / Rupert Blackwood / Ginny / Hope | Warm Pro Narrator | Voice for the script. |
caption | boolean | false | Burn in captions. |
watermark | string | — | Optional watermark image URL to overlay on the output video. |
fit | contain / cover | cover | How the avatar fills the frame. |
$0.12 per output second; length follows the audio or the spoken script. The quote before submission assumes 5 seconds.
| Output | Price |
|---|---|
| 5s | $0.60 |
| 30s | $3.60 |
| 60s | $7.20 |
Failed runs are not charged.
Related: heygen/heygen-avatar4/image-to-video (from your own photo).
Geliştirmeye başlayın
Bu modeli SandBase Unified Run API üzerinden gönderin.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "heygen/avatar5/digital-twin",
"fit": "cover",
"voice": "Warm Pro Narrator",
"avatar": "Abigail Office Front",
"prompt": "Hello and welcome to this demonstration of HeyGen Avatar V.",
"caption": false,
"resolution": "720p",
"output_format": "mp4",
"remove_background": false
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Bir SandBase API anahtarı oluşturun ve sunucu ortamınıza ayarlayın. Tüm istekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın veya bir depoya commit etmeyin.
Bu model kimliği ve girdileriyle /v1/run adresine POST gönderin. Yukarıdaki istek örneği gönderme ve yoklamayı içerir.
Durum completed, failed veya timeout olana kadar verilen run ID ile yoklama yapın. Çıktıyı yalnızca completed olduktan sonra okuyun.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Modelin image, video veya audio alanına herkese açık erişilebilir bir dosya URL'si verin. Desteklenen formatlar ve sınırlar her Playground girişinin yanında gösterilir.
Playground'daki desteklenen image alanlarında yükleme veya değiştirme kontrolünü kullanın. Video URL alanları barındırılan bir sürüş videosu kabul eder; video yükleme desteği anlamına gelmez.
fitstringHow the avatar fits within the output frame. 'contain' keeps the full avatar in view (may letterbox); 'cover' fills the frame (may crop).
Varsayılan: "cover"
Olası değerler: "contain", "cover"
audiostringHTTP(S) URL of an audio file for the avatar to lip-sync to. When provided, the avatar uses this audio instead of text-to-speech and ``prompt``/``voice`` are ignored.
voicestringName of the text-to-speech voice to use for the avatar when ``audio_url`` is not provided.
Varsayılan: "Warm Pro Narrator"
Olası değerler: "Warm Pro Narrator", "Chill Brian", "Ivy", "John Doe", "Monika Sogam", "Hope ", "Archer ", "Brittney", "Patrick", "David Castlemore", "Michael C", "Adam Stone ", "Juniper", "Cassidy ", "Jessica Anne Bogart", "Arabella", "Andrew", "Spuds Oxley ", "Grace Elder", "Helen", "Canyon Rivers", "Derya - Lifelike - Excited 🤩", "Mellow Marcus", "Jack Sterling - Broadcaster 🎙️", "Brenda - UGC - 1.mp4", "Reid", "Reagan", "Terry", "Jenny", "Radio Rick", "Denise", "Tim in car - Excited 🤩", "Iskander", "Thompson", "Delicate Daisy - Excited 🤩", "Kingston", "George UGC 1", "Bold Blake", "Jane", "Expressive Evan", "Marianne - IA", "Aaron", "Modern Recipe Host - Voice 1", "Willow", "Cute Chloe - Friendly 😊", "Rafael", "June - Lifelike", "Crisp Chloe", "Slick Simon", "Nassim - Informative", "Baritone Ben", "Maxwell", "Ellie Faye - Excited 🤩", "Milani", "Feisty Fiona - Excited 🤩", "Professor Dean", "Rose - UGC - 1.mp4", "Shona", "Hudson Wilder", "Ann - IA", "Alastair Kensington", "Oxley", "Christina", "Andrew Rizz ", "Peyton", "Gerardo - Outdoor", "Chloe - Lifelike", "Stephanie", "Anthony - IA", "Signal - Voice 1", "Luca", "Lisa - Voice 1", "T.W.Tucker", "Jack Sullivan - Serious 😐", "Winter", "Mireia - Lifelike", "Georgia", "Stella", "Masha - Lifelike", "Charming Charles - Friendly 😊", "Serenity", "Annie - Excited", "Ralph", "Bethany", "Dominic", "Mason Finn", "Leena", "Veteran Victor", "Tamara", "Nik Public", "Calm Chloe", "Sevik", "Reilly", "Raul", "Imposing Ian", "Relaxed Ray", "Dexter - Professional", "Relaxed Rick", "Edwin", "Rupert Blackwood", "Ginny", "Hope"
avatarstringName of the Avatar V-eligible avatar to use.
Varsayılan: "Abigail Sofa Front"
promptstringzorunluText the avatar will speak. Required when ``audio_url`` is not provided.
captionbooleanGenerate a sidecar SRT caption file alongside the video.
Varsayılan: false
watermarkstringOptional watermark image URL to overlay on the output video.
resolutionstringOutput resolution preset.
Varsayılan: "720p"
Olası değerler: "720p", "1080p", "4k"
aspect_ratiostringOutput aspect ratio. Omit to keep the source aspect ratio (falls back to 16:9 when it cannot be read).
Olası değerler: "16:9", "9:16", "5:4", "4:5", "1:1"
output_formatstringOutput container format. 'webm' produces a transparent video (automatically removes the background) and ignores the ``background`` field.
Varsayılan: "mp4"
Olası değerler: "mp4", "webm"
remove_backgroundbooleanRemove the avatar's background. Requires a matting-enabled avatar.
Varsayılan: false
{
"model": "heygen/avatar5/digital-twin",
"fit": "cover",
"voice": "Warm Pro Narrator",
"avatar": "Abigail Office Front",
"prompt": "Hello and welcome to this demonstration of HeyGen Avatar V.",
"caption": false,
"resolution": "720p",
"output_format": "mp4",
"remove_background": false
}Tamamlanan bir run, sonucunu output içinde gösterir. Aşağıdaki, modelin kaydedilmiş örneğidir; yeni bir üretim değildir.
[
{
"poster": "https://static.sandbase.ai/examples/posters/10e8eb713334bb44a0c8.jpg",
"source": "heygen schema mirror",
"source_url": "https://heygen.example/",
"url": "https://static.sandbase.ai/examples/e98b9898-2357-4762-bf63-9737322f65f8/output/ea28ec0a-4829-4b08-82f6-0b6576e51411.mp4"
}
]