HeyGen
An AI avatar video generation service
An AI avatar video generation service
HeyGen is a service that generates videos in which an AI avatar speaks naturally when you enter text or a script. Founded in 2020, it is widely used for corporate training, marketing, and social media content creation.
HeyGen's core technologies are deep learning-based lip-sync and facial animation. It converts text to speech (TTS) and generates the avatar's lip movements and facial expressions in real time to match this speech. It supports more than 100 languages and more than 300 voices.
Its main features include using stock avatars, creating custom avatars from photos, and creating digital twins trained on videos of real people. In particular, the Video Translate feature dubs an existing video into another language while naturally converting even the lip movements.
Companies use HeyGen for large-scale training content production, multilingual marketing videos, personalized sales messages, and more. It provides an API that can be integrated into your own services, and it is possible to build workflows that automatically generate thousands of videos per month.
import requests
import time
# HeyGen API를 사용한 비디오 생성
def create_heygen_video(script, avatar_id, api_key):
base_url = "https://api.heygen.com/v2"
headers = {
"X-Api-Key": api_key,
"Content-Type": "application/json"
}
# 1. 비디오 생성 요청
payload = {
"video_inputs": [{
"character": {
"type": "avatar",
"avatar_id": avatar_id,
"avatar_style": "normal"
},
"voice": {
"type": "text",
"input_text": script,
"voice_id": "ko-KR-InJoon" # 한국어 음성
}
}],
"dimension": {"width": 1920, "height": 1080}
}
response = requests.post(
f"{base_url}/video/generate",
headers=headers,
json=payload
)
video_id = response.json()["data"]["video_id"]
# 2. 비디오 생성 완료 대기
while True:
status_response = requests.get(
f"{base_url}/video_status.get?video_id={video_id}",
headers=headers
)
status = status_response.json()["data"]["status"]
if status == "completed":
return status_response.json()["data"]["video_url"]
elif status == "failed":
raise Exception("비디오 생성 실패")
time.sleep(10) # 10초 대기 후 재확인
# 사용 예시
video_url = create_heygen_video(
script="안녕하세요, AI 기술 소개 영상입니다.",
avatar_id="Angela-inTshirt-20220820",
api_key="your-api-key"
)
print(f"생성된 비디오: {video_url}")
"We need to make the global launch video in 8 languages, and with HeyGen's Video Translate feature, we can finish in a day. It syncs the lip movements automatically too, and each video takes only 2-3 minutes."
"We're planning to make 50 new-hire onboarding videos with HeyGen. We just need to prepare the scripts and the avatar explains them automatically, so filming costs are cut by more than 90%. And for edits, we just change the text."
"We're going to automatically generate personalized sales videos with the HeyGen API. We can dynamically insert the customer's name and company name to create 1,000 customized videos. We should first check the Enterprise plan API costs."
When creating an avatar of a real person, the person's own consent is absolutely required. Creating a video with another person's face without permission can lead to legal problems.
AI avatars have less natural facial expressions than real people. There may be limitations for important presentations or official videos, so use them in accordance with the purpose.
The free plan has limited credits and adds a watermark. When generating in bulk, calculate the Enterprise plan's per-minute cost in advance.