Skip to content

Heygen v5 Digital Twin

Integrate

Model id heygen/avatar5/digital-twin
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/heygen/avatar5/digital-twin?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Files like the example: $1.00 1,000 API credits your files are measured before the run Run it on this page

Get API key
HeyGen Lipsync & Avatars 4K outputLipsyncup to 4k #avatar#digital-twin#talking-avatar#text-to-video

Avatar V digital twin with 4k output, transparent WebM, background, watermark and SRT captions

HeyGen · Video

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

Speech text for the avatar; required if `audio_url` is omitted.

audio_url
Drop a file, or

Lip-sync source supplied as an HTTP(S) audio file URL, replacing text-to-speech when present. Neither `prompt` nor `voice` is used in that case.

resolution default 720p

Resolution preset for the generated output.

aspect_ratio default 16:9

Video aspect-ratio selection: 'auto' asks HeyGen to read and retain the source ratio, using '16:9' if it cannot. Explicit ratio choices are '16:9', '9:16', '4:5', '5:4', and '1:1'.

Advanced fit · output_format · avatar · voice · remove_background · caption · enable_safety_checker · background · watermark
fit default cover

Choose the avatar's framing: 'cover' fills the output frame but may crop the avatar, whereas 'contain' shows the entire avatar but may add letterboxing.

output_format default mp4

Video container selection, with `webm` enabling transparency through automatic background removal; in that mode, `background` has no effect.

default Abigail Sofa Front

Name identifying an avatar eligible for Avatar V.

default Warm Pro Narrator

Avatar voice selection by name for text-to-speech; it applies only without an `audio_url`.

Background layer optionally placed behind the avatar, except with `output_format='webm'`: transparent webm output ignores this setting.

Optional image used as a watermark overlay in the generated video.

POST /run/heygen/avatar5/digital-twin?wait=20 quote → $1.00
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/heygen/avatar5/digital-twin?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Heygen v5 Digital Twin

Creates a speaking avatar video from text (`prompt` and `voice`) or from an `audio_url` for lip-sync. Select a named `avatar`, a `fit` mode of contain or cover, and a resolution of 720p, 1080p or 4k. `output_format` can be mp4 or webm; webm is transparent. Options include background compositing, a watermark overlay and a sidecar SRT caption file.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
avataroptional
Typestring | null
DefaultAbigail Sofa Front
Name identifying an avatar eligible for Avatar V.
promptoptional
Typestring | null
Speech text for the avatar; required if `audio_url` is omitted.
voiceoptional
Typeenum
DefaultWarm Pro Narrator
Warm Pro NarratorChill BrianIvyJohn DoeMonika SogamHope Archer BrittneyPatrickDavid CastlemoreMichael CAdam Stone JuniperCassidy Jessica Anne BogartArabella
+86 moreAndrewSpuds Oxley Grace ElderHelenCanyon RiversDerya - Lifelike - Excited 🤩Mellow MarcusJack Sterling - Broadcaster 🎙️Brenda - UGC - 1.mp4ReidReaganTerryJennyRadio RickDeniseTim in car - Excited 🤩IskanderThompsonDelicate Daisy - Excited 🤩KingstonGeorge UGC 1Bold BlakeJaneExpressive EvanMarianne - IAAaronModern Recipe Host - Voice 1WillowCute Chloe - Friendly 😊RafaelJune - LifelikeCrisp ChloeSlick SimonNassim - InformativeBaritone BenMaxwellEllie Faye - Excited 🤩MilaniFeisty Fiona - Excited 🤩Professor DeanRose - UGC - 1.mp4ShonaHudson WilderAnn - IAAlastair KensingtonOxleyChristinaAndrew Rizz PeytonGerardo - OutdoorChloe - LifelikeStephanieAnthony - IASignal - Voice 1LucaLisa - Voice 1T.W.TuckerJack Sullivan - Serious 😐WinterMireia - LifelikeGeorgiaStellaMasha - LifelikeCharming Charles - Friendly 😊SerenityAnnie - ExcitedRalphBethanyDominicMason FinnLeenaVeteran VictorTamaraNik PublicCalm ChloeSevikReillyRaulImposing IanRelaxed RayDexter - ProfessionalRelaxed RickEdwinRupert BlackwoodGinnyHope
Avatar voice selection by name for text-to-speech; it applies only without an `audio_url`.
audio_urloptional audio
Typeurl · audio
Lip-sync source supplied as an HTTP(S) audio file URL, replacing text-to-speech when present. Neither `prompt` nor `voice` is used in that case.
fitoptional
Typeenum
Defaultcover
containcover
Choose the avatar's framing: 'cover' fills the output frame but may crop the avatar, whereas 'contain' shows the entire avatar but may add letterboxing.
remove_backgroundoptional
Typeboolean
Defaultfalse
Background removal for the avatar; available only for avatars that support matting.
backgroundoptional
Typeobject
Background layer optionally placed behind the avatar, except with `output_format='webm'`: transparent webm output ignores this setting.
background.typeoptional
Typeenum
Defaultcolor
colorimage
Background kind: `color` specifies a solid hexadecimal color, while `image` specifies an image URL.
background.valueoptional
Typestring
Default#FFFFFF
Background content: a hexadecimal color when the type is `color`, or an HTTP(S) URL when the type is `image`.
watermarkoptional
Typeobject
Optional image used as a watermark overlay in the generated video.
watermark.image_urlrequired
Typeurl · image
Watermark image URL using HTTP(S), for overlaying onto the video.
watermark.scaleoptional
Typenumber | null
≤ 2, > 0
Watermark size relative to the video, greater than 0.0 and up to 2.0.
watermark.opacityoptional
Typenumber | null
0 – 1
Watermark transparency level: 0.0 is fully transparent and 1.0 is fully opaque.
watermark.placementoptional
Typeenum
top-lefttop-rightbottom-leftbottom-right
Position of the watermark within the video.
captionoptional
Typeboolean
Defaultfalse
Controls generation of a separate SRT caption file accompanying the video.
output_formatoptional
Typeenum
Defaultmp4
mp4webm
Video container selection, with `webm` enabling transparency through automatic background removal; in that mode, `background` has no effect.
resolutionoptional
Typeenum
Default720p
720p1080p4k
Resolution preset for the generated output.
aspect_ratiooptional
Typeenum
Default16:9
16:99:164:55:41:1auto
Video aspect-ratio selection: 'auto' asks HeyGen to read and retain the source ratio, using '16:9' if it cannot. Explicit ratio choices are '16:9', '9:16', '4:5', '5:4', and '1:1'.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Screening can be relaxed by setting false, provided the caller is authorized.
required Canonical name, also accepted

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "heygen/avatar5/digital-twin",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 1000,
    "usd": "1.00",
    "charged": 1000,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
    "audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  },
  "output": {
    "video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    },
    "caption_file": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
video
object {url, content_type, file_name, file_size}Video file produced by Avatar V.
caption_file
object {url, content_type, file_name, file_size} | nullSRT caption file produced when `caption=True`, if the service supplies one.

For AI agents: this page as Markdown is at https://doitong.com/developers/models/heygen/avatar5/digital-twin.md. All models and guides: https://doitong.com/developers/llms.txt