curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "heygen/avatar-6-turbo/identity-to-video",
"input": {
"avatar": "Abigail Office Front",
"text": "Hello and welcome. In the next minute I will walk you through our new dashboard.",
"voice": "Warm Pro Narrator",
"prompt": "Speak with calm confidence and nod slightly at the end.",
"aspect_ratio": "16:9",
"resolution": "1080p"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "not_started",
"created_time": "2026-11-19T10:30:00"
}
}{
"detail": "avatar mode requires exactly one of audio_url or text"
}{
"detail": "avatar mode requires exactly one of audio_url or text"
}HeyGen
HeyGen Avatar 6 Turbo 公共形象生视频
HeyGen Avatar 6 Turbo 公共形象生视频 API 让 1,248 个 HeyGen 公共形象之一说出你的音频,或用 HeyGen 声音朗读文本,支持 1080p、2K 和 5 种宽高比。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "heygen/avatar-6-turbo/identity-to-video",
"input": {
"avatar": "Abigail Office Front",
"text": "Hello and welcome. In the next minute I will walk you through our new dashboard.",
"voice": "Warm Pro Narrator",
"prompt": "Speak with calm confidence and nod slightly at the end.",
"aspect_ratio": "16:9",
"resolution": "1080p"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "not_started",
"created_time": "2026-11-19T10:30:00"
}
}{
"detail": "avatar mode requires exactly one of audio_url or text"
}{
"detail": "avatar mode requires exactly one of audio_url or text"
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
text。全部形象和声音名称见形象与声音。
其他模式:HeyGen Avatar 6 Turbo 图生视频 / HeyGen Avatar 6 Turbo 参考视频生视频。HeyGen Avatar 6 Turbo 是 HeyGen Avatar 6 成本更低的版本,输入和模式完全相同。参见 HeyGen Avatar 6 公共形象生视频。
模型
- heygen/avatar-6-turbo/identity-to-video — HeyGen 公共形象 + 语音音频或文本生成说话视频,1080p 或 2K。
功能
- 1,248 个公共形象(156 个人物的多种造型)。
- 语音来自你的音频(2–60 秒),或由 HeyGen 声音朗读
text(最多 1,000 个字符)。 - 5 种宽高比:
16:9、9:16、1:1、4:5、5:4。 1080p或2K输出。
输入模式
| 语音来源 | 传入 | 可选 |
|---|---|---|
| 音频 | avatar、audio_url | prompt、aspect_ratio、resolution |
| 文本 | avatar、text | voice、prompt、aspect_ratio、resolution |
audio_url 和 text 必须二选一。
必填参数
avatar(string):形象与声音中的 HeyGen 公共形象名称,例如Abigail Sofa Front。名称匹配忽略大小写和多余空格。audio_url(string) 或text(string):二者恰好传一个。audio_url为语音音频,时长 2–60 秒,最大 15 MB;text为形象朗读的文本,最多 1,000 个字符。
可选参数
voice(string):仅与text一起使用。朗读文本的 HeyGen 声音,见形象与声音中的 102 个声音。默认Warm Pro Narrator。名称匹配忽略大小写和多余空格。aspect_ratio(string):16:9、9:16、1:1、4:5或5:4。默认16:9。prompt(string):对手势、表情和姿态的引导,最多 1,200 个字符。resolution(string):1080p或2K。默认1080p。
输出
- 一个口型同步的 MP4 视频,宽高比为所选
aspect_ratio。 - 视频时长跟随语音:
audio_url的时长,或形象朗读text所需的时间。
示例
- 文本:形象用指定声音朗读一段短稿,
16:9、1080p。 - 音频:形象说出一段 MP3,竖屏
9:16。
注意事项
- 提交时会按形象列表校验
avatar,未匹配到的名称返回 400,并给出最接近的名称。列表外的 HeyGen 声音名称会原样传递;若 HeyGen 拒绝该声音,任务全额退还积分。 audio_url与text二选一,voice与text搭配使用,text最多 1,000 个字符;其他组合返回 400。- 提交时会检测音频:需为 2–60 秒、最大 15 MB 且可下载,其他音频返回 400。
model和callback_url放在请求根级,与input并列。input接收上文列出的本模式字段,其他字段返回 400。- 按秒计费,单价取决于
resolution。使用audio_url时,提交时按音频时长(向上取整到整秒)扣费。使用text时先按文字估算视频秒数(约每秒 14 个拉丁字符、4.5 个中日韩字符或 3 个数字,最少 1 秒),乘以 1.5 并向上取整后在提交时预扣;任务成功后按实际视频时长(向上取整到整秒)结算并退还差额,最终扣费最多为预扣金额。任务失败会全额退还。当前费率见定价页。
请求体
application/json