Documentation Index
Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
Use this file to discover all available pages before exploring further.
Model ID
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:
Authorization: Bearer YOUR_API_KEY
Submit Video Generation Request
Base URL
https://console.gmicloud.ai
Endpoint
POST /api/v1/ie/requestqueue/apikey/requests
curl -X POST "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "heygen-avatar-4",
"payload": {
"video_inputs": [
{
"character": {
"type": "avatar",
"avatar_id": "YOUR_AVATAR_ID",
"avatar_style": "normal"
},
"voice": {
"type": "text",
"input_text": "Hello, welcome to HeyGen avatar video generation.",
"voice_id": "YOUR_VOICE_ID",
"speed": 1.0,
"pitch": 0
}
}
],
"dimension": {
"width": 1920,
"height": 1080
},
"caption": false
}
}'
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. | "" |
| 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} |
| 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
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"model": "heygen-avatar-4",
"status": "queued",
"created_at": 1762215580,
"updated_at": 1762215580,
"queued_at": 1762215580
}
Check Request Status
Endpoint
GET /api/v1/ie/requestqueue/apikey/requests/{request_id}
Example
curl -X GET "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Authorization: Bearer YOUR_API_KEY"
Response (completed)
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"org_id": "your-org-id",
"model": "heygen-avatar-4",
"status": "success",
"is_public": false,
"payload": {
"video_inputs": [...],
"dimension": {"width": 1920, "height": 1080},
"caption": false
},
"outcome": {
"media_urls": [
{
"id": "0",
"url": "https://storage.googleapis.com/your_avatar_video.mp4"
}
],
"thumbnail_image_url": "https://storage.googleapis.com/your_thumbnail.jpg",
"duration": 12.5
},
"created_at": 1762215580,
"updated_at": 1762215640,
"queued_at": 1762215580
}
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 |
List Your Requests
Endpoint
GET /api/v1/ie/requestqueue/apikey/requests?model_id=heygen-avatar-4
Example
curl -X GET "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests?model_id=heygen-avatar-4" \
-H "Authorization: Bearer YOUR_API_KEY"
Endpoint
GET /api/v1/ie/requestqueue/apikey/models/heygen-avatar-4