HeyGen AI Avatars: Build a Video and Budget the Credits
How HeyGen AI avatars work · Prerequisites and versions · HeyGen plans, credits and what a minute costs · Steps 1 to 3: Plan the script and the credit budget · Steps 4 to 7: Build the avatar video in HeyGen · Steps 8 to 9: Export and inspect the file · Steps 10 to 12: Finish the video with FFmpeg · Step 13: Generate the same scenes through the API · The complete working project · Common pitfalls · Troubleshooting · HeyGen alternatives compared · Advanced tips · Questions creators ask
HeyGen AI avatars turn a typed script into a talking presenter, and every finished minute costs credits that depend on the avatar engine you pick. HeyGen’s help centre explains its credit-based plans and per-feature rates, and the gap between engines is large: Avatar III video look runs at 4 credits a minute, Avatar V at 48. That is a twelvefold spread, and it decides whether a monthly plan covers one video or twelve.
This tutorial builds one short presenter video from script to final MP4 in 13 steps. You will budget credits before you spend them, build the video in the HeyGen editor, check the export, then finish it with FFmpeg. A Python script then repeats the same job through the API, with a dry-run switch so you can test without paying.
HeyGen lists Avatar 6 as its newest avatar model, introduced in the second half of November 2026, alongside Avatar V, Avatar IV and Avatar III. If you only want to compare allowances before opening a paid account, our table of free AI video generator tiers and their credit limits shows what other tools give away. Figures below come from HeyGen’s and the other vendors’ own pages and help centres where they exist, as of November 25, 2026.
How HeyGen AI avatars work
A HeyGen avatar video is built in three layers. A script becomes speech through a text-to-speech voice. A lip-sync and motion model then animates a presenter (a real person, a cloned one or a synthetic one) to match that speech. Finally a renderer places the result on a background or inside a scene and exports it as a video file.
The presenter comes in several forms. A video avatar, often called a digital twin, is built from footage of you. A photo avatar animates a single still image. HeyGen also sells LiveAvatars for real-time conversation, and it has added 30 public LiveAvatars, so you can use one without building a custom avatar first. According to HeyGen’s pricing materials, a video-avatar slot costs $29 a month or $288 a year, while a LiveAvatar slot is listed at $49 a month.
The avatar engines in plain terms
HeyGen’s model catalog lists four avatar engines. Avatar III is the lower-cost engine. Avatar V is described as the highest-fidelity engine. Avatar IV sits between them and has separate rates for photo look and video look. Avatar 6, the newest, was reportedly shown at a HeyGen event around November 18 and 19, 2026, with script-responsive gestures and native high-definition rendering. Those two features come from launch reports, so treat them as claims until you see your own render.
Separate from the avatar line, HeyGen lists HeyGen Video as its newest general video model, according to HeyGen’s FAQ. The sources do not say whether it replaces any avatar engine or sits beside them as a general video model. This tutorial stays on the avatar engines, because they are the ones with published per-minute credit rates. For the wider field of text-to-video and image-to-video tools, the AI video generators hub collects the related guides.
Voice is its own product line. According to HeyGen’s October product roundup, HeyGen Voice shipped during October 2026. HeyGen also announced Voice Turbo, a lower-cost, lower-latency API mode that is free to try on shared capacity through November 30, 2026. HeyGen describes that offer as a trial, not a guaranteed production tier, so do not build a client workflow on it. HeyGen also says its voice model ranked first on the Artificial Analysis voice leaderboard, which is a company claim that this article has not independently checked.
Where HeyGen AI avatars fit and where they do not
HeyGen AI avatars suit talking-head formats: explainers, product walkthroughs, course lessons, translated versions of an existing video and short social clips. They save the most time when the same presenter has to say new words every week, because you edit text instead of reshooting. HeyGen’s own pricing page names 175 languages and dialects on Creator and Pro, which is the feature that makes translated versions cheap to produce.
They fit poorly when the video needs physical action, a real location, fast camera moves or a presenter who reacts to something off screen. A synthetic presenter also carries a trust cost on some channels, so decide early whether you will tell viewers the presenter is AI. For b-roll, cutaways and cinematic shots, a general text-to-video model is the better tool, and the credit maths in this tutorial does not carry over to it.
Prerequisites and versions
You can finish steps 1 to 9 with a free HeyGen account and a text editor. Steps 10 to 13 need a few local tools. Install these first:

- HeyGen account: the Free plan works for the editor steps. It allows three watermarked videos a month at up to one minute each, so use it for a draft only.
- A recent Python release: the scripts use f-strings and standard-library modules only, apart from one package.
- requests 2.x: install it with
pip install requests. It handles the API calls and downloads. - FFmpeg 7.1 or newer, with ffprobe: this does the joining, loudness and overlay work. Check it with
ffmpeg -version. - A POSIX shell: macOS, Linux or WSL on Windows. The finishing script uses
sh. - A HeyGen API key and paid API credits (step 13 only): HeyGen says it has not offered free API credits since February 2026, so a real API run spends money.
Make a project folder and keep every file in it. The layout at the end of the tutorial assumes one flat directory with a cache folder that the script creates. Menu labels in the HeyGen editor change often, so the editor steps describe actions rather than exact button names.
Plan for about 90 minutes the first time. Most of that is the editor work and the first FFmpeg run. After that, a repeat video takes a fraction of the time because the scripts, the intro and the settings are already in place.
HeyGen plans, credits and what a minute costs
The first decision is the plan. HeyGen’s Free plan gives three watermarked videos a month. Creator costs $29 a month, or about $24 a month billed annually. HeyGen’s help centre lists Creator at 600 credits a month, and says Pro starts at 1,000 credits a month for $49. HeyGen’s pricing page adds that Pro tiers start at 1,000 credits a month at $49 and scale up to 100,000 credits a month, with the same features at every tier and only the credit pool changing.
Business is the team plan. It reportedly costs $149 a month for the first seat with 1,500 credits, and the pricing page lists extra team members at $20 per seat per month. Enterprise is custom-priced. HeyGen’s help documentation also says the older Unlimited plans were decommissioned and are no longer offered, and that Business replaced the earlier Team plan, with the transition documented in January 2026. If a blog post tells you HeyGen sells unlimited avatar video, it is describing a retired plan.
| Engine or tier | Credits per minute | Where it fits |
|---|---|---|
| Avatar III video look | 4 | Drafts, timing checks, script tests |
| Avatar IV photo look | 16 | Photo avatars at mid cost |
| Avatar IV video look | 31 | Video avatars at mid-high cost |
| Avatar V | 48 | Final renders on the highest-fidelity engine |
| Avatar 6 | Not confirmed here | Newest model, check the in-app credit meter |
| Pro-tier rate, 720p or 1080p | 40 | Listed on HeyGen’s credits help page |
| Pro-tier rate, 2K | 58 | Listed on HeyGen’s credits help page |
Rates in the table come from HeyGen’s published credit examples and help page in November 2026. One HeyGen comparison dated October 9 reportedly lists Avatar 6 Turbo at 20 credits a minute and Avatar 6 Pro at 40. That predates the November launch coverage, so the numbers may describe a preview. Read the credit meter in your account before you budget an Avatar 6 job.
Credits turn into dollars through your plan. Creator gives 600 credits for $29 a month, or $24 a month billed annually, and HeyGen’s published examples list Avatar V at 48 credits a minute and Avatar III at 4 credits a minute. That makes an Avatar V minute far more expensive than an Avatar III minute. Your invoice can differ when you add credit top-ups or change tiers.
Business credit top-ups are reportedly sold in blocks of 100 credits for $5, which works out to 5 cents a credit. That is close to the Creator rate, so a top-up is a fair way to cover one heavy month without changing plans. Check the current block size in your account before you rely on it.
Steps 1 to 3: Plan the script and the credit budget
Step 1: Write the script for the ear
Write short sentences that a person could say in one breath. Read each line aloud. If you stumble, the voice model will too. Spell out numbers the way you want them spoken, and write brand names phonetically in the script if the voice mispronounces them. You can keep the correct spelling in your captions later.
Aim for about 150 words per minute of finished video as a planning figure. That is a working assumption, not a HeyGen spec, and voices differ. Keep a first project to a short script of about three minutes at most, because it keeps credit costs low.
Step 2: Split the script into scenes and estimate length
Long single renders are risky. One wrong word means paying to regenerate the whole video. Splitting the script into scenes of about 90 words keeps each render near 35 seconds, and lets you redo one scene without touching the others. Save this as split_script.py.
import re
import sys
WORDS_PER_MINUTE = 150
MAX_SCENE_WORDS = 90
def split_scenes(text):
sentences = re.split(r"(?<=[.!?])\s+", text.strip())
scenes, current = [], []
for s in sentences:
if sum(len(x.split()) for x in current) + len(s.split()) > MAX_SCENE_WORDS and current:
scenes.append(" ".join(current))
current = []
current.append(s)
if current:
scenes.append(" ".join(current))
return scenes
if __name__ == "__main__":
text = open(sys.argv[1], encoding="utf-8").read()
total = 0
for i, scene in enumerate(split_scenes(text), 1):
words = len(scene.split())
total += words
print(f"scene {i:02d}: {words:>3} words, about {words / WORDS_PER_MINUTE * 60:>4.0f} s")
print(f"total: {total} words, about {total / WORDS_PER_MINUTE:.1f} min")
Run it on a short script saved as script.txt. With a short test script, the output looks like this:
$ python3 split_script.py script.txt
scene 01: 84 words, about 34 s
scene 02: 27 words, about 11 s
total: 111 words, about 0.7 min
Step 3: Budget the credits before you generate
Now turn the length into credits. The calculator below uses the four published per-minute rates, accepts your monthly credit pool and plan price, and adds a 1.5x retake buffer. The buffer is a planning habit, not a HeyGen rule. Save it as calc_credits.py.
import sys
RATES = {
"avatar_iii": 4,
"avatar_iv_photo": 16,
"avatar_iv_video": 31,
"avatar_v": 48,
}
def minutes_for(pool):
return {name: round(pool / rate, 1) for name, rate in RATES.items()}
def credits_for(minutes, engine, retakes=1.5):
return minutes * RATES[engine] * retakes
if __name__ == "__main__":
pool = int(sys.argv[1]) if len(sys.argv) > 1 else 600
price = float(sys.argv[2]) if len(sys.argv) > 2 else 29.0
per_credit = price / pool
for name, mins in minutes_for(pool).items():
cost = RATES[name] * per_credit
print(f"{name:<16} {RATES[name]:>2} cr/min {mins:>6} min ${cost:.2f}/min")
need = credits_for(3, "avatar_v")
print(f"3-min Avatar V video at 1.5x retakes: {need:.0f} credits, ${need * per_credit:.2f}")
$ python3 calc_credits.py 600 29
avatar_iii 4 cr/min 150.0 min $0.19/min
avatar_iv_photo 16 cr/min 37.5 min $0.77/min
avatar_iv_video 31 cr/min 19.4 min $1.50/min
avatar_v 48 cr/min 12.5 min $2.32/min
3-min Avatar V video at 1.5x retakes: 216 credits, $10.44
The result is the main lesson of the plan section. A 600-credit pool buys 150 minutes on Avatar III but 12.5 minutes on Avatar V. A single three-minute Avatar V video, especially with retakes, eats a large share of the month. The practical answer is to draft on the cheap engine and render finals on the expensive one.
Run the calculator with your own pool and price before every project. Pass the annual-billing price as the second argument to see the cheaper per-minute figure, and compare it with the monthly one. If the annual price saves more than a month of credits you would otherwise top up, annual billing pays for itself.
Steps 4 to 7: Build the avatar video in HeyGen
Step 4: Choose the avatar type
For a first project, pick a stock presenter from the library. HeyGen’s pricing page says the Free plan includes 500-plus ready-made presenters, so you can test the whole pipeline without recording anything. Move to a photo avatar when you want your own face with little effort, and to a video avatar when you need the best likeness and motion.

Custom avatars of real people need consent. Only upload a face or record footage of someone who has agreed to it, and follow the on-screen recording prompts HeyGen gives you. For a photo avatar, use a sharp, evenly lit, front-facing image with the mouth closed. Side angles and heavy shadows are the usual cause of odd mouth motion.
Step 5: Pick the voice and language
Choose a voice that matches the avatar and the script’s language. HeyGen’s pricing page lists 175 languages and dialects on both Creator and Pro. Preview two or three voices on the first scene before you commit, because a mismatch between face and voice is the first thing viewers notice. If you want your own voice, the pricing page also lists a Professional Voice Clone among its features.
Fix pronunciation now. If a product name sounds wrong, retype it phonetically in that scene and listen again. Changing the spelling costs nothing, while regenerating a finished scene on Avatar V costs credits.
Step 6: Set the aspect ratio, background and scene breaks
Pick the aspect ratio before you generate, not after. Use 16:9 (1920×1080) for a standard YouTube video and 9:16 (1080×1920) for Shorts, Reels or TikTok. Cropping a 16:9 render to vertical cuts the avatar off, and a re-render costs the same credits as the first one.
Keep the background plain or lightly branded. A busy background fights with the avatar edges and makes compression artifacts more visible. Add one scene per script chunk from step 2, in the same order, so the scene numbers in HeyGen match the clip numbers on your disk.
Step 7: Generate a cheap draft, then the final
Render the whole video once on the cheapest suitable engine. Watch for three things: timing, mispronounced words and awkward pauses between scenes. Then switch the avatar engine to your final choice and render again. Avatar III at 4 credits a minute makes this draft pass cost about a twelfth of the same pass on Avatar V at 48.
A draft engine does not look identical to the final one, so judge words and pacing on the draft and appearance only on the final. When the final render finishes, download the MP4 and keep the original file untouched. Every later step works on copies.
If you are torn between two engines, render the same 30-second scene on both and compare them side by side at full size. Look at the mouth, the eyes during pauses and the hand or shoulder motion. Pay for the more expensive engine only if you can see a difference at the size your viewers will watch. On a phone screen the gap between engines is often smaller than it looks on a desktop monitor.
Steps 8 to 9: Export and inspect the file
Step 8: Export at the resolution your plan allows
Resolution follows the plan. HeyGen’s pricing materials describe Free and Creator exports at 1080p and Pro at 4K, and the Free plan adds a watermark that Creator removes. Do not export 4K for a video that will end up on a 1080p timeline. You would pay for detail that the final encode throws away.
Render settings
The table lists the settings this project uses from here on. They are my choices for a clean YouTube upload, not HeyGen limits.
| Render setting | Value used here | Why |
|---|---|---|
| Resolution | 1920×1080 (16:9) or 1080×1920 (9:16) | Matches the avatar render, no upscale |
| Frame rate | 30 fps | One rate for every clip avoids stutter on joins |
| Video codec | H.264, yuv420p, CRF 18 | Plays everywhere, high quality for talking heads |
| Audio | AAC, 48 kHz, 192 kbps | Standard video sample rate |
| Loudness | -16 LUFS integrated, -1.5 dB true peak | Speech-friendly level that does not clip |
| Scene length | Under 90 words, about 35 s | Cheap redo of a single scene |
| Container | MP4 with faststart | Starts playing before the full download |
Step 9: Inspect the export with ffprobe
Never trust a filename. Probe the download to confirm resolution, frame rate and audio before you build on it. A frame rate you did not expect is the number one cause of choppy joins later.
ffprobe -v error -select_streams v:0 \
-show_entries stream=codec_name,width,height,r_frame_rate \
-show_entries format=duration -of default=nw=1 avatar_raw.mp4
The output is a plain list of keys and values. The values below are placeholders to show the shape, so expect your own numbers:
codec_name=h264
width=1920
height=1080
r_frame_rate=30/1
duration=187.400000
If r_frame_rate shows something other than the 30 fps you planned, do not panic. Step 10 re-encodes every clip to one rate. If the width and height are wrong, fix the aspect ratio in HeyGen and regenerate, because stretching in FFmpeg will distort the avatar.
Steps 10 to 12: Finish the video with FFmpeg
Step 10: Join the scenes into one clip
The concat demuxer joins clips listed in a text file. Re-encode instead of stream-copying, because scenes rendered at different times can differ in tiny timing details that break a copy join. The command below also locks the frame rate to 30 fps and the audio to 48 kHz.
mkdir -p out
ffmpeg -y -f concat -safe 0 -i scenes.txt \
-c:v libx264 -crf 18 -preset slow -r 30 -pix_fmt yuv420p \
-c:a aac -ar 48000 -b:a 192k out/avatar_joined.mp4
The file scenes.txt is the manifest that the Python script in step 13 writes. If you built the scenes by hand in the editor, create the file yourself with one line per clip in the form file '/full/path/scene01.mp4'.
Step 11: Normalise the loudness
Voices from different scenes can sit at slightly different levels. The loudnorm filter brings the whole file to one target. Copy the video stream untouched so this step costs no video quality.
ffmpeg -y -i out/avatar_joined.mp4 \
-af loudnorm=I=-16:TP=-1.5:LRA=11 \
-c:v copy -c:a aac -b:a 192k -ar 48000 out/avatar_loud.mp4
Single-pass loudnorm is good enough for spoken word. For music-heavy mixes, run the filter twice and feed the measured values back in, but an avatar voice alone rarely needs that.
Step 12: Add an intro, an outro and captions
An avatar video that opens cold feels flat. A three-to-five-second intro and a short outro frame it as part of your channel. If you do not have one yet, intro themes list their resolution, length and frame rate on each page, which makes it easy to pick one that matches your 1080p, 30 fps timeline.
The filter graph below scales every input to 1920×1080, forces 30 fps, resamples all audio to 48 kHz and concatenates the three clips. The pad step keeps the original proportions if an intro has a different shape.
ffmpeg -y -i intro.mp4 -i out/avatar_loud.mp4 -i outro.mp4 \
-filter_complex "\
[0:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30,format=yuv420p[v0];\
[1:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30,format=yuv420p[v1];\
[2:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30,format=yuv420p[v2];\
[0:a]aresample=48000[a0];[1:a]aresample=48000[a1];[2:a]aresample=48000[a2];\
[v0][a0][v1][a1][v2][a2]concat=n=3:v=1:a=1[v][a]" \
-map "[v]" -map "[a]" -c:v libx264 -crf 18 -preset slow \
-c:a aac -b:a 192k -movflags +faststart out/final_1080p30.mp4
Captions help viewers who watch muted, and they hide small pronunciation quirks. Export an SRT file from your captioning tool, then burn it in with one more command. Keep lines short so they fit inside the frame.
ffmpeg -y -i out/final_1080p30.mp4 \
-vf "subtitles=captions.srt:force_style='FontSize=22,Outline=2,MarginV=40'" \
-c:v libx264 -crf 18 -preset slow -c:a copy out/final_captioned.mp4
Burned-in captions cannot be switched off. If you upload to YouTube, uploading the SRT as a separate track is the better route, and this burn-in step is for platforms that lack caption tracks. Also check each platform’s rules for labelling synthetic or AI-generated presenters before you publish.
Step 13: Generate the same scenes through the API
The API is the right tool when you produce the same kind of video every week. HeyGen’s API runs on a pay-as-you-go credit model, according to documentation dated November 2026, and the help article on API pricing lists example figures of $4.83 (97 credits) for Studio Avatar generation, $2.13 (43 credits) for Digital Twin creation and $1.32 (26 credits) for Photo Avatar creation. Check the unit on that page before you budget, because the article describes some prices per call and others per minute.

The same documentation reportedly lists Avatar V generation at $7.20 a minute for digital twins and $2.31 a minute for photo avatars, and Avatar III at $0.60 a minute for digital twins and $0.99 a minute for studio and photo avatars. Treat those as figures to confirm against the live page. The article does not list an Avatar 6 API rate that this tutorial could verify.
The script below splits a script file into scenes with the step 2 function, submits each scene, polls until it finishes, downloads the MP4 and writes the scenes.txt manifest. It hashes each request, so a scene you have already paid for is never regenerated. The request shape follows HeyGen’s v2 generate pattern. Confirm the endpoint paths and field names at developers.heygen.com before the first paid run, since the script keeps them in two small functions for easy edits.
import argparse
import hashlib
import json
import os
import pathlib
import time
import requests
from split_script import split_scenes
API = "https://api.heygen.com"
CACHE = pathlib.Path("cache")
POLL_SECONDS = 15
GIVE_UP_AFTER = 30 * 60
def build_payload(avatar_id, voice_id, text, width, height):
return {
"video_inputs": [{
"character": {"type": "avatar", "avatar_id": avatar_id, "avatar_style": "normal"},
"voice": {"type": "text", "input_text": text, "voice_id": voice_id},
}],
"dimension": {"width": width, "height": height},
}
def cache_key(payload):
blob = json.dumps(payload, sort_keys=True).encode("utf-8")
return hashlib.sha256(blob).hexdigest()[:16]
def submit(payload, headers):
r = requests.post(f"{API}/v2/video/generate", headers=headers, json=payload, timeout=60)
r.raise_for_status()
return r.json()["data"]["video_id"]
def wait_for(video_id, headers):
waited = 0
while waited < GIVE_UP_AFTER:
r = requests.get(f"{API}/v1/video_status.get", headers=headers,
params={"video_id": video_id}, timeout=60)
r.raise_for_status()
data = r.json()["data"]
if data["status"] == "completed":
return data["video_url"]
if data["status"] == "failed":
raise RuntimeError(f"render failed: {data.get('error')}")
time.sleep(POLL_SECONDS)
waited += POLL_SECONDS
raise TimeoutError(f"video {video_id} still not ready, check the dashboard before resubmitting")
def download(url, dest):
with requests.get(url, stream=True, timeout=120) as r:
r.raise_for_status()
with open(dest, "wb") as f:
for chunk in r.iter_content(1 << 20):
f.write(chunk)
def main():
p = argparse.ArgumentParser()
p.add_argument("script")
p.add_argument("--avatar", required=True)
p.add_argument("--voice", required=True)
p.add_argument("--size", default="1920x1080")
p.add_argument("--dry-run", action="store_true")
args = p.parse_args()
width, height = (int(x) for x in args.size.split("x"))
scenes = split_scenes(open(args.script, encoding="utf-8").read())
CACHE.mkdir(exist_ok=True)
headers = {"X-Api-Key": os.environ.get("HEYGEN_API_KEY", ""), "Content-Type": "application/json"}
manifest = []
for i, text in enumerate(scenes, 1):
payload = build_payload(args.avatar, args.voice, text, width, height)
out = CACHE / f"scene{i:02d}_{cache_key(payload)}.mp4"
manifest.append(out)
if out.exists():
print(f"scene {i:02d}: cached -> {out}")
continue
if args.dry_run:
print(f"scene {i:02d}: would submit {len(text.split())} words as {width}x{height}")
continue
video_id = submit(payload, headers)
print(f"scene {i:02d}: submitted {video_id}")
download(wait_for(video_id, headers), out)
print(f"scene {i:02d}: saved {out}")
if not args.dry_run:
with open("scenes.txt", "w", encoding="utf-8") as f:
for out in manifest:
f.write(f"file '{out.resolve()}'\n")
if __name__ == "__main__":
main()
Always run the dry run first. It splits the script, hashes each scene, reports what it would submit and spends nothing. With a short test script the output is:
$ python3 heygen_generate.py script.txt --avatar AVATAR_ID --voice VOICE_ID --dry-run
scene 01: would submit 84 words as 1920x1080
scene 02: would submit 27 words as 1920x1080
For a real run, export your key with export HEYGEN_API_KEY=your_key_here and drop the flag. A successful run prints one submitted line and one saved line per scene. A second run prints cached lines for every scene that has not changed.
The complete working project
Put the pieces together and the project is five small files and two folders. Everything is plain text, so it also works well in version control. The API script is optional. If you build scenes by hand in the editor, skip it and write scenes.txt yourself.
heygen-project/
script.txt your spoken script
split_script.py step 2, splits into scenes
calc_credits.py step 3, credit budget
heygen_generate.py step 13, API render with cache
post.sh steps 10 to 12, FFmpeg finish
intro.mp4 your 1080p 30 fps intro
outro.mp4 your 1080p 30 fps outro
captions.srt optional captions
cache/ created by the script
out/ created by post.sh
The last file is the finishing script. It runs steps 10 to 12 in order and stops at the first error, so a failed join never feeds a bad file into the loudness step.
#!/bin/sh
set -eu
mkdir -p out
ffmpeg -y -f concat -safe 0 -i scenes.txt \
-c:v libx264 -crf 18 -preset slow -r 30 -pix_fmt yuv420p \
-c:a aac -ar 48000 -b:a 192k out/avatar_joined.mp4
ffmpeg -y -i out/avatar_joined.mp4 \
-af loudnorm=I=-16:TP=-1.5:LRA=11 \
-c:v copy -c:a aac -b:a 192k -ar 48000 out/avatar_loud.mp4
ffmpeg -y -i intro.mp4 -i out/avatar_loud.mp4 -i outro.mp4 \
-filter_complex "\
[0:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30,format=yuv420p[v0];\
[1:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30,format=yuv420p[v1];\
[2:v]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30,format=yuv420p[v2];\
[0:a]aresample=48000[a0];[1:a]aresample=48000[a1];[2:a]aresample=48000[a2];\
[v0][a0][v1][a1][v2][a2]concat=n=3:v=1:a=1[v][a]" \
-map "[v]" -map "[a]" -c:v libx264 -crf 18 -preset slow \
-c:a aac -b:a 192k -movflags +faststart out/final_1080p30.mp4
echo "done: out/final_1080p30.mp4"
The full run, from script to file, takes five commands:
python3 split_script.py script.txt
python3 calc_credits.py 600 29
python3 heygen_generate.py script.txt --avatar AVATAR_ID --voice VOICE_ID --dry-run
python3 heygen_generate.py script.txt --avatar AVATAR_ID --voice VOICE_ID
sh post.sh
When it finishes you have out/final_1080p30.mp4, a 1080p, 30 fps H.264 file with AAC audio at 48 kHz, normalised to -16 LUFS, with your intro and outro attached. Upload that file, not the raw HeyGen download.
Before you upload, run a short quality check on the final file. Each item takes under a minute and catches the problems viewers actually complain about:
- Play the first and last ten seconds with sound on, to confirm the intro and outro joins have no pop or gap.
- Scrub through each scene boundary, because a lip-sync or tone shift usually shows up there first.
- Run
ffprobeon the final file and confirm 1920×1080, 30 fps and 48 kHz audio. - Watch one minute on a phone speaker, since that is where a too-quiet voice or crowded captions show up.
- Read the captions against the script for names and numbers that the voice may have read differently.
Common pitfalls
Rendering every draft on the top engine. This is the most expensive habit. A draft on Avatar V burns 48 credits a minute to check words that Avatar III checks for 4. Draft cheap, finish expensive.
Regenerating a whole video for one fix. A single long render turns a one-word typo into a full-price redo. Scene-sized renders and the hash cache in step 13 mean you pay again only for the scene you edited.
Writing for the eye instead of the ear. Dense sentences with brackets and long lists sound robotic even on the best voice. Cut every sentence that you cannot say in one breath.
Choosing the aspect ratio last. Horizontal and vertical are separate renders. Decide the platform first, because converting afterwards crops the presenter or adds black bars.
Building a workflow on a promotion. Voice Turbo is free to try only through November 30, 2026, on shared capacity, and HeyGen does not describe it as a guaranteed production tier. Free trials end, so price your pipeline on the standard rates.
Joining clips in alphabetical order by accident. A glob such as cache/scene*.mp4 also picks up old renders of scenes you later edited. That is why the script writes a manifest of exactly the files it used.
Skipping consent and disclosure. Never build a custom avatar from someone’s face or voice without their agreement, and check each platform’s labelling rules for synthetic presenters. Both are easier to settle before publishing than after a takedown.
Troubleshooting
- The export has a watermark. The Free plan adds one, and the Creator plan removes it. Upgrade the plan, or accept the watermark for drafts only.
- Credits vanish faster than the calculator predicts. Check which engine each scene used, then count retakes. Re-run
calc_credits.pywith the real pool and a bigger retake factor. - The mouth looks wrong on a photo avatar. The source photo is usually the cause. Use a sharp, front-facing image with even light and a closed mouth, and avoid a heavy head tilt.
- A brand name sounds wrong. Respell it phonetically in the script for that scene and regenerate only that scene. Keep the real spelling in your captions.
- The export is 1080p when you expected 4K. HeyGen’s pricing materials describe 4K on Pro, not on Creator or Free. Check the plan and the export setting before you regenerate.
- The API rejects your key. The key is missing or the header name is wrong. Confirm that
HEYGEN_API_KEYis set in the same shell and that you copied the full key. - The API refuses the job for lack of credits. HeyGen has not offered free API credits since February 2026, so an empty balance means an empty balance. Top up the API balance and try again.
- The script times out while a video is still processing. Do not resubmit straight away, or you may pay twice. Check the dashboard first, then rerun the script. The cache skips every scene that is already on disk.
- FFmpeg reports mismatched streams during the join. The clips differ in frame rate or sample rate. Use the re-encode command from step 10 instead of
-c copy. - Audio drifts out of sync after joining. Add
aresample=async=1to the audio filter, and confirm every clip reports 48 kHz audio with ffprobe. - The intro looks stretched. It has a different aspect ratio. The pad filter in step 12 keeps proportions, so check that you used it rather than a plain scale.
- Captions run off the screen. Break lines at about 40 characters in the SRT file and raise
MarginVin the style string.
HeyGen alternatives compared
HeyGen AI avatars are not the only credit-metered option. The table lists the newest avatar model each vendor names on its own pages and one price or allowance anchor. Prices were checked on November 25, 2026. Colossyan advertises a Black Friday discount and Synthesia reportedly runs one too, so a headline price may differ from a sale price.
| Tool | Newest avatar model named | Allowance or price anchor | Best fit |
|---|---|---|---|
| HeyGen | Avatar 6 | Free: 3 watermarked videos a month. Creator: $29 a month | Creator-led presenter videos and translation |
| Synthesia | Express-3 | Basic: 500 credits a month, about 10 minutes. Extra members $20 a month | Corporate and training video |
| D-ID | V4 Expressive Avatars | 14-day trial with 3 minutes. Pro: $16 a month billed annually | Talking photos and real-time agents |
| Colossyan | NEO and NEO 2 | Studio avatars: $1,000 a year add-on | Training courses with SCORM export |
| Hedra | Character 3 (March 2025) | Developer API with usage-based billing | Character-led and audio-driven clips |
Synthesia moved to a shared credit system on October 1, 2026. Its conversion table puts a finished minute of standard video at about 100 credits, dubbing at 40 credits a minute without lip-sync and 80 with it. Synthesia’s help centre explains how the shared credit pool works on the Team plan. The company also launched Syren in beta, a tool that builds video and motion graphics from a prompt, and Synthesia’s Basic plan caps Syren videos at three minutes.
D-ID’s V4 Expressive Avatars are built from recordings of several emotional expressions, and V4 custom avatars are Enterprise-only. D-ID says V2, V3 Pro and V4 can stream for real-time use, while V3 Instant cannot. Its own comparison page reportedly lists a paid plan from $4.70 a month billed annually. Studio plans are measured in monthly minutes, not general credits.
Colossyan prices by video minute, not by credit, and it supports 120-plus languages. SCORM export starts on its Professional plan at five exports a month. Colossyan’s pricing page reportedly lists Professional at $59 a month on annual billing. Hedra is closer to a developer platform, and its own model page lists a long-form avatar model of up to 10 minutes with per-second prices of 2.5 cents at 540p, 5 cents at 720p and 6.25 cents at 1080p.
Which one fits depends on the job. For a creator who wants quick talking-head clips, HeyGen’s per-minute credit rates are the easiest to model. For training libraries, Colossyan and Synthesia are built around courses and teams. For a one-off talking photo, D-ID’s lower entry price may be enough. Whatever you pick, run the same budget calculation first, because every vendor here meters usage in a different unit.
Advanced tips
Cache by content, not by name. This is the habit that matters most when you run HeyGen AI avatars through a script. The hash in step 13 covers avatar, voice, text and size. Change any one and the scene regenerates, change none and it does not. That single rule saves more credits than any plan upgrade.
Batch overnight. Put several scripts in a folder and loop the script over them with a shell for loop. Because each scene is cached, a crash at scene nine does not cost you scenes one to eight.
Switch engines per scene. The hash includes the avatar ID, so you can render a plain explanation on a cheaper engine and keep the highest-fidelity engine for the hook and the call to action. Check that the two engines match in skin tone and framing before you mix them.
Reuse the avatar and swap the voice. HeyGen lists 175 languages and dialects on paid plans. A translated version of the same video reuses your edit structure, and you only regenerate the speech and mouth motion.
Match the bumper to the presenter. A flat, corporate avatar next to a loud, fast intro feels like two videos glued together. Browse sample intros and pick one whose pace and colour match the avatar scene.
Use real-time avatars for Q&A, not for polished video. LiveAvatars are built for live conversation. Scripted explainers belong in the standard avatar pipeline, where you can retake a line and control the final encode.
Keep a failure log. Note which scenes needed retakes and why. After three videos you will know whether your credit buffer should be 1.2x or 2x, and you can set the calculator to match.
Questions creators ask
Is HeyGen free to use?
HeyGen has a Free plan that costs $0. It allows three videos a month with a watermark. Paid plans start with Creator at $29 a month, or about $24 a month billed annually.
What is the newest HeyGen avatar model?
HeyGen lists Avatar 6 as its newest avatar model. Its catalog also lists Avatar V, Avatar IV and Avatar III. Avatar V is described as the highest-fidelity engine and Avatar III as the lower-cost one.
How many credits does a minute of avatar video cost?
HeyGen’s published examples list Avatar III video look at 4 credits a minute, Avatar IV photo look at 16, Avatar IV video look at 31 and Avatar V at 48. Check the in-app credit meter for Avatar 6, since this article could not confirm its rate.
Does HeyGen offer free API credits?
No. HeyGen’s documentation says it has not offered free API credits since February 2026. The API runs on paid credits, so use a dry run for testing.
Can I use a HeyGen avatar as a YouTube intro?
Yes, but keep it short. A presenter clip of a few seconds works as a hook, and a longer one delays the content. The Free plan adds a watermark, so use a paid plan for anything you publish.
What are the main HeyGen alternatives?
Synthesia, D-ID, Colossyan and Hedra are all active as of November 25, 2026. Synthesia’s Basic plan includes 500 credits a month, enough for about 10 minutes of video. D-ID’s Pro plan costs $16 a month billed annually.
Do I need FFmpeg to use HeyGen?
No. You can download the MP4 from HeyGen and edit it in any video editor. FFmpeg only makes the join, loudness and overlay steps repeatable, which matters once you make several videos a month.
- Vipid intro maker template-based intros, no prompt needed
- Logo Design animated logo intro from your logo file
- Promo product promo theme
- Sample videos finished Vipid intros
Lena Marsh
Lena Marsh is the AI Video Editor at Vipid, covering AI video generators and the platform and software news that changes how creators render, upload and stream. She judges every model by its output — clip length, resolution, frame rate, watermark and cost — rather than by announcements, and runs Vipid’s news radar across the official YouTube, Apple, Adobe, Blackmagic, OBS, OpenAI and Google sources.


