HeyGen Avatar IV API Usage Guide
Overview
HeyGen Avatar IV is HeyGen’s latest avatar video generation model. It produces highly realistic, lip-synced avatar videos from a text script, supporting a wide range of avatars, voices, background styles, and resolutions up to 4K.Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header:Submit Video Generation Request
Base URL
Endpoint
Request Format
Request Parameters
Top-Level Fields
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
video_inputs | array | Yes | Array of video clip inputs. Each element defines one avatar segment. | - |
dimension | object | No | Output video resolution {"width": int, "height": int}. | {"width": 1280, "height": 720} |
caption | boolean | No | Enable auto-generated captions on the video. | false |
title | string | No | Optional title label for the video. | "" |
video_inputs[].character
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Avatar type. Options: "avatar", "talking_photo" |
avatar_id | string | Yes | Unique ID of the avatar to use. Obtain from GET /v2/avatars. |
avatar_style | string | No | Layout style. Options: "normal", "circle", "closeUp". Default: "normal" |
scale | float | No | Avatar scale. Range: 0.0–5.0. Default: 1.0 |
offset | object | No | Position offset {"x": float, "y": float}. Default: {"x": 0, "y": 0} |
video_inputs[].voice
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Voice source type. Options: "text", "audio", "silence" |
input_text | string | Yes (if type=text) | Script text for the avatar to speak. Max 5000 characters. |
voice_id | string | Yes (if type=text) | Voice ID. Obtain from GET /v2/voices. |
speed | float | No | Speaking speed. Range: 0.5–1.5. Default: 1.0 |
pitch | integer | No | Voice pitch adjustment. Range: -50 to 50. Default: 0 |
emotion | string | No | Emotion style. Options: "Excited", "Friendly", "Serious", "Soothing", "Broadcaster" |
dimension options
| Resolution | Width | Height |
|---|---|---|
| 720p | 1280 | 720 |
| 1080p | 1920 | 1080 |
| 4K (enterprise only) | 3840 | 2160 |
Response
Check Request Status
Endpoint
Example
Response (completed)
Request Status Values
| Status | Description |
|---|---|
queued | Request is waiting to be processed |
processing | Video generation is in progress |
success | Video generation completed successfully |
failed | Video generation failed |
cancelled | Request was cancelled |