← All models
Create natural HeyGen Avatar V digital twin videos from text or audio, with lip-sync, optional backgrounds, captions, and MP4/WebM output.
Example
Details
- Accepts
- text
Pricing
- Price
- 12.5 cr / second
Prices in credits (1 credit = $0.01).
Data schema
Input
| Field | Type | Description |
|---|---|---|
| fit | stringenum: contain, cover | How the avatar fits within the output frame. 'contain' keeps the full avatar in view (may letterbox); 'cover' fills the frame (may crop). |
| voice | —enum: Warm Pro Narrator, Chill Brian, Ivy, John Doe, Monika Sogam, Hope … | Name of the text-to-speech voice to use for the avatar when ``audio_url`` is not provided. |
| avatar | — | Name of the Avatar V-eligible avatar to use. |
| prompt | — | Text the avatar will speak. Required when ``audio_url`` is not provided. |
| caption | boolean | Generate a sidecar SRT caption file alongside the video. |
| audio_url | — | HTTP(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. |
| watermark | — | Optional watermark image to overlay on the output video. |
| background | — | Optional background to composite behind the avatar. Ignored when ``output_format='webm'`` (webm output is transparent). |
| resolution | stringenum: 720p, 1080p, 4k | Output resolution preset. |
| aspect_ratio | stringenum: 16:9, 9:16, 4:5, 5:4, 1:1, auto | Aspect ratio of the output video. Supported values: '16:9', '9:16', '4:5', '5:4', '1:1', and 'auto'. 'auto' preserves the source aspect ratio when HeyGen can read it, falling back to '16:9' otherwise. |
| output_format | stringenum: mp4, webm | Output container format. 'webm' produces a transparent video (automatically removes the background) and ignores the ``background`` field. |
| remove_background | boolean | Remove the avatar's background. Requires a matting-enabled avatar. |
Output
| Field | Type | Description |
|---|---|---|
| video | — | The generated Avatar V video file. |
| caption_file | — | Generated caption file (SRT) when ``caption=True`` and HeyGen returns one. |