Skip to Content
DocumentationModelsVideoHeyGen Avatar 6

HeyGen Avatar 6

Use heygen-avatar-6 to create video output. This page contains the complete request needed for this model.

Model facts

PropertyValue
Model IDheygen-avatar-6
EndpointPOST /api/v1/generation/create
OutputVideo
Modesportrait and audio to video, reference video and audio to video
PricingView current pricing 

Minimal request

curl -X POST https://api.api-stock.com/api/v1/generation/create \ -H "Authorization: Bearer $API_STOCK_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "heygen-avatar-6", "input": { "audioUrl": "https://example.com/input.mp3", "imageUrls": [ "https://example.com/portrait.jpg" ] } }'

The create response contains a task ID:

{ "code": 200, "data": { "taskId": "019ca881-9503-7270-a560-f00fc2b15785", "status": "not_started", "createdAt": "2026-08-22T12:00:00.000Z" } }

Parameters

Parameters belong inside the top-level input object. Unknown fields are rejected.

ParameterTypeRequiredDefaultDescription
audioUrlstringYes—Public URL of the speech audio (2–60 seconds, maximum 15 MB). Video length follows the audio. Billing rounds the audio duration up to whole seconds.
resolution“1080p” | “2K”No"1080p"Output resolution
promptstringNo—Optional direction for the avatar’s gestures, expression and posture. max 1200 chars
videoUrlstringNo—Public URL of an animated or illustrated character video, at least 2 seconds long and up to 50 MB. Providing videoUrl selects video-to-video mode. The output follows the video’s aspect ratio.
imageUrlsstring[]No—Public URL of one portrait image, required when videoUrl is omitted. In image-to-video mode the output follows the portrait’s aspect ratio. With videoUrl, you may supply an image of the same character.

Modes

Portrait and audio

{ "model": "heygen-avatar-6", "input": { "audioUrl": "https://example.com/input.mp3", "imageUrls": [ "https://example.com/portrait.jpg" ] } }

Reference video and audio

{ "model": "heygen-avatar-6", "input": { "audioUrl": "https://example.com/input.mp3", "videoUrl": "https://example.com/character.mp4" } }

Constraints

  • resolution: allowed: 1080p, 2K.
  • prompt: maximum 1200 characters.

Invalid types, unsupported enum values, out-of-range numbers, and missing required fields return HTTP 400 with error.code: "invalid_input". Correct the request rather than retrying it unchanged.

Result

Poll the task or provide a top-level webhook URL in the create request:

curl https://api.api-stock.com/api/v1/task/status/$TASK_ID \ -H "Authorization: Bearer $API_STOCK_KEY"

A successful media task returns one or more files:

{ "code": 200, "data": { "taskId": "019ca881-9503-7270-a560-f00fc2b15785", "status": "finished", "files": [ { "fileUrl": "https://s3.api-stock.com/result.mp4", "fileType": "video" } ], "createdTime": "2026-08-22T12:00:00.000Z" } }

See Tasks and webhooks for terminal statuses, retries and webhook delivery.