HeyGen Avatar 6 API, HeyGen Avatar 5 API, HeyGen Voice API, HeyGen Video API, HeyGen Lipsync API: Pricing, Documentation

by HeyGen

Through Pixazo's API, developers can generate speech and video with HeyGen's models. HeyGen Voice turns up to 5,000 characters of text into speech with one of 24 voices or a voice cloned from a recording of a single speaker, in 39 languages, and returns a WAV file. HeyGen Voice Turbo accepts the same inputs. HeyGen Video makes clips of 5 to 15 seconds with sound from a prompt, which can be paired with a first-frame image or with reference images, videos and audio, at resolutions up to 2K. HeyGen Video Agent 3.0 handles scriptwriting, avatar selection, scene composition and production from a single prompt, and HeyGen v3 Lipsync Precision re-syncs the lips in a talking-head video to a new audio track.

Get API Key
HeyGen API

Models Version

WELCOME BONUS

Get 10% Cashback on Your First Payment (up to $500)

Add funds and get 10% cashback on your first payment (up to $500).

Claim Your Cashback →

HeyGen Avatar 6 API Documentation

Make a talking-head video from one photo and a speech recording with HeyGen Avatar 6: send a photo of a person in image_url and the speech in audio_url. The person in the photo speaks your audio with matching lip movement, facial expression and natural gestures. The video is as long as the audio and keeps the shape of the photo. HeyGen Avatar 6 Turbo takes the same inputs at a lower cost. To animate a cartoon or illustrated character from a short video, use Video to Video (POST https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video); to have one of HeyGen's stock avatars speak a script, use Text to Video (POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - HeyGen Avatar 6

Request Code

POST https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "motion_prompt": "Look at the camera and speak warmly, with small natural nods."
}
import requests

url = "https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "motion_prompt": "Look at the camera and speak warmly, with small natural nods."
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "motion_prompt": "Look at the camera and speak warmly, with small natural nods."
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3", "motion_prompt": "Look at the camera and speak warmly, with small natural nods."}'

Output

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3", "motion_prompt": "Look at the camera and speak warmly, with small natural nods."}'

Callback Payload (success)

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T01:03:28.007Z",
  "updated_at": "2026-11-18 01:05:58",
  "completed_at": "2026-11-18 01:05:57"
}

Failure callback shape

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-avatar-6",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
image_urlYesrequiredstring—One publicly reachable https URL of a JPEG, PNG or WebP photo, up to 32 MB
The person who speaks: one clearly visible, human-like face (a photo, or a realistic illustration of a person). The video keeps the photo's shape.
audio_urlYesrequiredstring—One publicly reachable https URL of a speech recording (MP3, WAV, FLAC, OGG, M4A or AAC), at most 300 seconds long
The speech the person performs. The video is as long as the audio.
resolutionNostring"1080p"1080p, 2k
The size of the video, written exactly as listed: the short side is 1080 pixels at 1080p and 1620 pixels at 2k (see Output size).
motion_promptNostring—Up to 1200 characters
Plain-language direction for gestures, facial expression, posture and camera, for example Smile warmly and use small, open-handed gestures. Where it covers the same thing as motion_expressiveness, the prompt wins.
motion_expressivenessNostring"default"default, less
less gives fewer, smaller gestures and calmer facial expressions. It does not turn motion off.
service_tierNostring"default"default, fast
fast renders the video up to 2.5 times faster and is billed at twice the per-second rate (see Speed). Written exactly as listed.

Good to know

  • Each request returns one video, as long as the speech in audio_url. Send one request per video.
  • The speech always comes from your audio: there is no script or voice setting on this API. To have a stock avatar speak a script, use Text to Video.
  • The video keeps the shape of your photo; there is no aspect-ratio setting.
  • Use the JSON types shown: every field is a string. Omit a field instead of sending null.
  • Use only faces you have the right to use: your own, a person who has agreed, or a licensed stock image. A photo you found online is not permission to use someone's face.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged. Omit a field instead of sending null.

ParameterWhy
audio, audio_asset_idNot accepted. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
audio_urlsNot accepted: send one speech file. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
avatar_id, avatarNot accepted on this endpoint. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video.
background, remove_background, caption, watermark, title, folder_id, brand_glossary_id, reference_look_id, more_blinkingNot supported on HeyGen Avatar 6.
batch_size, num_images, number_of_images, n, count, num_outputs, num_videosNot supported: each request returns one video. Send one request per video.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_url, webhook_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
contentNot accepted. Send the photo in 'image_url' and the speech in 'audio_url'.
duration, seconds, num_frames, frames_per_second, fps, music_length_msNot accepted: the video is as long as the audio in 'audio_url' (1 to 300 seconds).
expressivenessNot accepted on HeyGen Avatar 6: use 'motion_expressiveness' ("default" or "less").
imageNot accepted. Send the photo as 'image_url', a public https URL of a JPEG, PNG or WebP file.
images, image_urls, reference_imagesNot accepted: send at most one photo. Send the photo as 'image_url', a public https URL of a JPEG, PNG or WebP file.
model, engineNot accepted: this endpoint always runs HeyGen Avatar 6. For Avatar 6 Turbo use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/image-to-video.
negative_promptNot supported. Describe the motion you want in 'motion_prompt'.
output_formatNot supported: the video is always an MP4.
output_width, output_height, width, height, aspect_ratioNot supported: the video keeps the photo's shape, sized by 'resolution' (1080p: 1080 px on the short edge; 2k: 1620 px).
parameters, inputNot accepted: send the fields at the top level of the JSON body.
promptNot accepted. Describe gestures, expression and camera in 'motion_prompt'; the speech comes from 'audio_url'.
reference_videos, reference_video, video, video_urlNot accepted on this endpoint. To animate a character from a video, use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video.
streamNot supported on this API: the result is delivered when the job completes.
text, scriptNot accepted: the avatar performs the speech in 'audio_url'. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video.
typeNot accepted: this endpoint sets it.
voiceNot supported: the avatar performs the speech in 'audio_url' as recorded. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video.
voice_id, voice_settings, speedNot supported: the avatar performs the speech in 'audio_url' as recorded.
webhook_modeNot accepted in the JSON body. Send it as the X-Webhook-Mode request header instead.

Audio and Length

  • Send the speech as one direct, publicly reachable https link in audio_url. The video is as long as the recording, and can be about a tenth of a second shorter.
  • A recording longer than 300 seconds is refused, and nothing is charged.
  • Use a clean recording of one person speaking: music or several voices make the lip movement less accurate.
  • The video's sound track is your recording.

Photo and Output size

  • Send one photo in image_url: a direct, publicly reachable https link to a JPEG, PNG or WebP file. A list of images is refused.
  • The photo must show one clearly visible, human-like face. A photo where no face can be found ends with status: "ERROR", and nothing is charged.
  • Use only faces you have the right to use: your own, a person who has agreed, or a licensed stock image.

The video keeps the photo's aspect ratio; resolution sets the length of its short side:

resolutionShort side16:9 photo9:16 photo
1080p (default)1080 px1920 × 10801080 × 1920
2k1620 px2880 × 16201620 × 2880

At launch, a 5.88-second video made from a 6.0-second recording and a 1920×1080 photo came back as 1920×1080 at 25 frames per second, with the speech as its sound track. The video is an MP4 file.

Example: 2k with calmer motion

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "resolution": "2k",
  "motion_expressiveness": "less",
  "motion_prompt": "Face the camera with a warm expression and use small, natural hand gestures."
}

Speed

Set service_tier to fast to have the video rendered up to 2.5 times faster. It is billed at twice the per-second rate for the same resolution. default, or leaving the field out, renders at the normal speed and rate. The time until the finished video is ready also depends on queueing and on final processing, so it is shorter, not 2.5 times shorter.

Example: fast rendering

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "service_tier": "fast"
}

Timing

At launch, the 6-second video took about 140 seconds from submit to result. Longer recordings and 2k take longer. Poll the status endpoint every 10 seconds or so, or use a Webhook.

Example Request

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "motion_prompt": "Look at the camera and speak warmly, with small natural nods."
}

Example Response

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty image_url or audio_url, or either sent as anything other than a single stringsynchronous 400
resolution, motion_expressiveness or service_tier not one of the allowed values (written exactly as listed)synchronous 400
motion_prompt not a string, or longer than 1200 characterssynchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A recording longer than 300 seconds (nothing is charged)synchronous 400
A photo where no face can be found, or a file the model cannot use (nothing is charged)status: "ERROR"
A photo or recording the model refuses under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing audio_url (synchronous 400)

Sent {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required",
  "violations": [
    "'audio_url' is required"
  ]
}

A value that is not allowed (synchronous 400)

Sent {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "resolution": "2k", "motion_expressiveness": "high"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required; 'motion_expressiveness' must be one of: \"default\", \"less\" (got \"high\")",
  "violations": [
    "'audio_url' is required",
    "'motion_expressiveness' must be one of: \"default\", \"less\" (got \"high\")"
  ]
}

A field this API does not accept (synchronous 400)

Sent {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "num_images": 2}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required; 'num_images' must be one of:  (got 2); 'num_images' is not supported: each request returns one video. Send one request per video.",
  "violations": [
    "'audio_url' is required",
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: each request returns one video. Send one request per video."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen Avatar 6 request at launch; the request id is masked.

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T01:03:28.007Z",
  "updated_at": "2026-11-18 01:05:58",
  "completed_at": "2026-11-18 01:05:57"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-avatar-6 for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the output video: the amount is the per-second rate for the video's resolution and speed (service_tier) times the length of the video in whole seconds. The length is rounded up to the next whole second, except that up to a twentieth of a second past a whole second is not counted, and every video counts at least 1 second: a 5.03-second video is billed as 5 seconds, a 5.2-second video is billed as 6 seconds and a 0.8-second video is billed as 1 second. The video is as long as your recording, so a longer recording costs more, 2k has a higher per-second rate than 1080p, and fast is billed at twice the default rate; the photo, motion_prompt and motion_expressiveness do not change the rate. A hold is placed when the request is submitted; when the video is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rates are shown in the pricing panel on this page.

HeyGen Avatar 6 API Pricing — Per-Second Rates

Billed per second of video at the requested resolution (1080p or 2k) and speed (service_tier: default, or fast at twice the rate); 1080p and default are the defaults. The video is as long as the speech audio, up to 300 seconds.

ResolutionPrice (USD)
1080p$0.105/sec
2k$0.15225/sec
1080p, fast$0.21/sec
2k, fast$0.3045/sec
Video to Video

HeyGen Avatar 6 API Documentation

Make a talking video of an animated or illustrated character with HeyGen Avatar 6: send a short video of the character in video_url and the speech in audio_url. The character speaks your audio with matching lip movement, expression and the gestures it shows in your video. The video is as long as the audio and keeps the shape of your video. Videos of real people are not accepted: to animate a real person, send a photo to Image to Video. HeyGen Avatar 6 Turbo takes the same inputs at a lower cost and faster. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video to Video - HeyGen Avatar 6

Request Code

POST https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "motion_prompt": "Talk to the camera with a big friendly smile."
}
import requests

url = "https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "motion_prompt": "Talk to the camera with a big friendly smile."
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "motion_prompt": "Talk to the camera with a big friendly smile."
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "motion_prompt": "Talk to the camera with a big friendly smile."}'

Output

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "motion_prompt": "Talk to the camera with a big friendly smile."}'

Callback Payload (success)

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-30T08:30:21.633Z",
  "updated_at": "2026-11-30 08:31:22",
  "completed_at": "2026-11-30 08:31:21"
}

Failure callback shape

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-avatar-6",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
video_urlYesrequiredstring—One publicly reachable https URL of an MP4 video, at least 2 seconds long and up to 50 MB
The character who speaks: an animated or illustrated character (a cartoon, a 3D character, a drawing). Its motion and gestures guide the result. Videos of real people are refused.
image_urlNostring—One publicly reachable https URL of a JPEG, PNG or WebP photo, up to 32 MB
Optional: a still image of the same character, which helps keep its look.
audio_urlYesrequiredstring—One publicly reachable https URL of a speech recording (MP3, WAV, FLAC, OGG, M4A or AAC), at most 300 seconds long
The speech the character performs. The video is as long as the audio.
resolutionNostring"1080p"1080p, 2k
The size of the video, written exactly as listed (see Output size).
motion_promptNostring—Up to 1200 characters
Plain-language direction for gestures, facial expression and posture, for example Smile warmly and use small, open-handed gestures. Where it covers the same thing as motion_expressiveness, the prompt wins.
motion_expressivenessNostring"default"default, less
less gives fewer, smaller gestures and calmer facial expressions. It does not turn motion off.
service_tierNostring"default"default, fast
fast renders the video up to 2.5 times faster and is billed at twice the per-second rate (see Speed). Written exactly as listed.

Good to know

  • Each request returns one video, as long as the speech in audio_url. Send one request per video.
  • The video keeps the shape of your character video; there is no aspect-ratio setting.
  • The speech always comes from your audio: there is no script or voice setting on this API. To have a stock avatar speak a script, use Text to Video.
  • Use the JSON types shown: every field is a string. Omit a field instead of sending null.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged. Omit a field instead of sending null.

ParameterWhy
audio, audio_asset_idNot accepted. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
audio_urlsNot accepted: send one speech file. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
avatar_id, avatarNot accepted on this endpoint. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video.
background, remove_background, caption, watermark, title, folder_id, brand_glossary_id, reference_look_id, more_blinkingNot supported on HeyGen Avatar 6.
batch_size, num_images, number_of_images, n, count, num_outputs, num_videosNot supported: each request returns one video. Send one request per video.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_url, webhook_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
contentNot accepted. Send the character video in 'video_url' and the speech in 'audio_url'.
duration, seconds, num_frames, frames_per_second, fps, music_length_msNot accepted: the video is as long as the audio in 'audio_url' (1 to 300 seconds).
expressivenessNot accepted on HeyGen Avatar 6: use 'motion_expressiveness' ("default" or "less").
imageNot accepted. Send the photo as 'image_url', a public https URL of a JPEG, PNG or WebP file.
images, image_urls, reference_imagesNot accepted: send at most one photo. Send the photo as 'image_url', a public https URL of a JPEG, PNG or WebP file.
model, engineNot accepted: this endpoint always runs HeyGen Avatar 6. For Avatar 6 Turbo use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video.
negative_promptNot supported. Describe the motion you want in 'motion_prompt'.
output_formatNot supported: the video is always an MP4.
output_width, output_height, width, height, aspect_ratioNot supported: the video keeps the reference video's shape, sized by 'resolution' (1080p: 1080 px on the short edge; 2k: 1620 px).
parameters, inputNot accepted: send the fields at the top level of the JSON body.
promptNot accepted. Describe gestures, expression and camera in 'motion_prompt'; the speech comes from 'audio_url'.
reference_videos, reference_video, videoNot accepted. Send the character video as 'video_url', a public https URL of an MP4 (at least 2 seconds, up to 50 MB) of an animated or illustrated character.
streamNot supported on this API: the result is delivered when the job completes.
text, scriptNot accepted: the avatar performs the speech in 'audio_url'. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video.
typeNot accepted: this endpoint sets it.
voiceNot supported: the avatar performs the speech in 'audio_url' as recorded. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video.
voice_id, voice_settings, speedNot supported: the avatar performs the speech in 'audio_url' as recorded.
webhook_modeNot accepted in the JSON body. Send it as the X-Webhook-Mode request header instead.

Reference video

  • Send one direct, publicly reachable https link to an MP4 in video_url: at least 2 seconds long and up to 50 MB.
  • The video must show an animated or illustrated character: a cartoon, a 3D-animated character, a drawing or a mascot. A video of a real person ends with status: "ERROR" and a message that says so, and nothing is charged. To animate a real person, send a photo to Image to Video.
  • A shorter video ends with status: "ERROR" too, and nothing is charged.
  • The character's face should be clearly visible, facing the camera; its own gestures in your video guide the result.
  • Optionally add a still image of the same character in image_url.

At launch, a 4-second 1280×720 cartoon clip was used.

Audio and Length

  • Send the speech as one direct, publicly reachable https link in audio_url. The video is as long as the recording, and can be about a tenth of a second shorter.
  • A recording longer than 300 seconds, or shorter than 1 second, is refused with a 400 when you submit, and nothing is charged.
  • Use a clean recording of one voice speaking: music or several voices make the lip movement less accurate.
  • The video's sound track is your recording.

Output size

The video keeps your character video's aspect ratio; resolution sets the length of its short side:

resolutionShort side16:9 video9:16 video
1080p (default)1080 px1920 × 10801080 × 1920
2k1620 px2880 × 16201620 × 2880

At launch, this request came back as a 4.88-second 1920×1080 MP4 at 25 frames per second, with the speech as its sound track.

Speed

Set service_tier to fast to have the video rendered up to 2.5 times faster. It is billed at twice the per-second rate for the same resolution. default, or leaving the field out, renders at the normal speed and rate. The time until the finished video is ready also depends on queueing and on final processing, so it is shorter, not 2.5 times shorter.

Example: fast rendering

{
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "motion_prompt": "Talk to the camera with a big friendly smile.",
  "service_tier": "fast"
}

Timing

At launch, the 5-second video took about 60 seconds from submit to result. Longer speech and 2k take longer; fast is quicker. Poll the status endpoint every 10 seconds or so, or use a Webhook.

Example Request

{
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "motion_prompt": "Talk to the camera with a big friendly smile."
}

Example Response

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing video_url or audio_url, or a URL sent as anything other than a single stringsynchronous 400
resolution, motion_expressiveness or service_tier not one of the allowed valuessynchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A recording longer than 300 seconds or shorter than 1 secondsynchronous 400
A video of a real person, or a video shorter than 2 seconds (nothing is charged)status: "ERROR" with the reason
A file the model cannot use, or content it refuses under its policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

video-to-video without video_url (synchronous 400)

Sent {"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"}:

{
  "error": "Invalid request parameters",
  "message": "'video_url' is required",
  "violations": [
    "'video_url' is required"
  ]
}

video-to-video aspect_ratio (synchronous 400)

Sent {"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "aspect_ratio": "16:9"}:

{
  "error": "Invalid request parameters",
  "message": "'aspect_ratio' is not supported by this model; remove it from the request (got \"16:9\"); 'aspect_ratio' is not supported: the video keeps the reference video's shape, sized by 'resolution' (1080p: 1080 px on the short edge; 2k: 1620 px).",
  "violations": [
    "'aspect_ratio' is not supported by this model; remove it from the request (got \"16:9\")",
    "'aspect_ratio' is not supported: the video keeps the reference video's shape, sized by 'resolution' (1080p: 1080 px on the short edge; 2k: 1620 px)."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen Avatar 6 request at launch; the request id is masked.

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-30T08:30:21.633Z",
  "updated_at": "2026-11-30 08:31:22",
  "completed_at": "2026-11-30 08:31:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-avatar-6 for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the output video: the amount is the per-second rate for the video's resolution and speed (service_tier) times the length of the video in whole seconds. The length is rounded up to the next whole second, except that up to a twentieth of a second past a whole second is not counted, and every video counts at least 1 second: a 5.03-second video is billed as 5 seconds, a 5.2-second video is billed as 6 seconds and a 0.8-second video is billed as 1 second. The video is as long as your recording, so longer speech costs more; 2k has a higher per-second rate than 1080p, and fast is billed at twice the default rate. A hold is placed when the request is submitted; when the video is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rates are shown in the pricing panel on this page.

HeyGen Avatar 6 API Pricing — Per-Second Rates

Billed per second of video at the requested resolution (1080p or 2k) and speed (service_tier: default, or fast at twice the rate); 1080p and default are the defaults. The video is as long as the speech audio, up to 300 seconds.

ResolutionPrice (USD)
1080p$0.105/sec
2k$0.15225/sec
1080p, fast$0.21/sec
2k, fast$0.3045/sec
Text to Video

HeyGen Avatar 6 API Documentation

Make a presenter video with one of HeyGen's stock avatars and HeyGen Avatar 6: choose the avatar by name in avatar and send the words in script (spoken in the avatar's own voice, or one of 24 voices), or a speech recording in audio_url. Choose the shape with aspect_ratio and the size with resolution. HeyGen Avatar 6 Turbo takes the same inputs at a lower cost and faster. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - HeyGen Avatar 6

Request Code

POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "avatar": "Brandon Business Sitting Front",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "aspect_ratio": "9:16",
  "service_tier": "fast"
}
import requests

url = "https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "avatar": "Brandon Business Sitting Front",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "aspect_ratio": "9:16",
  "service_tier": "fast"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "avatar": "Brandon Business Sitting Front",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "aspect_ratio": "9:16",
  "service_tier": "fast"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"avatar": "Brandon Business Sitting Front", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "aspect_ratio": "9:16", "service_tier": "fast"}'

Output

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"avatar": "Brandon Business Sitting Front", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "aspect_ratio": "9:16", "service_tier": "fast"}'

Callback Payload (success)

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-30T08:30:25.970Z",
  "updated_at": "2026-11-30 08:31:48",
  "completed_at": "2026-11-30 08:31:47"
}

Failure callback shape

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-avatar-6",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
avatarYesrequiredstring—One of the 64 names under Stock avatars, written exactly
The presenter: a HeyGen stock avatar, filmed in its own setting.
scriptYes, unless audio_url is sentstring—Up to 900 characters, no < or >
The words the avatar speaks (see Speech). The video is as long as the spoken script.
voiceNostringthe avatar's own voiceOne of the 24 names under Voices
The voice that speaks script. Not used with audio_url.
audio_urlYes, unless script is sentstring—One publicly reachable https URL of a speech recording (MP3, WAV, FLAC, OGG, M4A or AAC), at most 300 seconds long
A recording for the avatar to perform instead of script. The video is as long as the audio.
aspect_ratioNostring"16:9"16:9, 9:16, 1:1, 4:5, 5:4
The shape of the video (see Output size).
resolutionNostring"1080p"1080p, 2k
The size of the video, written exactly as listed (see Output size).
motion_promptNostring—Up to 1000 characters
Plain-language direction for gestures, facial expression and posture, for example Smile warmly and use small, open-handed gestures. Where it covers the same thing as motion_expressiveness, the prompt wins.
motion_expressivenessNostring"default"default, less
less gives fewer, smaller gestures and calmer facial expressions. It does not turn motion off.
service_tierNostring"default"default, fast
fast renders the video up to 2.5 times faster and is billed at twice the per-second rate (see Speed). Written exactly as listed.

Good to know

  • Each request returns one video. Send one request per video.
  • Send either script or audio_url, not both; voice goes with script only.
  • To animate your own photo, use Image to Video; to animate a cartoon character from a video, use Video to Video.
  • Use the JSON types shown: every field is a string. Omit a field instead of sending null.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged. Omit a field instead of sending null.

ParameterWhy
audio, audio_asset_idNot accepted. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
audio_urlsNot accepted: send one speech file. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
avatar_idNot accepted: choose a stock avatar by name in 'avatar'.
background, remove_background, caption, watermark, title, folder_id, brand_glossary_id, reference_look_id, more_blinkingNot supported on HeyGen Avatar 6.
batch_size, num_images, number_of_images, n, count, num_outputs, num_videosNot supported: each request returns one video. Send one request per video.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_url, webhook_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
contentNot accepted. Choose a stock avatar in 'avatar' and send the words in 'script' (or the speech in 'audio_url').
duration, seconds, num_frames, frames_per_second, fps, music_length_msNot accepted: the video is as long as the spoken 'script' (up to 900 characters) or the audio in 'audio_url' (1 to 300 seconds).
expressivenessNot accepted on HeyGen Avatar 6: use 'motion_expressiveness' ("default" or "less").
image_url, image, images, image_urls, reference_imagesNot accepted: this endpoint uses a stock avatar. To animate your own photo, use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video.
model, engineNot accepted: this endpoint always runs HeyGen Avatar 6. For Avatar 6 Turbo use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video.
negative_promptNot supported. Describe the motion you want in 'motion_prompt'.
output_formatNot supported: the video is always an MP4.
output_width, output_height, width, heightNot supported: the video's shape is 'aspect_ratio' (16:9, 9:16, 1:1, 4:5 or 5:4), sized by 'resolution' (1080p or 2k).
parameters, inputNot accepted: send the fields at the top level of the JSON body.
promptNot accepted. Send the words in 'script'; describe gestures and expression in 'motion_prompt'.
reference_videos, reference_video, video, video_urlNot accepted: this endpoint uses a stock avatar. To animate a character from a video, use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video.
speedNot supported: the voice's speed is fixed.
streamNot supported on this API: the result is delivered when the job completes.
textNot accepted: send the words the avatar speaks in 'script'.
typeNot accepted: this endpoint sets it.
voice_idNot accepted: choose a voice by name in 'voice'.
voice_settingsNot supported: the voice's speed and tuning are fixed.
webhook_modeNot accepted in the JSON body. Send it as the X-Webhook-Mode request header instead.

Stock avatars

avatar takes one of these 64 names, written exactly. Each is a HeyGen studio presenter filmed in its own setting and speaks in its own voice unless you choose one.

AvatarAvatarAvatarAvatar
Brandon Business Sitting FrontCaroline Business Sitting SideAnnie Lounge Standing SideSanta Fireplace Side
Judy Teacher StandingSilas Customer SupportDexter Doctor StandingElenora Fitness Coach 2
Ann Doctor SittingShawn TherapistBryan Fitness CoachJune HR
Raul Business Sofa Front 2Scarlett Fireplace SideAubrey Outdoor Sport SideBrent Sofa Side 2
Gala Sofa SideBlanka Picnic SideBojan Lounge Side 2Emilia Outdoor Yoga Front 2
Jonas Gym Side Gerardo Indoor FrontPiper Business Sofa SideLeszek Sofa Side
Mireia Outdoor Table SideKavya Outdoor SideNoah Lobby Front 2Patrizio Sofa Front
Joel Couch SideMax Indoor SideRiley Casual SideJudita Yoga Side 2
Timothy Casual SideVince Business Training FrontChloe Outdoor SideGeorgia Casual Side
Ida Lounge FrontFernando Outdoor Table SideAbigail Office SideAmelia Lounge Side 2
Oxana Gym Side 2Roman Outdoor Sport SideMartina Sofa Front 2Leos Sofa Side 2
Teodor Sofa Side 2Rasmus Lounge Side 2Juan Sofa Front 2Milena Office Side 2
Vernon Office Side 2Conrad Sofa FrontRen Sofa Business SideArtur Office Side
Masha Office SideMiyu Sofa Business SideGiulia Office Side 2Matteo Office Side 2
Verena Sofa SideEmanuel Office SideDerya Office Side 2Miles Sofa Front 2
Veit Sofa SideSabine Sofa SideAnja Sofa Side Matthew

Speech

  • A script: send the words in script, up to 900 characters (about a minute of ordinary English). Markup such as pause or SSML tags (< >) is not accepted. Text that is only a web address is refused. Line breaks become pauses.
  • A voice: leave voice out to use the avatar's own voice, or choose one of: Jonah, Nadine, Tabitha, Soren, Elowen, Vincent, Jocelyn, Marielle, Corinne, Lucian, Kieran, Hugh, Noelle, Bram, Ewan, Iona, Cecily, Simon, Weston, Felicity, Gareth, Rory, Meredith, Sabrina.
  • A recording: send audio_url instead of script; the avatar performs it as it is, and the video is as long as it (1 to 300 seconds; longer or shorter is refused with a 400).
  • The video's sound track is the spoken script or your recording.

Output size

aspect_ratio sets the shape and resolution the size:

aspect_ratio1080p2k
16:9 (default)1920 × 10802560 × 1440
9:161080 × 19201440 × 2560
1:11080 × 10801440 × 1440
4:51080 × 13501440 × 1800
5:41350 × 10801800 × 1440

At launch, this request came back as a 4.99-second 1080×1920 MP4 at 25 frames per second, with the speech as its sound track.

Speed

Set service_tier to fast to have the video rendered up to 2.5 times faster. It is billed at twice the per-second rate for the same resolution. default, or leaving the field out, renders at the normal speed and rate. The time until the finished video is ready also depends on queueing and on final processing, so it is shorter, not 2.5 times shorter.

Example: fast rendering

{
  "avatar": "Brandon Business Sitting Front",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "aspect_ratio": "9:16",
  "service_tier": "fast"
}

Timing

At launch, the 5-second video took about 80 seconds from submit to result. Longer speech and 2k take longer; fast is quicker. Poll the status endpoint every 10 seconds or so, or use a Webhook.

Example Request

{
  "avatar": "Brandon Business Sitting Front",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "aspect_ratio": "9:16",
  "service_tier": "fast"
}

Example Response

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing avatar, or an avatar name not in the listsynchronous 400
Neither script nor audio_url, both of them, or voice with audio_urlsynchronous 400
A script over 900 characters, or a voice, aspect_ratio, resolution, motion_expressiveness or service_tier not in its listsynchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A recording longer than 300 seconds or shorter than 1 secondsynchronous 400
A script or recording the model refuses under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

text-to-video with both script and audio_url (synchronous 400)

Sent {"avatar": "Brandon Business Sitting Front", "script": "Hi.", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"}:

{
  "error": "Invalid request parameters",
  "message": "Send either 'script' (the words the avatar speaks) or 'audio_url' (a speech recording), not both.",
  "violations": [
    "Send either 'script' (the words the avatar speaks) or 'audio_url' (a speech recording), not both."
  ]
}

text-to-video with an avatar outside the list (synchronous 400)

Sent {"avatar": "Nobody Special", "script": "Hi."}:

{
  "error": "Invalid request parameters",
  "message": "'avatar' must be one of: \"Brandon Business Sitting Front\", \"Caroline Business Sitting Side\", \"Annie Lounge Standing Side\", \"Santa Fireplace Side\", \"Judy Teacher Standing\", \"Silas Customer Support\", \"Dexter Doctor Standing\", \"Elenora Fitness Coach 2\", \"Ann Doctor Sitting\", \"Shawn Therapist\", \"Bryan Fitness Coach\", \"June HR\", \"Raul Business Sofa Front 2\", \"Scarlett Fireplace Side\", \"Aubrey Outdoor Sport Side\", \"Brent Sofa Side 2\", \"Gala Sofa Side\", \"Blanka Picnic Side\", \"Bojan Lounge Side 2\", \"Emilia Outdoor Yoga Front 2\", \"Jonas Gym Side \", \"Gerardo Indoor Front\", \"Piper Business Sofa Side\", \"Leszek Sofa Side\", \"Mireia Outdoor Table Side\", \"Kavya Outdoor Side\", \"Noah Lobby Front 2\", \"Patrizio Sofa Front\", \"Joel Couch Side\", \"Max Indoor Side\", \"Riley Casual Side\", \"Judita Yoga Side 2\", \"Timothy Casual Side\", \"Vince Business Training Front\", \"Chloe Outdoor Side\", \"Georgia Casual Side\", \"Ida Lounge Front\", \"Fernando Outdoor Table Side\", \"Abigail Office Side\", \"Amelia Lounge Side 2\", \"Oxana Gym Side 2\", \"Roman Outdoor Sport Side\", \"Martina Sofa Front 2\", \"Leos Sofa Side 2\", \"Teodor Sofa Side 2\", \"Rasmus Lounge Side 2\", \"Juan Sofa Front 2\", \"Milena Office Side 2\", \"Vernon Office Side 2\", \"Conrad Sofa Front\", \"Ren Sofa Business Side\", \"Artur Office Side\", \"Masha Office Side\", \"Miyu Sofa Business Side\", \"Giulia Office Side 2\", \"Matteo Office Side 2\", \"Verena Sofa Side\", \"Emanuel Office Side\", \"Derya Office Side 2\", \"Miles Sofa Front 2\", \"Veit Sofa Side\", \"Sabine Sofa Side\", \"Anja Sofa Side \", \"Matthew\" (got \"Nobody Special\")",
  "violations": [
    "'avatar' must be one of: \"Brandon Business Sitting Front\", \"Caroline Business Sitting Side\", \"Annie Lounge Standing Side\", \"Santa Fireplace Side\", \"Judy Teacher Standing\", \"Silas Customer Support\", \"Dexter Doctor Standing\", \"Elenora Fitness Coach 2\", \"Ann Doctor Sitting\", \"Shawn Therapist\", \"Bryan Fitness Coach\", \"June HR\", \"Raul Business Sofa Front 2\", \"Scarlett Fireplace Side\", \"Aubrey Outdoor Sport Side\", \"Brent Sofa Side 2\", \"Gala Sofa Side\", \"Blanka Picnic Side\", \"Bojan Lounge Side 2\", \"Emilia Outdoor Yoga Front 2\", \"Jonas Gym Side \", \"Gerardo Indoor Front\", \"Piper Business Sofa Side\", \"Leszek Sofa Side\", \"Mireia Outdoor Table Side\", \"Kavya Outdoor Side\", \"Noah Lobby Front 2\", \"Patrizio Sofa Front\", \"Joel Couch Side\", \"Max Indoor Side\", \"Riley Casual Side\", \"Judita Yoga Side 2\", \"Timothy Casual Side\", \"Vince Business Training Front\", \"Chloe Outdoor Side\", \"Georgia Casual Side\", \"Ida Lounge Front\", \"Fernando Outdoor Table Side\", \"Abigail Office Side\", \"Amelia Lounge Side 2\", \"Oxana Gym Side 2\", \"Roman Outdoor Sport Side\", \"Martina Sofa Front 2\", \"Leos Sofa Side 2\", \"Teodor Sofa Side 2\", \"Rasmus Lounge Side 2\", \"Juan Sofa Front 2\", \"Milena Office Side 2\", \"Vernon Office Side 2\", \"Conrad Sofa Front\", \"Ren Sofa Business Side\", \"Artur Office Side\", \"Masha Office Side\", \"Miyu Sofa Business Side\", \"Giulia Office Side 2\", \"Matteo Office Side 2\", \"Verena Sofa Side\", \"Emanuel Office Side\", \"Derya Office Side 2\", \"Miles Sofa Front 2\", \"Veit Sofa Side\", \"Sabine Sofa Side\", \"Anja Sofa Side \", \"Matthew\" (got \"Nobody Special\")"
  ]
}

text-to-video voice + audio_url (synchronous 400)

Sent {"avatar": "Brandon Business Sitting Front", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "voice": "Jonah"}:

{
  "error": "Invalid request parameters",
  "message": "'voice' applies to 'script' only: with 'audio_url' the avatar performs the recording as it is.",
  "violations": [
    "'voice' applies to 'script' only: with 'audio_url' the avatar performs the recording as it is."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen Avatar 6 request at launch; the request id is masked.

{
  "request_id": "heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/heygen-avatar-6_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-30T08:30:25.970Z",
  "updated_at": "2026-11-30 08:31:48",
  "completed_at": "2026-11-30 08:31:47"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-avatar-6 for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the output video: the amount is the per-second rate for the video's resolution and speed (service_tier) times the length of the video in whole seconds. The length is rounded up to the next whole second, except that up to a twentieth of a second past a whole second is not counted, and every video counts at least 1 second: a 5.03-second video is billed as 5 seconds, a 5.2-second video is billed as 6 seconds and a 0.8-second video is billed as 1 second. The video is as long as the spoken script or your recording, so longer speech costs more; 2k has a higher per-second rate than 1080p, and fast is billed at twice the default rate. A hold is placed when the request is submitted; when the video is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rates are shown in the pricing panel on this page.

HeyGen Avatar 6 API Pricing — Per-Second Rates

Billed per second of video at the requested resolution (1080p or 2k) and speed (service_tier: default, or fast at twice the rate); 1080p and default are the defaults. The video is as long as the spoken script or the speech audio.

ResolutionPrice (USD)
1080p$0.105/sec
2k$0.15225/sec
1080p, fast$0.21/sec
2k, fast$0.3045/sec
2. HeyGen Avatar 6 Turbo

HeyGen Avatar 6 Turbo API Documentation

Make a talking-head video from one photo and a speech recording with HeyGen Avatar 6 Turbo: send a photo of a person in image_url and the speech in audio_url. The person in the photo speaks your audio with matching lip movement, facial expression and natural gestures. The video is as long as the audio and keeps the shape of the photo. Avatar 6 Turbo takes the same inputs as HeyGen Avatar 6 at a lower cost. To animate a cartoon or illustrated character from a short video, use Video to Video (POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video); to have one of HeyGen's stock avatars speak a script, use Text to Video (POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - HeyGen Avatar 6 Turbo

Request Code

POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/image-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "resolution": "1080p",
  "motion_expressiveness": "less"
}
import requests

url = "https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "resolution": "1080p",
  "motion_expressiveness": "less"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/image-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "resolution": "1080p",
  "motion_expressiveness": "less"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3", "resolution": "1080p", "motion_expressiveness": "less"}'

Output

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3", "resolution": "1080p", "motion_expressiveness": "less"}'

Callback Payload (success)

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T01:07:35.937Z",
  "updated_at": "2026-11-18 01:13:00",
  "completed_at": "2026-11-18 01:12:59"
}

Failure callback shape

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-avatar-6-turbo",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
image_urlYesrequiredstring—One publicly reachable https URL of a JPEG, PNG or WebP photo, up to 32 MB
The person who speaks: one clearly visible, human-like face (a photo, or a realistic illustration of a person). The video keeps the photo's shape.
audio_urlYesrequiredstring—One publicly reachable https URL of a speech recording (MP3, WAV, FLAC, OGG, M4A or AAC), at most 300 seconds long
The speech the person performs. The video is as long as the audio.
resolutionNostring"1080p"1080p, 2k
The size of the video, written exactly as listed: the short side is 1080 pixels at 1080p and 1620 pixels at 2k (see Output size).
motion_promptNostring—Up to 1200 characters
Plain-language direction for gestures, facial expression, posture and camera, for example Smile warmly and use small, open-handed gestures. Where it covers the same thing as motion_expressiveness, the prompt wins.
motion_expressivenessNostring"default"default, less
less gives fewer, smaller gestures and calmer facial expressions. It does not turn motion off.
service_tierNostring"default"default, fast
fast renders the video up to 2.5 times faster and is billed at twice the per-second rate (see Speed). Written exactly as listed.

Good to know

  • Each request returns one video, as long as the speech in audio_url. Send one request per video.
  • The speech always comes from your audio: there is no script or voice setting on this API. To have a stock avatar speak a script, use Text to Video.
  • The video keeps the shape of your photo; there is no aspect-ratio setting.
  • Use the JSON types shown: every field is a string. Omit a field instead of sending null.
  • Use only faces you have the right to use: your own, a person who has agreed, or a licensed stock image. A photo you found online is not permission to use someone's face.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged. Omit a field instead of sending null.

ParameterWhy
audio, audio_asset_idNot accepted. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
audio_urlsNot accepted: send one speech file. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
avatar_id, avatarNot accepted on this endpoint. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video.
background, remove_background, caption, watermark, title, folder_id, brand_glossary_id, reference_look_id, more_blinkingNot supported on HeyGen Avatar 6 Turbo.
batch_size, num_images, number_of_images, n, count, num_outputs, num_videosNot supported: each request returns one video. Send one request per video.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_url, webhook_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
contentNot accepted. Send the photo in 'image_url' and the speech in 'audio_url'.
duration, seconds, num_frames, frames_per_second, fps, music_length_msNot accepted: the video is as long as the audio in 'audio_url' (1 to 300 seconds).
expressivenessNot accepted on HeyGen Avatar 6 Turbo: use 'motion_expressiveness' ("default" or "less").
imageNot accepted. Send the photo as 'image_url', a public https URL of a JPEG, PNG or WebP file.
images, image_urls, reference_imagesNot accepted: send at most one photo. Send the photo as 'image_url', a public https URL of a JPEG, PNG or WebP file.
model, engineNot accepted: this endpoint always runs HeyGen Avatar 6 Turbo. For Avatar 6 use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video.
negative_promptNot supported. Describe the motion you want in 'motion_prompt'.
output_formatNot supported: the video is always an MP4.
output_width, output_height, width, height, aspect_ratioNot supported: the video keeps the photo's shape, sized by 'resolution' (1080p: 1080 px on the short edge; 2k: 1620 px).
parameters, inputNot accepted: send the fields at the top level of the JSON body.
promptNot accepted. Describe gestures, expression and camera in 'motion_prompt'; the speech comes from 'audio_url'.
reference_videos, reference_video, video, video_urlNot accepted on this endpoint. To animate a character from a video, use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video.
streamNot supported on this API: the result is delivered when the job completes.
text, scriptNot accepted: the avatar performs the speech in 'audio_url'. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video.
typeNot accepted: this endpoint sets it.
voiceNot supported: the avatar performs the speech in 'audio_url' as recorded. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video.
voice_id, voice_settings, speedNot supported: the avatar performs the speech in 'audio_url' as recorded.
webhook_modeNot accepted in the JSON body. Send it as the X-Webhook-Mode request header instead.

Audio and Length

  • Send the speech as one direct, publicly reachable https link in audio_url. The video is as long as the recording, and can be about a tenth of a second shorter.
  • A recording longer than 300 seconds is refused, and nothing is charged.
  • Use a clean recording of one person speaking: music or several voices make the lip movement less accurate.
  • The video's sound track is your recording.

Photo and Output size

  • Send one photo in image_url: a direct, publicly reachable https link to a JPEG, PNG or WebP file. A list of images is refused.
  • The photo must show one clearly visible, human-like face. A photo where no face can be found ends with status: "ERROR", and nothing is charged.
  • Use only faces you have the right to use: your own, a person who has agreed, or a licensed stock image.

The video keeps the photo's aspect ratio; resolution sets the length of its short side:

resolutionShort side16:9 photo9:16 photo
1080p (default)1080 px1920 × 10801080 × 1920
2k1620 px2880 × 16201620 × 2880

At launch, a 5.88-second video made from a 6.0-second recording and a 1920×1080 photo came back as 1920×1080 at 25 frames per second, with the speech as its sound track. The video is an MP4 file.

Example: 2k with calmer motion

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "resolution": "2k",
  "motion_expressiveness": "less",
  "motion_prompt": "Face the camera with a warm expression and use small, natural hand gestures."
}

Speed

Set service_tier to fast to have the video rendered up to 2.5 times faster. It is billed at twice the per-second rate for the same resolution. default, or leaving the field out, renders at the normal speed and rate. The time until the finished video is ready also depends on queueing and on final processing, so it is shorter, not 2.5 times shorter.

Example: fast rendering

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "service_tier": "fast"
}

Timing

At launch, the 6-second video took about 335 seconds from submit to result. Longer recordings and 2k take longer. Poll the status endpoint every 10 seconds or so, or use a Webhook.

Example Request

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-6s.mp3",
  "resolution": "1080p",
  "motion_expressiveness": "less"
}

Example Response

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty image_url or audio_url, or either sent as anything other than a single stringsynchronous 400
resolution, motion_expressiveness or service_tier not one of the allowed values (written exactly as listed)synchronous 400
motion_prompt not a string, or longer than 1200 characterssynchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A recording longer than 300 seconds (nothing is charged)synchronous 400
A photo where no face can be found, or a file the model cannot use (nothing is charged)status: "ERROR"
A photo or recording the model refuses under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing audio_url (synchronous 400)

Sent {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required",
  "violations": [
    "'audio_url' is required"
  ]
}

A value that is not allowed (synchronous 400)

Sent {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "resolution": "2k", "motion_expressiveness": "high"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required; 'motion_expressiveness' must be one of: \"default\", \"less\" (got \"high\")",
  "violations": [
    "'audio_url' is required",
    "'motion_expressiveness' must be one of: \"default\", \"less\" (got \"high\")"
  ]
}

A field this API does not accept (synchronous 400)

Sent {"image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "num_images": 2}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required; 'num_images' must be one of:  (got 2); 'num_images' is not supported: each request returns one video. Send one request per video.",
  "violations": [
    "'audio_url' is required",
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: each request returns one video. Send one request per video."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen Avatar 6 Turbo request at launch; the request id is masked.

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T01:07:35.937Z",
  "updated_at": "2026-11-18 01:13:00",
  "completed_at": "2026-11-18 01:12:59"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-avatar-6-turbo for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/image-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the output video: the amount is the per-second rate for the video's resolution and speed (service_tier) times the length of the video in whole seconds. The length is rounded up to the next whole second, except that up to a twentieth of a second past a whole second is not counted, and every video counts at least 1 second: a 5.03-second video is billed as 5 seconds, a 5.2-second video is billed as 6 seconds and a 0.8-second video is billed as 1 second. The video is as long as your recording, so a longer recording costs more, 2k has a higher per-second rate than 1080p, and fast is billed at twice the default rate; the photo, motion_prompt and motion_expressiveness do not change the rate. A hold is placed when the request is submitted; when the video is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rates are shown in the pricing panel on this page.

HeyGen Avatar 6 Turbo API Pricing — Per-Second Rates

Billed per second of video at the requested resolution (1080p or 2k) and speed (service_tier: default, or fast at twice the rate); 1080p and default are the defaults. The video is as long as the speech audio, up to 300 seconds.

ResolutionPrice (USD)
1080p$0.0525/sec
2k$0.09187/sec
1080p, fast$0.105/sec
2k, fast$0.18375/sec
Video to Video

HeyGen Avatar 6 Turbo API Documentation

Make a talking video of an animated or illustrated character with HeyGen Avatar 6 Turbo: send a short video of the character in video_url and the speech in audio_url. The character speaks your audio with matching lip movement, expression and the gestures it shows in your video. The video is as long as the audio and keeps the shape of your video. Videos of real people are not accepted: to animate a real person, send a photo to Image to Video. HeyGen Avatar 6 takes the same inputs at a higher quality. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video to Video - HeyGen Avatar 6 Turbo

Request Code

POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
}
import requests

url = "https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"}'

Output

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"}'

Callback Payload (success)

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-30T08:30:17.334Z",
  "updated_at": "2026-11-30 08:31:24",
  "completed_at": "2026-11-30 08:31:23"
}

Failure callback shape

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-avatar-6-turbo",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
video_urlYesrequiredstring—One publicly reachable https URL of an MP4 video, at least 2 seconds long and up to 50 MB
The character who speaks: an animated or illustrated character (a cartoon, a 3D character, a drawing). Its motion and gestures guide the result. Videos of real people are refused.
image_urlNostring—One publicly reachable https URL of a JPEG, PNG or WebP photo, up to 32 MB
Optional: a still image of the same character, which helps keep its look.
audio_urlYesrequiredstring—One publicly reachable https URL of a speech recording (MP3, WAV, FLAC, OGG, M4A or AAC), at most 300 seconds long
The speech the character performs. The video is as long as the audio.
resolutionNostring"1080p"1080p, 2k
The size of the video, written exactly as listed (see Output size).
motion_promptNostring—Up to 1200 characters
Plain-language direction for gestures, facial expression and posture, for example Smile warmly and use small, open-handed gestures. Where it covers the same thing as motion_expressiveness, the prompt wins.
motion_expressivenessNostring"default"default, less
less gives fewer, smaller gestures and calmer facial expressions. It does not turn motion off.
service_tierNostring"default"default, fast
fast renders the video up to 2.5 times faster and is billed at twice the per-second rate (see Speed). Written exactly as listed.

Good to know

  • Each request returns one video, as long as the speech in audio_url. Send one request per video.
  • The video keeps the shape of your character video; there is no aspect-ratio setting.
  • The speech always comes from your audio: there is no script or voice setting on this API. To have a stock avatar speak a script, use Text to Video.
  • Use the JSON types shown: every field is a string. Omit a field instead of sending null.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged. Omit a field instead of sending null.

ParameterWhy
audio, audio_asset_idNot accepted. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
audio_urlsNot accepted: send one speech file. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
avatar_id, avatarNot accepted on this endpoint. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video.
background, remove_background, caption, watermark, title, folder_id, brand_glossary_id, reference_look_id, more_blinkingNot supported on HeyGen Avatar 6 Turbo.
batch_size, num_images, number_of_images, n, count, num_outputs, num_videosNot supported: each request returns one video. Send one request per video.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_url, webhook_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
contentNot accepted. Send the character video in 'video_url' and the speech in 'audio_url'.
duration, seconds, num_frames, frames_per_second, fps, music_length_msNot accepted: the video is as long as the audio in 'audio_url' (1 to 300 seconds).
expressivenessNot accepted on HeyGen Avatar 6 Turbo: use 'motion_expressiveness' ("default" or "less").
imageNot accepted. Send the photo as 'image_url', a public https URL of a JPEG, PNG or WebP file.
images, image_urls, reference_imagesNot accepted: send at most one photo. Send the photo as 'image_url', a public https URL of a JPEG, PNG or WebP file.
model, engineNot accepted: this endpoint always runs HeyGen Avatar 6 Turbo. For Avatar 6 use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/video-to-video.
negative_promptNot supported. Describe the motion you want in 'motion_prompt'.
output_formatNot supported: the video is always an MP4.
output_width, output_height, width, height, aspect_ratioNot supported: the video keeps the reference video's shape, sized by 'resolution' (1080p: 1080 px on the short edge; 2k: 1620 px).
parameters, inputNot accepted: send the fields at the top level of the JSON body.
promptNot accepted. Describe gestures, expression and camera in 'motion_prompt'; the speech comes from 'audio_url'.
reference_videos, reference_video, videoNot accepted. Send the character video as 'video_url', a public https URL of an MP4 (at least 2 seconds, up to 50 MB) of an animated or illustrated character.
streamNot supported on this API: the result is delivered when the job completes.
text, scriptNot accepted: the avatar performs the speech in 'audio_url'. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video.
typeNot accepted: this endpoint sets it.
voiceNot supported: the avatar performs the speech in 'audio_url' as recorded. To have a HeyGen stock avatar speak a script, use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video.
voice_id, voice_settings, speedNot supported: the avatar performs the speech in 'audio_url' as recorded.
webhook_modeNot accepted in the JSON body. Send it as the X-Webhook-Mode request header instead.

Reference video

  • Send one direct, publicly reachable https link to an MP4 in video_url: at least 2 seconds long and up to 50 MB.
  • The video must show an animated or illustrated character: a cartoon, a 3D-animated character, a drawing or a mascot. A video of a real person ends with status: "ERROR" and a message that says so, and nothing is charged. To animate a real person, send a photo to Image to Video.
  • A shorter video ends with status: "ERROR" too, and nothing is charged.
  • The character's face should be clearly visible, facing the camera; its own gestures in your video guide the result.
  • Optionally add a still image of the same character in image_url.

At launch, a 4-second 1280×720 cartoon clip was used.

Audio and Length

  • Send the speech as one direct, publicly reachable https link in audio_url. The video is as long as the recording, and can be about a tenth of a second shorter.
  • A recording longer than 300 seconds, or shorter than 1 second, is refused with a 400 when you submit, and nothing is charged.
  • Use a clean recording of one voice speaking: music or several voices make the lip movement less accurate.
  • The video's sound track is your recording.

Output size

The video keeps your character video's aspect ratio; resolution sets the length of its short side:

resolutionShort side16:9 video9:16 video
1080p (default)1080 px1920 × 10801080 × 1920
2k1620 px2880 × 16201620 × 2880

At launch, this request came back as a 4.88-second 1920×1080 MP4 at 25 frames per second, with the speech as its sound track.

Speed

Set service_tier to fast to have the video rendered up to 2.5 times faster. It is billed at twice the per-second rate for the same resolution. default, or leaving the field out, renders at the normal speed and rate. The time until the finished video is ready also depends on queueing and on final processing, so it is shorter, not 2.5 times shorter.

Example: fast rendering

{
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3",
  "service_tier": "fast"
}

Timing

At launch, the 5-second video took about 65 seconds from submit to result. Longer speech and 2k take longer; fast is quicker. Poll the status endpoint every 10 seconds or so, or use a Webhook.

Example Request

{
  "video_url": "https://cdn.pixazo.ai/v1/veo-3-1-lite_01a22b92-f813-72f9-2cd4-68ae44c188cd8/output.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"
}

Example Response

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing video_url or audio_url, or a URL sent as anything other than a single stringsynchronous 400
resolution, motion_expressiveness or service_tier not one of the allowed valuessynchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A recording longer than 300 seconds or shorter than 1 secondsynchronous 400
A video of a real person, or a video shorter than 2 seconds (nothing is charged)status: "ERROR" with the reason
A file the model cannot use, or content it refuses under its policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

video-to-video without video_url (synchronous 400)

Sent {"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"}:

{
  "error": "Invalid request parameters",
  "message": "'video_url' is required",
  "violations": [
    "'video_url' is required"
  ]
}

video-to-video aspect_ratio (synchronous 400)

Sent {"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-frame.jpg", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "aspect_ratio": "16:9"}:

{
  "error": "Invalid request parameters",
  "message": "'aspect_ratio' is not supported by this model; remove it from the request (got \"16:9\"); 'aspect_ratio' is not supported: the video keeps the reference video's shape, sized by 'resolution' (1080p: 1080 px on the short edge; 2k: 1620 px).",
  "violations": [
    "'aspect_ratio' is not supported by this model; remove it from the request (got \"16:9\")",
    "'aspect_ratio' is not supported: the video keeps the reference video's shape, sized by 'resolution' (1080p: 1080 px on the short edge; 2k: 1620 px)."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen Avatar 6 Turbo request at launch; the request id is masked.

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-30T08:30:17.334Z",
  "updated_at": "2026-11-30 08:31:24",
  "completed_at": "2026-11-30 08:31:23"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-avatar-6-turbo for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the output video: the amount is the per-second rate for the video's resolution and speed (service_tier) times the length of the video in whole seconds. The length is rounded up to the next whole second, except that up to a twentieth of a second past a whole second is not counted, and every video counts at least 1 second: a 5.03-second video is billed as 5 seconds, a 5.2-second video is billed as 6 seconds and a 0.8-second video is billed as 1 second. The video is as long as your recording, so longer speech costs more; 2k has a higher per-second rate than 1080p, and fast is billed at twice the default rate. A hold is placed when the request is submitted; when the video is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rates are shown in the pricing panel on this page.

HeyGen Avatar 6 Turbo API Pricing — Per-Second Rates

Billed per second of video at the requested resolution (1080p or 2k) and speed (service_tier: default, or fast at twice the rate); 1080p and default are the defaults. The video is as long as the speech audio, up to 300 seconds.

ResolutionPrice (USD)
1080p$0.0525/sec
2k$0.09187/sec
1080p, fast$0.105/sec
2k, fast$0.18375/sec
Text to Video

HeyGen Avatar 6 Turbo API Documentation

Make a presenter video with one of HeyGen's stock avatars and HeyGen Avatar 6 Turbo: choose the avatar by name in avatar and send the words in script (spoken in the avatar's own voice, or one of 24 voices), or a speech recording in audio_url. Choose the shape with aspect_ratio and the size with resolution. HeyGen Avatar 6 takes the same inputs at a higher quality. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - HeyGen Avatar 6 Turbo

Request Code

POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "avatar": "Brandon Business Sitting Front",
  "script": "Hi, I'm Brandon. This short clip was made with HeyGen Avatar 6 on Pixazo."
}
import requests

url = "https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "avatar": "Brandon Business Sitting Front",
  "script": "Hi, I'm Brandon. This short clip was made with HeyGen Avatar 6 on Pixazo."
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "avatar": "Brandon Business Sitting Front",
  "script": "Hi, I'm Brandon. This short clip was made with HeyGen Avatar 6 on Pixazo."
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"avatar": "Brandon Business Sitting Front", "script": "Hi, I'm Brandon. This short clip was made with HeyGen Avatar 6 on Pixazo."}'

Output

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"avatar": "Brandon Business Sitting Front", "script": "Hi, I'm Brandon. This short clip was made with HeyGen Avatar 6 on Pixazo."}'

Callback Payload (success)

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-30T08:30:22.720Z",
  "updated_at": "2026-11-30 08:31:46",
  "completed_at": "2026-11-30 08:31:45"
}

Failure callback shape

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-avatar-6-turbo",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
avatarYesrequiredstring—One of the 64 names under Stock avatars, written exactly
The presenter: a HeyGen stock avatar, filmed in its own setting.
scriptYes, unless audio_url is sentstring—Up to 900 characters, no < or >
The words the avatar speaks (see Speech). The video is as long as the spoken script.
voiceNostringthe avatar's own voiceOne of the 24 names under Voices
The voice that speaks script. Not used with audio_url.
audio_urlYes, unless script is sentstring—One publicly reachable https URL of a speech recording (MP3, WAV, FLAC, OGG, M4A or AAC), at most 300 seconds long
A recording for the avatar to perform instead of script. The video is as long as the audio.
aspect_ratioNostring"16:9"16:9, 9:16, 1:1, 4:5, 5:4
The shape of the video (see Output size).
resolutionNostring"1080p"1080p, 2k
The size of the video, written exactly as listed (see Output size).
motion_promptNostring—Up to 1000 characters
Plain-language direction for gestures, facial expression and posture, for example Smile warmly and use small, open-handed gestures. Where it covers the same thing as motion_expressiveness, the prompt wins.
motion_expressivenessNostring"default"default, less
less gives fewer, smaller gestures and calmer facial expressions. It does not turn motion off.
service_tierNostring"default"default, fast
fast renders the video up to 2.5 times faster and is billed at twice the per-second rate (see Speed). Written exactly as listed.

Good to know

  • Each request returns one video. Send one request per video.
  • Send either script or audio_url, not both; voice goes with script only.
  • To animate your own photo, use Image to Video; to animate a cartoon character from a video, use Video to Video.
  • Use the JSON types shown: every field is a string. Omit a field instead of sending null.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged. Omit a field instead of sending null.

ParameterWhy
audio, audio_asset_idNot accepted. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
audio_urlsNot accepted: send one speech file. Send the speech as 'audio_url', a public https URL of a wav, mp3, flac, ogg, m4a or aac file.
avatar_idNot accepted: choose a stock avatar by name in 'avatar'.
background, remove_background, caption, watermark, title, folder_id, brand_glossary_id, reference_look_id, more_blinkingNot supported on HeyGen Avatar 6 Turbo.
batch_size, num_images, number_of_images, n, count, num_outputs, num_videosNot supported: each request returns one video. Send one request per video.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_url, webhook_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
contentNot accepted. Choose a stock avatar in 'avatar' and send the words in 'script' (or the speech in 'audio_url').
duration, seconds, num_frames, frames_per_second, fps, music_length_msNot accepted: the video is as long as the spoken 'script' (up to 900 characters) or the audio in 'audio_url' (1 to 300 seconds).
expressivenessNot accepted on HeyGen Avatar 6 Turbo: use 'motion_expressiveness' ("default" or "less").
image_url, image, images, image_urls, reference_imagesNot accepted: this endpoint uses a stock avatar. To animate your own photo, use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/image-to-video.
model, engineNot accepted: this endpoint always runs HeyGen Avatar 6 Turbo. For Avatar 6 use POST https://gateway.pixazo.ai/heygen-avatar-6/v1/text-to-video.
negative_promptNot supported. Describe the motion you want in 'motion_prompt'.
output_formatNot supported: the video is always an MP4.
output_width, output_height, width, heightNot supported: the video's shape is 'aspect_ratio' (16:9, 9:16, 1:1, 4:5 or 5:4), sized by 'resolution' (1080p or 2k).
parameters, inputNot accepted: send the fields at the top level of the JSON body.
promptNot accepted. Send the words in 'script'; describe gestures and expression in 'motion_prompt'.
reference_videos, reference_video, video, video_urlNot accepted: this endpoint uses a stock avatar. To animate a character from a video, use POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/video-to-video.
speedNot supported: the voice's speed is fixed.
streamNot supported on this API: the result is delivered when the job completes.
textNot accepted: send the words the avatar speaks in 'script'.
typeNot accepted: this endpoint sets it.
voice_idNot accepted: choose a voice by name in 'voice'.
voice_settingsNot supported: the voice's speed and tuning are fixed.
webhook_modeNot accepted in the JSON body. Send it as the X-Webhook-Mode request header instead.

Stock avatars

avatar takes one of these 64 names, written exactly. Each is a HeyGen studio presenter filmed in its own setting and speaks in its own voice unless you choose one.

AvatarAvatarAvatarAvatar
Brandon Business Sitting FrontCaroline Business Sitting SideAnnie Lounge Standing SideSanta Fireplace Side
Judy Teacher StandingSilas Customer SupportDexter Doctor StandingElenora Fitness Coach 2
Ann Doctor SittingShawn TherapistBryan Fitness CoachJune HR
Raul Business Sofa Front 2Scarlett Fireplace SideAubrey Outdoor Sport SideBrent Sofa Side 2
Gala Sofa SideBlanka Picnic SideBojan Lounge Side 2Emilia Outdoor Yoga Front 2
Jonas Gym Side Gerardo Indoor FrontPiper Business Sofa SideLeszek Sofa Side
Mireia Outdoor Table SideKavya Outdoor SideNoah Lobby Front 2Patrizio Sofa Front
Joel Couch SideMax Indoor SideRiley Casual SideJudita Yoga Side 2
Timothy Casual SideVince Business Training FrontChloe Outdoor SideGeorgia Casual Side
Ida Lounge FrontFernando Outdoor Table SideAbigail Office SideAmelia Lounge Side 2
Oxana Gym Side 2Roman Outdoor Sport SideMartina Sofa Front 2Leos Sofa Side 2
Teodor Sofa Side 2Rasmus Lounge Side 2Juan Sofa Front 2Milena Office Side 2
Vernon Office Side 2Conrad Sofa FrontRen Sofa Business SideArtur Office Side
Masha Office SideMiyu Sofa Business SideGiulia Office Side 2Matteo Office Side 2
Verena Sofa SideEmanuel Office SideDerya Office Side 2Miles Sofa Front 2
Veit Sofa SideSabine Sofa SideAnja Sofa Side Matthew

Speech

  • A script: send the words in script, up to 900 characters (about a minute of ordinary English). Markup such as pause or SSML tags (< >) is not accepted. Text that is only a web address is refused. Line breaks become pauses.
  • A voice: leave voice out to use the avatar's own voice, or choose one of: Jonah, Nadine, Tabitha, Soren, Elowen, Vincent, Jocelyn, Marielle, Corinne, Lucian, Kieran, Hugh, Noelle, Bram, Ewan, Iona, Cecily, Simon, Weston, Felicity, Gareth, Rory, Meredith, Sabrina.
  • A recording: send audio_url instead of script; the avatar performs it as it is, and the video is as long as it (1 to 300 seconds; longer or shorter is refused with a 400).
  • The video's sound track is the spoken script or your recording.

Output size

aspect_ratio sets the shape and resolution the size:

aspect_ratio1080p2k
16:9 (default)1920 × 10802560 × 1440
9:161080 × 19201440 × 2560
1:11080 × 10801440 × 1440
4:51080 × 13501440 × 1800
5:41350 × 10801800 × 1440

At launch, this request came back as a 5.48-second 1920×1080 MP4 at 25 frames per second, with the speech as its sound track.

Speed

Set service_tier to fast to have the video rendered up to 2.5 times faster. It is billed at twice the per-second rate for the same resolution. default, or leaving the field out, renders at the normal speed and rate. The time until the finished video is ready also depends on queueing and on final processing, so it is shorter, not 2.5 times shorter.

Example: fast rendering

{
  "avatar": "Brandon Business Sitting Front",
  "script": "Hi, I'm Brandon. This short clip was made with HeyGen Avatar 6 on Pixazo.",
  "service_tier": "fast"
}

Timing

At launch, the 5-second video took about 80 seconds from submit to result. Longer speech and 2k take longer; fast is quicker. Poll the status endpoint every 10 seconds or so, or use a Webhook.

Example Request

{
  "avatar": "Brandon Business Sitting Front",
  "script": "Hi, I'm Brandon. This short clip was made with HeyGen Avatar 6 on Pixazo."
}

Example Response

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing avatar, or an avatar name not in the listsynchronous 400
Neither script nor audio_url, both of them, or voice with audio_urlsynchronous 400
A script over 900 characters, or a voice, aspect_ratio, resolution, motion_expressiveness or service_tier not in its listsynchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A recording longer than 300 seconds or shorter than 1 secondsynchronous 400
A script or recording the model refuses under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

text-to-video with both script and audio_url (synchronous 400)

Sent {"avatar": "Brandon Business Sitting Front", "script": "Hi.", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3"}:

{
  "error": "Invalid request parameters",
  "message": "Send either 'script' (the words the avatar speaks) or 'audio_url' (a speech recording), not both.",
  "violations": [
    "Send either 'script' (the words the avatar speaks) or 'audio_url' (a speech recording), not both."
  ]
}

text-to-video with an avatar outside the list (synchronous 400)

Sent {"avatar": "Nobody Special", "script": "Hi."}:

{
  "error": "Invalid request parameters",
  "message": "'avatar' must be one of: \"Brandon Business Sitting Front\", \"Caroline Business Sitting Side\", \"Annie Lounge Standing Side\", \"Santa Fireplace Side\", \"Judy Teacher Standing\", \"Silas Customer Support\", \"Dexter Doctor Standing\", \"Elenora Fitness Coach 2\", \"Ann Doctor Sitting\", \"Shawn Therapist\", \"Bryan Fitness Coach\", \"June HR\", \"Raul Business Sofa Front 2\", \"Scarlett Fireplace Side\", \"Aubrey Outdoor Sport Side\", \"Brent Sofa Side 2\", \"Gala Sofa Side\", \"Blanka Picnic Side\", \"Bojan Lounge Side 2\", \"Emilia Outdoor Yoga Front 2\", \"Jonas Gym Side \", \"Gerardo Indoor Front\", \"Piper Business Sofa Side\", \"Leszek Sofa Side\", \"Mireia Outdoor Table Side\", \"Kavya Outdoor Side\", \"Noah Lobby Front 2\", \"Patrizio Sofa Front\", \"Joel Couch Side\", \"Max Indoor Side\", \"Riley Casual Side\", \"Judita Yoga Side 2\", \"Timothy Casual Side\", \"Vince Business Training Front\", \"Chloe Outdoor Side\", \"Georgia Casual Side\", \"Ida Lounge Front\", \"Fernando Outdoor Table Side\", \"Abigail Office Side\", \"Amelia Lounge Side 2\", \"Oxana Gym Side 2\", \"Roman Outdoor Sport Side\", \"Martina Sofa Front 2\", \"Leos Sofa Side 2\", \"Teodor Sofa Side 2\", \"Rasmus Lounge Side 2\", \"Juan Sofa Front 2\", \"Milena Office Side 2\", \"Vernon Office Side 2\", \"Conrad Sofa Front\", \"Ren Sofa Business Side\", \"Artur Office Side\", \"Masha Office Side\", \"Miyu Sofa Business Side\", \"Giulia Office Side 2\", \"Matteo Office Side 2\", \"Verena Sofa Side\", \"Emanuel Office Side\", \"Derya Office Side 2\", \"Miles Sofa Front 2\", \"Veit Sofa Side\", \"Sabine Sofa Side\", \"Anja Sofa Side \", \"Matthew\" (got \"Nobody Special\")",
  "violations": [
    "'avatar' must be one of: \"Brandon Business Sitting Front\", \"Caroline Business Sitting Side\", \"Annie Lounge Standing Side\", \"Santa Fireplace Side\", \"Judy Teacher Standing\", \"Silas Customer Support\", \"Dexter Doctor Standing\", \"Elenora Fitness Coach 2\", \"Ann Doctor Sitting\", \"Shawn Therapist\", \"Bryan Fitness Coach\", \"June HR\", \"Raul Business Sofa Front 2\", \"Scarlett Fireplace Side\", \"Aubrey Outdoor Sport Side\", \"Brent Sofa Side 2\", \"Gala Sofa Side\", \"Blanka Picnic Side\", \"Bojan Lounge Side 2\", \"Emilia Outdoor Yoga Front 2\", \"Jonas Gym Side \", \"Gerardo Indoor Front\", \"Piper Business Sofa Side\", \"Leszek Sofa Side\", \"Mireia Outdoor Table Side\", \"Kavya Outdoor Side\", \"Noah Lobby Front 2\", \"Patrizio Sofa Front\", \"Joel Couch Side\", \"Max Indoor Side\", \"Riley Casual Side\", \"Judita Yoga Side 2\", \"Timothy Casual Side\", \"Vince Business Training Front\", \"Chloe Outdoor Side\", \"Georgia Casual Side\", \"Ida Lounge Front\", \"Fernando Outdoor Table Side\", \"Abigail Office Side\", \"Amelia Lounge Side 2\", \"Oxana Gym Side 2\", \"Roman Outdoor Sport Side\", \"Martina Sofa Front 2\", \"Leos Sofa Side 2\", \"Teodor Sofa Side 2\", \"Rasmus Lounge Side 2\", \"Juan Sofa Front 2\", \"Milena Office Side 2\", \"Vernon Office Side 2\", \"Conrad Sofa Front\", \"Ren Sofa Business Side\", \"Artur Office Side\", \"Masha Office Side\", \"Miyu Sofa Business Side\", \"Giulia Office Side 2\", \"Matteo Office Side 2\", \"Verena Sofa Side\", \"Emanuel Office Side\", \"Derya Office Side 2\", \"Miles Sofa Front 2\", \"Veit Sofa Side\", \"Sabine Sofa Side\", \"Anja Sofa Side \", \"Matthew\" (got \"Nobody Special\")"
  ]
}

text-to-video voice + audio_url (synchronous 400)

Sent {"avatar": "Brandon Business Sitting Front", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-5s.mp3", "voice": "Jonah"}:

{
  "error": "Invalid request parameters",
  "message": "'voice' applies to 'script' only: with 'audio_url' the avatar performs the recording as it is.",
  "violations": [
    "'voice' applies to 'script' only: with 'audio_url' the avatar performs the recording as it is."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen Avatar 6 Turbo request at launch; the request id is masked.

{
  "request_id": "heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-6-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://cdn.pixazo.ai/v1/heygen-avatar-6-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-30T08:30:22.720Z",
  "updated_at": "2026-11-30 08:31:46",
  "completed_at": "2026-11-30 08:31:45"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-avatar-6-turbo for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-avatar-6-turbo/v1/text-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the output video: the amount is the per-second rate for the video's resolution and speed (service_tier) times the length of the video in whole seconds. The length is rounded up to the next whole second, except that up to a twentieth of a second past a whole second is not counted, and every video counts at least 1 second: a 5.03-second video is billed as 5 seconds, a 5.2-second video is billed as 6 seconds and a 0.8-second video is billed as 1 second. The video is as long as the spoken script or your recording, so longer speech costs more; 2k has a higher per-second rate than 1080p, and fast is billed at twice the default rate. A hold is placed when the request is submitted; when the video is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rates are shown in the pricing panel on this page.

HeyGen Avatar 6 Turbo API Pricing — Per-Second Rates

Billed per second of video at the requested resolution (1080p or 2k) and speed (service_tier: default, or fast at twice the rate); 1080p and default are the defaults. The video is as long as the spoken script or the speech audio.

ResolutionPrice (USD)
1080p$0.0525/sec
2k$0.09187/sec
1080p, fast$0.105/sec
2k, fast$0.18375/sec
3. HeyGen Avatar 5

HeyGen Avatar 5 API Documentation

Make a talking video with HeyGen Avatar 5 (HeyGen's Avatar V engine): choose one of the stock presenters listed below in avatar and send the words to speak in script. The presenter speaks your script in their own voice or in the voice you choose, and the video is as long as the speech. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-avatar-v/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - HeyGen Avatar 5

Request Code

POST https://gateway.pixazo.ai/heygen-avatar-v/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "avatar": "Dante Office 2",
  "script": "Hello from Pixazo. This short video shows a stock presenter speaking with natural gestures.",
  "more_blinking": true
}
import requests

url = "https://gateway.pixazo.ai/heygen-avatar-v/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "avatar": "Dante Office 2",
  "script": "Hello from Pixazo. This short video shows a stock presenter speaking with natural gestures.",
  "more_blinking": True
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-avatar-v/v1/text-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "avatar": "Dante Office 2",
  "script": "Hello from Pixazo. This short video shows a stock presenter speaking with natural gestures.",
  "more_blinking": true
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-v/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"avatar": "Dante Office 2", "script": "Hello from Pixazo. This short video shows a stock presenter speaking with natural gestures.", "more_blinking": true}'

Output

{
  "request_id": "heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-avatar-v/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"avatar": "Dante Office 2", "script": "Hello from Pixazo. This short video shows a stock presenter speaking with natural gestures.", "more_blinking": true}'

Callback Payload (success)

{
  "request_id": "heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-v",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T03:04:43.962Z",
  "updated_at": "2026-11-18 03:06:29",
  "completed_at": "2026-11-18 03:06:27"
}

Failure callback shape

{
  "request_id": "heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-avatar-v",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
avatarYesrequiredstring—One of the 50 avatars listed under Avatars
The stock presenter who speaks, written exactly as listed.
scriptYesrequiredstring—Non-empty text of at most 900 characters and 1440 units (see Script and Length)
The words to speak. The video lasts as long as the speech.
voiceNostringThe avatar's own voiceOne of the voices listed under Voices
The voice that reads the script, written exactly as listed. Leave it out to use the avatar's own voice.
resolutionNostring"1080p"720p, 1080p
Output resolution, written exactly as listed. It does not change the amount billed.
aspect_ratioNostring"16:9"16:9, 9:16, 4:5, 5:4, 1:1, auto
The shape of the video, written exactly as listed. auto follows the shape of the avatar's own footage.
motion_promptNostring—Up to 1000 characters; not available with the current avatars (see Motion and Blinking)
Plain-language direction for the presenter's body motion and hand gestures (see Motion and Blinking). The words still come from script, and the length still follows the speech.
more_blinkingNobooleanfalsetrue, false
true makes the presenter blink more often, for a more natural look.

Good to know

  • Each request returns one video, as long as the speech of script. Send one request per video.
  • Use the JSON types shown: more_blinking is a boolean (true or false, without quotes) and every other field is a string. Omit a field instead of sending null.
  • Do not start script with a web address: a value that begins with http://, https:// or data: is taken as a link to a file and fetched when you submit. When it does not download as a file, the request is refused with a 400 and nothing is charged; when it does, the avatar reads out a link instead of your words. A web address later in the text is left as it is.
  • The avatars are licensed stock presenters: use them only for content you are allowed to publish, and never to pass them off as a real, identifiable person.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged.

ParameterWhy
audio_url, audio_asset_idNot supported: the avatar speaks the words in 'script'.
avatar_idNot accepted. Choose a HeyGen stock avatar by name in 'avatar'.
background, remove_background, caption, watermark, folder_id, title, brand_glossary_id, reference_look_idNot supported on HeyGen Avatar V.
batch_size, num_images, number_of_images, n, countNot supported: each request returns one video. Send one request per video.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
duration, seconds, num_frames, frames_per_second, music_length_msNot supported: the video is as long as the script takes to speak (see Script and Length in the documentation).
engineNot accepted: each HeyGen Avatar endpoint always runs its own engine.
expressivenessAvailable only on HeyGen Avatar IV (POST https://gateway.pixazo.ai/heygen-avatar-iv/v1/image-to-video).
image, image_urlsNot accepted: HeyGen Avatar V animates HeyGen stock avatars, chosen by name in 'avatar'. To animate a photo use POST https://gateway.pixazo.ai/heygen-avatar-iv/v1/image-to-video.
image_urlNot accepted by HeyGen Avatar V: it animates HeyGen stock avatars, chosen by name in 'avatar'. To animate a photo use POST https://gateway.pixazo.ai/heygen-avatar-iv/v1/image-to-video.
modelNot accepted: this endpoint always runs the same engine.
output_formatNot supported: the video is always an MP4.
parameters, inputNot accepted by this model. Send the fields at the top level of the JSON body.
prompt, content, textNot accepted. Send the words to speak in 'script'.
typeNot accepted: this endpoint sets it.
voice_idNot accepted. Choose a preset voice by name in 'voice'.
voice_settings, speedNot supported: the voice speaks at its natural speed.

Script and Length

The video is as long as the speech of script. A script can hold up to 1440 units: about 900 characters of ordinary English, about 450 characters of Chinese or Japanese, and about 480 in Hindi or Thai. Capitals, digits, symbols and line breaks weigh more, so a script with many of them fits fewer characters. Units weigh how long a voice takes to say the script, not how many characters it has:

  • a letter counts its size in UTF-8: 1 for a to z, 2 for most accented, Greek, Cyrillic, Arabic and Hebrew letters, and 3 for Chinese, Japanese, Korean, Indic and Thai characters;
  • every letter of a word that may be read out letter by letter counts 4 (6 for W, Y, ß and letters outside the Latin alphabet, whose names are long): a single Latin letter, a word with two or more capitals that are at least half of its letters (such as NASA or APIs, but not YouTube), Latin letters with no vowel (such as www), with only vowels, three or more, or with five consonants in a row (ch, ck, gh, ng, ph, sh, th and wh count as one);
  • a sentence end (. ! ?) counts 9, and an ellipsis is three of them; a digit 6; a line break 6; a comma, colon, semicolon or dash 3; a space 1; a quote, an apostrophe or a bracket 1; any other symbol 6, or 24 outside the basic Latin alphabet; and an emoji or a flag 24;
  • every word counts at least 5, a word with no letter or digit at least 12, and the abbreviations etc, intl, approx, misc, assoc, univ, corp, esp at least 12 each.

The script is counted, and sent, in Unicode NFKC form: a full-width letter is the ordinary letter, and an ellipsis is three full stops. Several line breaks in a row count, and are sent, as one. The characters < and > are not allowed. A script longer than 900 characters is refused when you submit; a shorter one that is over 1440 units once weighted ends with status: "ERROR", with its weight in the message, and nothing is charged. The speaking speed is fixed and cannot be changed, and the video is billed by its real length (see How Billing Is Measured).

How a script is counted

ScriptUnitsWhy
Hello, world.23Ten letters 1 each, the comma 3, the space 1, the full stop 9
Müller7An accented letter counts 2
東京6Chinese, Japanese and Korean characters count 3 each
NASA16Read out letter by letter: 4 for each letter
www18No vowel, so read out letter by letter; W, Y and ß have long names: 6 each
ok5Every word counts at least 5
etc12An abbreviation a voice may say in full (et cetera) counts at least 12
202624Each digit counts 6: numbers are read out as words
50%18Two digits 6 each, and the symbol 6
...27Three full stops, 9 each (an ellipsis counts the same)
🙂24An emoji counts 24: a voice may read its name aloud
resolutionNote
720pThe short side of the video is 720 pixels
1080pThe default; the short side of the video is 1080 pixels

Both resolutions are billed at the same rate per second. The video is an MP4 file. At launch, a 5.96-second 1080p video came back as 1920×1080 at 25 frames per second, with the voice as its sound track.

Example: a vertical 1080p video

{
  "avatar": "Dante Office 2",
  "script": "Hello from Pixazo. Thanks for watching this short welcome video.",
  "resolution": "1080p",
  "aspect_ratio": "9:16"
}

Motion and Blinking

  • motion_prompt directs the presenter's body motion and hand gestures in plain language, up to 1000 characters, for example Gesture with open hands while explaining, then nod at the end. Without it, the presenter moves naturally with the speech.
  • None of the current avatars can take motion_prompt yet: on Avatar 5, HeyGen moves a stock presenter by a motion prompt only when the presenter's avatar group has an animation reference, and none of the 50 has one. A request that sends motion_prompt is refused with a 400 when you submit, before anything is held or charged. To direct gestures with a prompt, use HeyGen Avatar IV (POST https://gateway.pixazo.ai/heygen-avatar-iv/v1/image-to-video), which animates a photo.
  • more_blinking: true makes the presenter blink more often, for a more natural look; the default is false. It works with every avatar.
  • more_blinking does not change the length of the video or the rate.

Example: more natural blinking

{
  "avatar": "Dante Office 2",
  "script": "Welcome to the team. Here is what we will cover today.",
  "more_blinking": true
}

Avatars

Write the name in avatar exactly as listed (50 avatars): Dante Office 2, Brody Living Room 2, Hayes Office 11, Lasse Living Room 1, Julian Office 8, Fintan Office 9, Beckett Office 4, Elise, Saoirse Livingroom 1, Liza Livingroom 3, Kenji Office 10, Genevieve Office 3, Elodie Kitchen 9, Dashiell Office 10, Cassian Office 18, Aya Kitchen 6, Sigrid Office 4, Camille, Ronan Livingroom 8, Elliot Livingroom 6, Sebastian Office 11, Rowan Office 7, Rafael Kitchen 3, Katharina Office 6, Damian Office 6, Beatriz Office 4, Ailsa Office 14, Zofia Livingroom 4, Asta Livingroom 8, Ylva Office 6, Vesna Office 8, Runa Livingroom 3, Rafi Office 2, Noor Kitchen 3, Mireille Livingroom 3, Fiora Office 2, Elara Kitchen 4, Cora Office 4, Marieke Modern Corporate 2, Signe Kitchen 1, Margot Office 12, Livia Office 12, Elin Warm Autumn 5, Astrid Modern Corporate 3, Zaina Modern Corporate 2, Saki Livingroom 4, Pernille Warm Autumn Earthy 1, Odette Livingroom 3, Kacper Kitchen 1, Ines Presenter 3.

  • Each avatar is a stock presenter with its own look, framing and voice. Leave voice out to use the avatar's own voice, or choose one of the voices below.
  • Photos are not accepted on this API: the presenter always comes from the list above.
  • The avatars are licensed stock presenters: use them only for content you are allowed to publish, and never to pass them off as a real, identifiable person. As on every HeyGen API on Pixazo, use only faces you have the right to use.

Example: another avatar with a listed voice

{
  "avatar": "Brody Living Room 2",
  "script": "Welcome to the team. Here is what we will cover today.",
  "voice": "Jonah"
}

Voices

Write the name in voice exactly as listed (24 voices; the avatar's own voice when you leave it out): Jonah, Nadine, Tabitha, Soren, Elowen, Vincent, Jocelyn, Marielle, Corinne, Lucian, Kieran, Hugh, Noelle, Bram, Ewan, Iona, Cecily, Simon, Weston, Felicity, Gareth, Rory, Meredith, Sabrina.

The sound of the video is the voice reading your script. There is no setting for music or background sound, and the voice does not change the price.

Timing

At launch, a 6-second video took about 95 seconds from submit to result. Longer scripts take longer. Poll the status endpoint every 10 seconds or so, or use a Webhook.

Example Request

{
  "avatar": "Dante Office 2",
  "script": "Hello from Pixazo. This short video shows a stock presenter speaking with natural gestures.",
  "more_blinking": true
}

Example Response

{
  "request_id": "heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is too long or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing avatar, or a name that is not one of the listed avatars (written exactly as listed)synchronous 400
Missing or empty script, script not a string, or longer than 900 characterssynchronous 400
voice, resolution or aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
motion_prompt not a string, or longer than 1000 characters; more_blinking not true or falsesynchronous 400
motion_prompt with any of the current avatars (see Motion and Blinking)synchronous 400
A script that starts with http://, https:// or data: and does not download as a file (nothing is charged)synchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A script over 1440 units once weighted (see Script and Length), or one that contains < or > (nothing is charged)status: "ERROR"
A script the model refuses, for example under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing script (synchronous 400)

Sent {"avatar": "Dante Office 2"}:

{
  "error": "Invalid request parameters",
  "message": "'script' is required",
  "violations": [
    "'script' is required"
  ]
}

motion_prompt (not available with the current avatars) (synchronous 400)

Sent {"avatar": "Dante Office 2", "motion_prompt": "Gesture with open hands while explaining, then give a small nod at the end."}:

{
  "error": "Invalid request parameters",
  "message": "'script' is required; 'motion_prompt' is not available with HeyGen Avatar V's stock avatars: HeyGen applies a motion prompt on Avatar V only to an avatar whose avatar group has an animation reference (a digital twin or studio look), and none of them has one. Leave 'motion_prompt' out, or use HeyGen Avatar IV (POST https://gateway.pixazo.ai/heygen-avatar-iv/v1/image-to-video), which takes 'motion_prompt' with a photo.",
  "violations": [
    "'script' is required",
    "'motion_prompt' is not available with HeyGen Avatar V's stock avatars: HeyGen applies a motion prompt on Avatar V only to an avatar whose avatar group has an animation reference (a digital twin or studio look), and none of them has one. Leave 'motion_prompt' out, or use HeyGen Avatar IV (POST https://gateway.pixazo.ai/heygen-avatar-iv/v1/image-to-video), which takes 'motion_prompt' with a photo."
  ]
}

A value of the wrong type (synchronous 400)

Sent {"avatar": "Dante Office 2", "more_blinking": "true"}:

{
  "error": "Invalid request parameters",
  "message": "'script' is required; 'more_blinking' must be boolean (got string)",
  "violations": [
    "'script' is required",
    "'more_blinking' must be boolean (got string)"
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen Avatar 5 request at launch; the request id is masked.

{
  "request_id": "heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-avatar-v",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-avatar-v_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T03:04:43.962Z",
  "updated_at": "2026-11-18 03:06:29",
  "completed_at": "2026-11-18 03:06:27"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-avatar-v for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-avatar-v/v1/text-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the output video: the amount is the per-second rate times the length of the video in whole seconds. The length is rounded up to the next whole second, except that up to a twentieth of a second past a whole second is not counted, and every video counts at least 1 second: a 5.03-second video is billed as 5 seconds, a 5.2-second video is billed as 6 seconds and a 0.8-second video is billed as 1 second. The video is as long as the speech of script, so a longer script costs more; the avatar, the voice, the resolution, the aspect ratio, motion_prompt and more_blinking do not change the rate. A hold for 90 seconds is placed when the request is submitted; when the video is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rate is shown in the pricing panel on this page.

HeyGen Avatar 5 API Pricing — Per-Second Rates

Billed per second of video; 720p and 1080p cost the same. The video is as long as the avatar takes to speak your script (up to 900 characters).

ResolutionPrice (USD)
720p$0.126/sec
1080p$0.126/sec
4. HeyGen Voice 1

HeyGen Voice 1 API Documentation

Turn text into speech with HeyGen Voice: send the words to speak in text and, optionally, choose one of 24 voices in voice, or clone a voice from a recording in reference_audio_url. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the audio file from output.media_url.

POST https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Speech - HeyGen Voice

Request Code

POST https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "text": "Welcome to the city museum. The east wing is open today until six in the evening.",
  "voice": "Nadine"
}
import requests

url = "https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "text": "Welcome to the city museum. The east wing is open today until six in the evening.",
  "voice": "Nadine"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "text": "Welcome to the city museum. The east wing is open today until six in the evening.",
  "voice": "Nadine"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"text": "Welcome to the city museum. The east wing is open today until six in the evening.", "voice": "Nadine"}'

Output

{
  "request_id": "heygen-voice_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-voice_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"text": "Welcome to the city museum. The east wing is open today until six in the evening.", "voice": "Nadine"}'

Callback Payload (success)

{
  "request_id": "heygen-voice_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-voice",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "heygen-voice_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-voice",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
textYesrequiredstring—Non-empty text, up to 5000 characters
The words to speak. Billing counts the characters of this text (see How Billing Is Measured).
voiceNostring"Jonah"
24 values
Jonah, Nadine, Tabitha, Soren, Elowen, Vincent, Jocelyn, Marielle, Corinne, Lucian, Kieran, Hugh, Noelle, Bram, Ewan, Iona, Cecily, Simon, Weston, Felicity, Gareth, Rory, Meredith, Sabrina
The voice that speaks the text, written exactly as listed. Ignored when you send reference_audio_url.
reference_audio_urlNostring—A publicly reachable https URL of a recording, for example an MP3 or WAV file
A recording of a single speaker whose voice speaks the text instead of a listed voice (see Voices, Cloning and Language below). Only the first 3 minutes are used.
languageNostringDetected from the text
39 values
ar, be, bg, ca, cs, da, de, el, en, es, fa, fi, fr, he, hi, hr, hu, id, it, ja, ko, mk, ms, nl, pl, pt, ro, ru, sk, sl, sr, sv, ta, th, tl, tr, uk, vi, zh
The language of the text, as a two-letter code. Left out, it is detected from the text.
expressiveness_boostNonumber10–1
The level of expression in the delivery, from 0 to 1.
enable_safety_checkerNobooleantruetrue
The safety checker is always on: only true is accepted.

Good to know

  • Each request returns one audio file. batch_size, num_images, number_of_images, n and count are rejected — send one request per audio file.
  • The length of the speech follows the text. duration, seconds, num_frames and frames_per_second are rejected.
  • Send every field at the top level of the JSON body; parameters and input are rejected.
  • Choose a listed voice in voice, or clone a voice: send a recording of a single speaker in reference_audio_url. With a recording, voice is ignored, and only the first 3 minutes of the recording are used.
  • Leave language out to have the language detected from the text, or set it to one of the two-letter codes listed.
  • prompt and content are rejected: send the words to speak in text.
  • voice_id is rejected: choose a listed voice by name in voice, or clone one with reference_audio_url.
  • audio_url is rejected: send the recording to clone in reference_audio_url.
  • The result is always a WAV file: output_format is rejected.
  • enable_safety_checker is accepted only as true: the safety checker is always on.
  • HeyGen Voice Turbo takes the same fields and is billed the same way, at its own rate: POST https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech.
  • Use the JSON types shown: text, voice, reference_audio_url and language are strings; expressiveness_boost is a number (0.5, not "0.5"); enable_safety_checker is true, not "true".
  • Omit a field instead of sending null.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • stream is not supported: the result is delivered when the job completes.
  • Do not begin text with http://, https:// or data: — such a value is treated as a file to download, and the request is refused at submit with nothing charged.

Voices, Cloning and Language

  • Voices: set voice to one of Jonah, Nadine, Tabitha, Soren, Elowen, Vincent, Jocelyn, Marielle, Corinne, Lucian, Kieran, Hugh, Noelle, Bram, Ewan, Iona, Cecily, Simon, Weston, Felicity, Gareth, Rory, Meredith or Sabrina, written exactly as listed; Jonah applies when you leave it out.
  • Cloning: to speak the text in another voice, send a recording of a single speaker in reference_audio_url, as a publicly reachable https URL. Only the first 3 minutes of the recording are used, and voice is ignored.
  • Language: set language to the two-letter code of the language of the text, for example en, es or ja; left out, it is detected from the text.
  • Expression: expressiveness_boost sets the level of expression in the delivery, from 0 to 1; 1 applies when you leave it out.

Example: Spanish text with a chosen voice

{
  "text": "Hola, gracias por llamar. En un momento le atendemos.",
  "voice": "Elowen",
  "language": "es"
}

Example: clone the voice of a recording

{
  "text": "This sentence is spoken in the voice of the recording.",
  "reference_audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"
}

Example: a lower expressiveness_boost

{
  "text": "Take a slow breath in, and let it go.",
  "voice": "Iona",
  "expressiveness_boost": 0.3
}

Example Request

{
  "text": "Welcome to the city museum. The east wing is open today until six in the evening.",
  "voice": "Nadine"
}

Example Response

{
  "request_id": "heygen-voice_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-voice_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is too long, out of range or not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. A reference_audio_url that cannot be downloaded is also refused at submit with a 400, and its hold is released at once: nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty text, text not a string, or longer than 5000 characterssynchronous 400
A reference_audio_url that cannot be downloaded when you submit (the hold is released at once: nothing is charged)synchronous 400
enable_safety_checker must be true or left out: the safety checker is always onsynchronous 400
voice not one of the allowed values (written exactly as listed)synchronous 400
language not one of the allowed values (written exactly as listed)synchronous 400
reference_audio_url not a stringsynchronous 400
expressiveness_boost not a number from 0 to 1 — for example 2 or the string "1"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
prompt, content (send the words to speak in text)synchronous 400
voice_id (choose a listed voice by name in voice, or clone one with reference_audio_url)synchronous 400
audio_url (send the recording to clone in reference_audio_url)synchronous 400
output_format (the result is always a WAV file)synchronous 400
batch_size, num_images, number_of_images, n, count (one audio file per request)synchronous 400
duration, seconds, num_frames, frames_per_second (the length of the speech follows the text)synchronous 400
parameters, input (send the fields at the top level of the JSON body)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
stream (the result is delivered when the job completes)synchronous 400
A recording in reference_audio_url the model cannot use, for example a file that is not audiostatus: "ERROR"
A text the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing text (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' is required",
  "violations": [
    "'text' is required"
  ]
}

A voice that is not listed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'voice' must be one of: \"Jonah\", \"Nadine\", \"Tabitha\", \"Soren\", \"Elowen\", \"Vincent\", \"Jocelyn\", \"Marielle\", \"Corinne\", \"Lucian\", \"Kieran\", \"Hugh\", \"Noelle\", \"Bram\", \"Ewan\", \"Iona\", \"Cecily\", \"Simon\", \"Weston\", \"Felicity\", \"Gareth\", \"Rory\", \"Meredith\", \"Sabrina\" (got \"Alice\")",
  "violations": [
    "'voice' must be one of: \"Jonah\", \"Nadine\", \"Tabitha\", \"Soren\", \"Elowen\", \"Vincent\", \"Jocelyn\", \"Marielle\", \"Corinne\", \"Lucian\", \"Kieran\", \"Hugh\", \"Noelle\", \"Bram\", \"Ewan\", \"Iona\", \"Cecily\", \"Simon\", \"Weston\", \"Felicity\", \"Gareth\", \"Rory\", \"Meredith\", \"Sabrina\" (got \"Alice\")"
  ]
}

A language that is not listed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'language' must be one of: \"ar\", \"be\", \"bg\", \"ca\", \"cs\", \"da\", \"de\", \"el\", \"en\", \"es\", \"fa\", \"fi\", \"fr\", \"he\", \"hi\", \"hr\", \"hu\", \"id\", \"it\", \"ja\", \"ko\", \"mk\", \"ms\", \"nl\", \"pl\", \"pt\", \"ro\", \"ru\", \"sk\", \"sl\", \"sr\", \"sv\", \"ta\", \"th\", \"tl\", \"tr\", \"uk\", \"vi\", \"zh\" (got \"english\")",
  "violations": [
    "'language' must be one of: \"ar\", \"be\", \"bg\", \"ca\", \"cs\", \"da\", \"de\", \"el\", \"en\", \"es\", \"fa\", \"fi\", \"fr\", \"he\", \"hi\", \"hr\", \"hu\", \"id\", \"it\", \"ja\", \"ko\", \"mk\", \"ms\", \"nl\", \"pl\", \"pt\", \"ro\", \"ru\", \"sk\", \"sl\", \"sr\", \"sv\", \"ta\", \"th\", \"tl\", \"tr\", \"uk\", \"vi\", \"zh\" (got \"english\")"
  ]
}

expressiveness_boost above 1 (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'expressiveness_boost' must be <= 1 (got 1.5)",
  "violations": [
    "'expressiveness_boost' must be <= 1 (got 1.5)"
  ]
}

A text longer than 5000 characters (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' must be at most 5000 characters (got 5001)",
  "violations": [
    "'text' must be at most 5000 characters (got 5001)"
  ]
}

prompt instead of text (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' is required; 'prompt' must be one of:  (got \"Welcome to the city museum. The east wing is open today until six in the evening.\"); 'prompt' is not accepted by this model. Send the text to speak in 'text'.",
  "violations": [
    "'text' is required",
    "'prompt' must be one of:  (got \"Welcome to the city museum. The east wing is open today until six in the evening.\")",
    "'prompt' is not accepted by this model. Send the text to speak in 'text'."
  ]
}

The safety checker turned off (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'enable_safety_checker' must be one of: true (got false); 'enable_safety_checker' must be true or left out: the safety checker is always on.",
  "violations": [
    "'enable_safety_checker' must be one of: true (got false)",
    "'enable_safety_checker' must be true or left out: the safety checker is always on."
  ]
}

More than one audio file per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'n' must be one of:  (got 2); 'n' is not supported: each request returns one audio file. Send one request per text.",
  "violations": [
    "'n' must be one of:  (got 2)",
    "'n' is not supported: each request returns one audio file. Send one request per text."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the audio file from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-voice_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "heygen-voice_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-voice",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-voice for this endpoint.
output.media_urlarray of stringsURL of the audio file (one WAV file per request).
output.media_typestringaudio/wav.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the audio file from output.media_url.

How Billing Is Measured

Billing is measured per 1,000 characters of text: the number of characters is rounded up to the next full 1,000, so a text of 1 to 1,000 characters is billed as 1,000 and a text of 1,001 to 2,000 characters as 2,000. The voice, the reference recording, the language and expressiveness_boost do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

HeyGen Voice 1 API Pricing

Your request will cost $0.0158 per 1,000 characters of input text.
each started block of 1,000 characters is billed once
Speech to Speech

HeyGen Voice 1 API Documentation

Speak a recording again in another voice with HeyGen Voice Speech to Speech: send the recording in audio_url and choose one of 24 HeyGen voices in voice. The words, timing and delivery of the recording stay the same; only the voice changes. The result is one WAV file as long as the recording. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the audio from output.media_url.

POST https://gateway.pixazo.ai/heygen-voice-sts/v1/speech-to-speech

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Speech to Speech - HeyGen Voice Speech to Speech

Request Code

POST https://gateway.pixazo.ai/heygen-voice-sts/v1/speech-to-speech
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/transcribe-sample.wav",
  "voice": "Nadine"
}
import requests

url = "https://gateway.pixazo.ai/heygen-voice-sts/v1/speech-to-speech"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/transcribe-sample.wav",
  "voice": "Nadine"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-voice-sts/v1/speech-to-speech", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/transcribe-sample.wav",
  "voice": "Nadine"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-voice-sts/v1/speech-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/transcribe-sample.wav", "voice": "Nadine"}'

Output

{
  "request_id": "heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx2",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx2"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-voice-sts/v1/speech-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/transcribe-sample.wav", "voice": "Nadine"}'

Callback Payload (success)

{
  "request_id": "heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx2",
  "status": "COMPLETED",
  "model_id": "heygen-voice-sts",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx2/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-11-18T14:29:09.798Z",
  "updated_at": "2026-11-18 14:29:49",
  "completed_at": "2026-11-18 14:29:49"
}

Failure callback shape

{
  "request_id": "heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-voice-sts",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
audio_urlYesrequiredstring—One publicly reachable https URL of a speech recording (WAV, MP3, FLAC, OGG, M4A or AAC), 1 to 300 seconds long, up to 32 MB
The recording to convert. The result keeps its words, timing and delivery, and is as long as the recording.
voiceNostring"Jonah"One of the 24 voice names below, written exactly as listed
The voice that speaks the result.
remove_background_noiseNobooleanfalsetrue, false
Clean background noise from the recording before converting it. The conversion takes longer.
seedNointeger—0 to 4294967295
Best-effort repeatable results: the same recording, voice and seed tend to give the same speech.

Voices

The same 24 voices as HeyGen Voice text to speech. Each is an English voice; the words and their language come from your recording.

voiceStyle
JonahClear & Professional
NadineCalm & Gentle
TabithaConversational & Easygoing
SorenFirm & Measured
ElowenWarm & Soothing
VincentThoughtful & Clear
JocelynBright & Energetic
MarielleUpbeat & Lively
CorinneBright & Energetic
LucianConversational & Easygoing
KieranWarm & Friendly
HughFirm & Measured
NoelleWarm & Soothing
BramCalm & Gentle
EwanBright & Energetic
IonaBright & Energetic
CecilyWarm & Friendly
SimonCalm & Gentle
WestonWarm & Friendly
FelicityUpbeat & Lively
GarethConversational & Easygoing
RoryUpbeat & Lively
MeredithSerious & Composed
SabrinaUpbeat & Lively

Good to know

  • Each request converts one recording into one WAV file. Send one request per recording.
  • The words come from your recording: there is no text field. To turn text into speech, use HeyGen Voice (https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech).
  • Send clear speech from one person. Music, long silences or several voices at once give a weaker result.
  • Use the JSON types shown. Omit a field instead of sending null.
  • Only convert recordings you have the right to use: your own voice, or a speaker who has agreed.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged. Omit a field instead of sending null.

ParameterWhy
audio_urlsNot accepted: send one recording. Send the recording as 'audio_url', a public https URL of a WAV, MP3, FLAC, OGG, M4A or AAC file (up to 300 seconds, 32 MB).
batch_size, num_images, number_of_images, n, count, num_outputsNot supported: each request converts one recording. Send one request per recording.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_url, webhook_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
content, audio, source_url, source_audio_url, video_url, asset_id, audio_asset_id, base64, audio_base64, media_typeNot accepted. Send the recording as 'audio_url', a public https URL of a WAV, MP3, FLAC, OGG, M4A or AAC file (up to 300 seconds, 32 MB).
duration, seconds, num_frames, frames_per_second, music_length_msNot accepted: the result is as long as the recording in 'audio_url' (1 to 300 seconds).
languageNot accepted: the words and their language come from the recording.
model, model_idNot accepted: this endpoint always runs HeyGen Voice speech to speech.
output_format, formatNot supported: the result is always one WAV file.
parameters, inputNot accepted: send the fields at the top level of the JSON body.
reference_audio_urlNot supported: speech to speech converts into one of the 24 HeyGen voices; cloning a voice from a recording is not offered. Choose the voice by name in 'voice' (one of the 24 HeyGen voices: Jonah, Nadine, Tabitha, ...).
stream, sync_modeNot supported on this API: the result is delivered when the job completes.
text, prompt, scriptNot accepted: the words come from the recording in 'audio_url'. To speak text, use HeyGen Voice (POST https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech).
voice_id, voice_name, target_voiceNot accepted. Choose the voice by name in 'voice' (one of the 24 HeyGen voices: Jonah, Nadine, Tabitha, ...).
voice_settings, speed, expressiveness_boostNot supported: the converted speech keeps the recording's timing and delivery.
webhook_modeNot accepted in the JSON body. Send it as the X-Webhook-Mode request header instead.

Recording and Output

  • Send the recording as one direct, publicly reachable https link in audio_url (WAV, MP3, FLAC, OGG, M4A or AAC, up to 32 MB). The file must download within 60 seconds.
  • A recording longer than 300 seconds, or shorter than 1 second, is refused with a 400 when you submit, and nothing is charged.
  • A file that cannot be read as speech ends with status: "ERROR", and nothing is charged.
  • The result is one WAV file as long as the recording. At launch, a 7.65-second recording came back as a 7.65-second WAV file (44.1 kHz, mono).

Example: a calmer voice, with noise removal

{
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/transcribe-sample.wav",
  "voice": "Elowen",
  "remove_background_noise": true,
  "seed": 42
}

Timing

At launch, the 8-second recording took about 35 seconds from submit to result. Longer recordings and noise removal take longer; a conversion can take up to a few minutes. Poll the status endpoint every 5 to 10 seconds, or use a Webhook.

Example Request

{
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/transcribe-sample.wav",
  "voice": "Nadine"
}

Example Response

{
  "request_id": "heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx2",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx2"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, the recording is too long or too short, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty audio_url, or sent as anything other than a single stringsynchronous 400
voice not one of the 24 names (written exactly as listed)synchronous 400
remove_background_noise not true or false, or seed not a whole number from 0 to 4294967295synchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A recording longer than 300 seconds or shorter than 1 second (nothing is charged)synchronous 400
A file that cannot be downloaded or read as speech (nothing is charged)status: "ERROR"
A recording the model refuses under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing audio_url (synchronous 400)

Sent {"voice": "Nadine"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required",
  "violations": [
    "'audio_url' is required"
  ]
}

A voice that is not one of the 24 (synchronous 400)

Sent {"voice": "Bob"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required; 'voice' must be one of: \"Jonah\", \"Nadine\", \"Tabitha\", \"Soren\", \"Elowen\", \"Vincent\", \"Jocelyn\", \"Marielle\", \"Corinne\", \"Lucian\", \"Kieran\", \"Hugh\", \"Noelle\", \"Bram\", \"Ewan\", \"Iona\", \"Cecily\", \"Simon\", \"Weston\", \"Felicity\", \"Gareth\", \"Rory\", \"Meredith\", \"Sabrina\" (got \"Bob\")",
  "violations": [
    "'audio_url' is required",
    "'voice' must be one of: \"Jonah\", \"Nadine\", \"Tabitha\", \"Soren\", \"Elowen\", \"Vincent\", \"Jocelyn\", \"Marielle\", \"Corinne\", \"Lucian\", \"Kieran\", \"Hugh\", \"Noelle\", \"Bram\", \"Ewan\", \"Iona\", \"Cecily\", \"Simon\", \"Weston\", \"Felicity\", \"Gareth\", \"Rory\", \"Meredith\", \"Sabrina\" (got \"Bob\")"
  ]
}

A field this API does not accept (synchronous 400)

Sent {"voice_id": "7e48c8d406b04a8089c5eb3cd057cb2e"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required; 'voice_id' must be one of:  (got \"7e48c8d406b04a8089c5eb3cd057cb2e\"); 'voice_id' is not accepted. Choose the voice by name in 'voice' (one of the 24 HeyGen voices: Jonah, Nadine, Tabitha, ...).",
  "violations": [
    "'audio_url' is required",
    "'voice_id' must be one of:  (got \"7e48c8d406b04a8089c5eb3cd057cb2e\")",
    "'voice_id' is not accepted. Choose the voice by name in 'voice' (one of the 24 HeyGen voices: Jonah, Nadine, Tabitha, ...)."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the audio from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen Voice Speech to Speech request at launch; the request id is masked.

{
  "request_id": "heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx2",
  "status": "COMPLETED",
  "model_id": "heygen-voice-sts",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-voice-sts_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx2/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-11-18T14:29:09.798Z",
  "updated_at": "2026-11-18 14:29:49",
  "completed_at": "2026-11-18 14:29:49"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-voice-sts for this endpoint.
output.media_urlarray of stringsURL of the converted audio (one WAV file per request). Download it and keep your own copy.
output.media_typestringaudio/wav.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-voice-sts/v1/speech-to-speech.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 5 to 10 seconds, or use a Webhook instead.
  4. When status is COMPLETED, download the WAV file from output.media_url.

How Billing Is Measured

Billing is measured per second of the converted audio: the amount is the per-second rate times the length of the converted audio in whole seconds, rounded down, and every request counts at least 1 second: a 7.65-second result is billed as 7 seconds and a 0.97-second result as 1 second. The result is as long as your recording, so a longer recording costs more; voice, remove_background_noise and seed do not change the rate. A hold for the recording's length is placed when the request is submitted (300 seconds if the length cannot be read from the file); when the audio is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rate is shown in the pricing panel on this page.

HeyGen Voice 1 API Pricing

Your request will cost $0.126 per minute of audio, billed per second.
the result is as long as your recording (up to 300 seconds); each whole second is billed once
5. HeyGen Voice 1 Turbo

HeyGen Voice 1 Turbo API Documentation

Turn text into speech with HeyGen Voice Turbo, the Turbo tier of HeyGen Voice: send the words to speak in text and, optionally, choose one of 24 voices in voice, or clone a voice from a recording in reference_audio_url. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the audio file from output.media_url.

POST https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Speech - HeyGen Voice Turbo

Request Code

POST https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "text": "Your order has shipped and should arrive within three business days.",
  "voice": "Simon"
}
import requests

url = "https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "text": "Your order has shipped and should arrive within three business days.",
  "voice": "Simon"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "text": "Your order has shipped and should arrive within three business days.",
  "voice": "Simon"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"text": "Your order has shipped and should arrive within three business days.", "voice": "Simon"}'

Output

{
  "request_id": "heygen-voice-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-voice-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"text": "Your order has shipped and should arrive within three business days.", "voice": "Simon"}'

Callback Payload (success)

{
  "request_id": "heygen-voice-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-voice-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "heygen-voice-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-voice-turbo",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
textYesrequiredstring—Non-empty text, up to 5000 characters
The words to speak. Billing counts the characters of this text (see How Billing Is Measured).
voiceNostring"Jonah"
24 values
Jonah, Nadine, Tabitha, Soren, Elowen, Vincent, Jocelyn, Marielle, Corinne, Lucian, Kieran, Hugh, Noelle, Bram, Ewan, Iona, Cecily, Simon, Weston, Felicity, Gareth, Rory, Meredith, Sabrina
The voice that speaks the text, written exactly as listed. Ignored when you send reference_audio_url.
reference_audio_urlNostring—A publicly reachable https URL of a recording, for example an MP3 or WAV file
A recording of a single speaker whose voice speaks the text instead of a listed voice (see Voices, Cloning and Language below). Only the first 3 minutes are used.
languageNostringDetected from the text
39 values
ar, be, bg, ca, cs, da, de, el, en, es, fa, fi, fr, he, hi, hr, hu, id, it, ja, ko, mk, ms, nl, pl, pt, ro, ru, sk, sl, sr, sv, ta, th, tl, tr, uk, vi, zh
The language of the text, as a two-letter code. Left out, it is detected from the text.
expressiveness_boostNonumber10–1
The level of expression in the delivery, from 0 to 1.
enable_safety_checkerNobooleantruetrue
The safety checker is always on: only true is accepted.

Good to know

  • Each request returns one audio file. batch_size, num_images, number_of_images, n and count are rejected — send one request per audio file.
  • The length of the speech follows the text. duration, seconds, num_frames and frames_per_second are rejected.
  • Send every field at the top level of the JSON body; parameters and input are rejected.
  • Choose a listed voice in voice, or clone a voice: send a recording of a single speaker in reference_audio_url. With a recording, voice is ignored, and only the first 3 minutes of the recording are used.
  • Leave language out to have the language detected from the text, or set it to one of the two-letter codes listed.
  • prompt and content are rejected: send the words to speak in text.
  • voice_id is rejected: choose a listed voice by name in voice, or clone one with reference_audio_url.
  • audio_url is rejected: send the recording to clone in reference_audio_url.
  • The result is always a WAV file: output_format is rejected.
  • enable_safety_checker is accepted only as true: the safety checker is always on.
  • HeyGen Voice takes the same fields and is billed the same way, at its own rate: POST https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech.
  • Use the JSON types shown: text, voice, reference_audio_url and language are strings; expressiveness_boost is a number (0.5, not "0.5"); enable_safety_checker is true, not "true".
  • Omit a field instead of sending null.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • stream is not supported: the result is delivered when the job completes.
  • Do not begin text with http://, https:// or data: — such a value is treated as a file to download, and the request is refused at submit with nothing charged.

Voices, Cloning and Language

  • Voices: set voice to one of Jonah, Nadine, Tabitha, Soren, Elowen, Vincent, Jocelyn, Marielle, Corinne, Lucian, Kieran, Hugh, Noelle, Bram, Ewan, Iona, Cecily, Simon, Weston, Felicity, Gareth, Rory, Meredith or Sabrina, written exactly as listed; Jonah applies when you leave it out.
  • Cloning: to speak the text in another voice, send a recording of a single speaker in reference_audio_url, as a publicly reachable https URL. Only the first 3 minutes of the recording are used, and voice is ignored.
  • Language: set language to the two-letter code of the language of the text, for example en, es or ja; left out, it is detected from the text.
  • Expression: expressiveness_boost sets the level of expression in the delivery, from 0 to 1; 1 applies when you leave it out.

Example: Spanish text with a chosen voice

{
  "text": "Hola, gracias por llamar. En un momento le atendemos.",
  "voice": "Elowen",
  "language": "es"
}

Example: clone the voice of a recording

{
  "text": "This sentence is spoken in the voice of the recording.",
  "reference_audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"
}

Example: a lower expressiveness_boost

{
  "text": "Take a slow breath in, and let it go.",
  "voice": "Iona",
  "expressiveness_boost": 0.3
}

Example Request

{
  "text": "Your order has shipped and should arrive within three business days.",
  "voice": "Simon"
}

Example Response

{
  "request_id": "heygen-voice-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-voice-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is too long, out of range or not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. A reference_audio_url that cannot be downloaded is also refused at submit with a 400, and its hold is released at once: nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty text, text not a string, or longer than 5000 characterssynchronous 400
A reference_audio_url that cannot be downloaded when you submit (the hold is released at once: nothing is charged)synchronous 400
enable_safety_checker must be true or left out: the safety checker is always onsynchronous 400
voice not one of the allowed values (written exactly as listed)synchronous 400
language not one of the allowed values (written exactly as listed)synchronous 400
reference_audio_url not a stringsynchronous 400
expressiveness_boost not a number from 0 to 1 — for example 2 or the string "1"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
prompt, content (send the words to speak in text)synchronous 400
voice_id (choose a listed voice by name in voice, or clone one with reference_audio_url)synchronous 400
audio_url (send the recording to clone in reference_audio_url)synchronous 400
output_format (the result is always a WAV file)synchronous 400
batch_size, num_images, number_of_images, n, count (one audio file per request)synchronous 400
duration, seconds, num_frames, frames_per_second (the length of the speech follows the text)synchronous 400
parameters, input (send the fields at the top level of the JSON body)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
stream (the result is delivered when the job completes)synchronous 400
A recording in reference_audio_url the model cannot use, for example a file that is not audiostatus: "ERROR"
A text the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing text (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' is required",
  "violations": [
    "'text' is required"
  ]
}

A voice that is not listed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'voice' must be one of: \"Jonah\", \"Nadine\", \"Tabitha\", \"Soren\", \"Elowen\", \"Vincent\", \"Jocelyn\", \"Marielle\", \"Corinne\", \"Lucian\", \"Kieran\", \"Hugh\", \"Noelle\", \"Bram\", \"Ewan\", \"Iona\", \"Cecily\", \"Simon\", \"Weston\", \"Felicity\", \"Gareth\", \"Rory\", \"Meredith\", \"Sabrina\" (got \"Alice\")",
  "violations": [
    "'voice' must be one of: \"Jonah\", \"Nadine\", \"Tabitha\", \"Soren\", \"Elowen\", \"Vincent\", \"Jocelyn\", \"Marielle\", \"Corinne\", \"Lucian\", \"Kieran\", \"Hugh\", \"Noelle\", \"Bram\", \"Ewan\", \"Iona\", \"Cecily\", \"Simon\", \"Weston\", \"Felicity\", \"Gareth\", \"Rory\", \"Meredith\", \"Sabrina\" (got \"Alice\")"
  ]
}

A language that is not listed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'language' must be one of: \"ar\", \"be\", \"bg\", \"ca\", \"cs\", \"da\", \"de\", \"el\", \"en\", \"es\", \"fa\", \"fi\", \"fr\", \"he\", \"hi\", \"hr\", \"hu\", \"id\", \"it\", \"ja\", \"ko\", \"mk\", \"ms\", \"nl\", \"pl\", \"pt\", \"ro\", \"ru\", \"sk\", \"sl\", \"sr\", \"sv\", \"ta\", \"th\", \"tl\", \"tr\", \"uk\", \"vi\", \"zh\" (got \"english\")",
  "violations": [
    "'language' must be one of: \"ar\", \"be\", \"bg\", \"ca\", \"cs\", \"da\", \"de\", \"el\", \"en\", \"es\", \"fa\", \"fi\", \"fr\", \"he\", \"hi\", \"hr\", \"hu\", \"id\", \"it\", \"ja\", \"ko\", \"mk\", \"ms\", \"nl\", \"pl\", \"pt\", \"ro\", \"ru\", \"sk\", \"sl\", \"sr\", \"sv\", \"ta\", \"th\", \"tl\", \"tr\", \"uk\", \"vi\", \"zh\" (got \"english\")"
  ]
}

expressiveness_boost above 1 (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'expressiveness_boost' must be <= 1 (got 1.5)",
  "violations": [
    "'expressiveness_boost' must be <= 1 (got 1.5)"
  ]
}

A text longer than 5000 characters (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' must be at most 5000 characters (got 5001)",
  "violations": [
    "'text' must be at most 5000 characters (got 5001)"
  ]
}

prompt instead of text (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' is required; 'prompt' must be one of:  (got \"Your order has shipped and should arrive within three business days.\"); 'prompt' is not accepted by this model. Send the text to speak in 'text'.",
  "violations": [
    "'text' is required",
    "'prompt' must be one of:  (got \"Your order has shipped and should arrive within three business days.\")",
    "'prompt' is not accepted by this model. Send the text to speak in 'text'."
  ]
}

The safety checker turned off (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'enable_safety_checker' must be one of: true (got false); 'enable_safety_checker' must be true or left out: the safety checker is always on.",
  "violations": [
    "'enable_safety_checker' must be one of: true (got false)",
    "'enable_safety_checker' must be true or left out: the safety checker is always on."
  ]
}

More than one audio file per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'n' must be one of:  (got 2); 'n' is not supported: each request returns one audio file. Send one request per text.",
  "violations": [
    "'n' must be one of:  (got 2)",
    "'n' is not supported: each request returns one audio file. Send one request per text."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the audio file from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-voice-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "heygen-voice-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-voice-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-voice-turbo for this endpoint.
output.media_urlarray of stringsURL of the audio file (one WAV file per request).
output.media_typestringaudio/wav.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the audio file from output.media_url.

How Billing Is Measured

Billing is measured per 1,000 characters of text: the number of characters is rounded up to the next full 1,000, so a text of 1 to 1,000 characters is billed as 1,000 and a text of 1,001 to 2,000 characters as 2,000. The voice, the reference recording, the language and expressiveness_boost do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rate is shown in the pricing panel on this page.

HeyGen Voice 1 Turbo API Pricing

Your request will cost $0.0042 per 1,000 characters of input text.
each started block of 1,000 characters is billed once
6. HeyGen Voice 1 Turbo Free
Free until 30 November 2026 (UTC)
HeyGen Voice Turbo Free costs nothing until 30 November 2026, 23:59 UTC: no hold is placed and nothing is charged. It runs on HeyGen's shared free capacity, best effort: when that capacity is busy, a request can end with status: "ERROR" (nothing charged; try again in a few minutes). 24 preset voices; voice cloning is on HeyGen Voice Turbo. Limits: 5 requests per minute and 100 requests per day for each API key. From 1 December 2026 this API answers 410: use HeyGen Voice Turbo, POST https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech.

HeyGen Voice 1 Turbo Free API Documentation

Turn text into speech with HeyGen Voice Turbo Free, the free edition of HeyGen Voice Turbo until 30 November 2026 (UTC): send the words to speak in text and, optionally, choose one of 24 voices in voice. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the audio file from output.media_url.

POST https://gateway.pixazo.ai/heygen-voice-1-turbo/v1/text-to-speech

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Speech - HeyGen Voice Turbo Free

Request Code

POST https://gateway.pixazo.ai/heygen-voice-1-turbo/v1/text-to-speech
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "text": "Your order has shipped and should arrive within three business days.",
  "voice": "Simon"
}
import requests

url = "https://gateway.pixazo.ai/heygen-voice-1-turbo/v1/text-to-speech"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "text": "Your order has shipped and should arrive within three business days.",
  "voice": "Simon"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-voice-1-turbo/v1/text-to-speech", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "text": "Your order has shipped and should arrive within three business days.",
  "voice": "Simon"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-voice-1-turbo/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"text": "Your order has shipped and should arrive within three business days.", "voice": "Simon"}'

Output

{
  "request_id": "heygen-voice-1-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-voice-1-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-voice-1-turbo/v1/text-to-speech' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"text": "Your order has shipped and should arrive within three business days.", "voice": "Simon"}'

Callback Payload (success)

{
  "request_id": "heygen-voice-1-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-voice-1-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "heygen-voice-1-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-voice-1-turbo",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
textYesrequiredstring—Non-empty text, up to 5000 characters
The words to speak.
voiceNostring"Jonah"
24 values
Jonah, Nadine, Tabitha, Soren, Elowen, Vincent, Jocelyn, Marielle, Corinne, Lucian, Kieran, Hugh, Noelle, Bram, Ewan, Iona, Cecily, Simon, Weston, Felicity, Gareth, Rory, Meredith, Sabrina
The voice that speaks the text, written exactly as listed.
languageNostringDetected from the text
39 values
ar, be, bg, ca, cs, da, de, el, en, es, fa, fi, fr, he, hi, hr, hu, id, it, ja, ko, mk, ms, nl, pl, pt, ro, ru, sk, sl, sr, sv, ta, th, tl, tr, uk, vi, zh
The language of the text, as a two-letter code. Left out, it is detected from the text.
expressiveness_boostNonumber10–1
The level of expression in the delivery, from 0 to 1.
enable_safety_checkerNobooleantruetrue
The safety checker is always on: only true is accepted.

Good to know

  • Each request returns one audio file. batch_size, num_images, number_of_images, n and count are rejected — send one request per audio file.
  • The length of the speech follows the text. duration, seconds, num_frames and frames_per_second are rejected.
  • Send every field at the top level of the JSON body; parameters and input are rejected.
  • Choose a listed voice in voice. Voice cloning is not available on this API: reference_audio_url is rejected. HeyGen Voice Turbo clones a voice from a recording: POST https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech.
  • Leave language out to have the language detected from the text, or set it to one of the two-letter codes listed.
  • prompt and content are rejected: send the words to speak in text.
  • voice_id is rejected: choose a listed voice by name in voice.
  • audio_url is rejected: this API speaks in the listed voices only.
  • The result is always a WAV file: output_format is rejected.
  • enable_safety_checker is accepted only as true: the safety checker is always on.
  • HeyGen Voice Turbo takes the same fields, adds voice cloning in reference_audio_url and is billed per 1,000 characters: POST https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech.
  • Use the JSON types shown: text, voice and language are strings; expressiveness_boost is a number (0.5, not "0.5"); enable_safety_checker is true, not "true".
  • Omit a field instead of sending null.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • stream is not supported: the result is delivered when the job completes.
  • Do not begin text with http://, https:// or data: — such a value is treated as a file to download, and the request is refused at submit with nothing charged.

Voices and Language

  • Voices: set voice to one of Jonah, Nadine, Tabitha, Soren, Elowen, Vincent, Jocelyn, Marielle, Corinne, Lucian, Kieran, Hugh, Noelle, Bram, Ewan, Iona, Cecily, Simon, Weston, Felicity, Gareth, Rory, Meredith or Sabrina, written exactly as listed; Jonah applies when you leave it out.
  • Cloning: not available on this API. HeyGen Voice Turbo clones a voice from a recording: POST https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech.
  • Language: set language to the two-letter code of the language of the text, for example en, es or ja; left out, it is detected from the text.
  • Expression: expressiveness_boost sets the level of expression in the delivery, from 0 to 1; 1 applies when you leave it out.

Example: Spanish text with a chosen voice

{
  "text": "Hola, gracias por llamar. En un momento le atendemos.",
  "voice": "Elowen",
  "language": "es"
}

Example: a lower expressiveness_boost

{
  "text": "Take a slow breath in, and let it go.",
  "voice": "Iona",
  "expressiveness_boost": 0.3
}

Example Request

{
  "text": "Your order has shipped and should arrive within three business days.",
  "voice": "Simon"
}

Example Response

{
  "request_id": "heygen-voice-1-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-voice-1-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is too long, out of range or not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
403Daily limit reached: 100 requests per day for each API key (the day runs from 00:00 UTC).
410This free API ended on 30 November 2026 (UTC). Use HeyGen Voice Turbo.
429Too many requests: more than 5 requests in a minute with one API key, or the free API's shared per-minute limit is reached. Wait a minute and try again.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, and nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Requests on this API are free: nothing is held or charged, whether they succeed or fail.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
More than 5 requests in a minute with one API key, or the shared per-minute limit of the free APIsynchronous 429
More than 100 requests in a day with one API keysynchronous 403
Any request after 30 November 2026 (UTC)synchronous 410
Missing or empty text, text not a string, or longer than 5000 characterssynchronous 400
enable_safety_checker must be true or left out: the safety checker is always onsynchronous 400
voice not one of the allowed values (written exactly as listed)synchronous 400
language not one of the allowed values (written exactly as listed)synchronous 400
reference_audio_url (voice cloning is on HeyGen Voice Turbo)synchronous 400
expressiveness_boost not a number from 0 to 1 — for example 2 or the string "1"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
prompt, content (send the words to speak in text)synchronous 400
voice_id (choose a listed voice by name in voice)synchronous 400
audio_url (this API speaks in the listed voices only)synchronous 400
output_format (the result is always a WAV file)synchronous 400
batch_size, num_images, number_of_images, n, count (one audio file per request)synchronous 400
duration, seconds, num_frames, frames_per_second (the length of the speech follows the text)synchronous 400
parameters, input (send the fields at the top level of the JSON body)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
stream (the result is delivered when the job completes)synchronous 400
HeyGen's shared free capacity is busy and the request could not run in time (nothing is charged; try again in a few minutes, or use HeyGen Voice Turbo)status: "ERROR"
A text the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing text (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' is required",
  "violations": [
    "'text' is required"
  ]
}

A voice that is not listed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'voice' must be one of: \"Jonah\", \"Nadine\", \"Tabitha\", \"Soren\", \"Elowen\", \"Vincent\", \"Jocelyn\", \"Marielle\", \"Corinne\", \"Lucian\", \"Kieran\", \"Hugh\", \"Noelle\", \"Bram\", \"Ewan\", \"Iona\", \"Cecily\", \"Simon\", \"Weston\", \"Felicity\", \"Gareth\", \"Rory\", \"Meredith\", \"Sabrina\" (got \"Alice\")",
  "violations": [
    "'voice' must be one of: \"Jonah\", \"Nadine\", \"Tabitha\", \"Soren\", \"Elowen\", \"Vincent\", \"Jocelyn\", \"Marielle\", \"Corinne\", \"Lucian\", \"Kieran\", \"Hugh\", \"Noelle\", \"Bram\", \"Ewan\", \"Iona\", \"Cecily\", \"Simon\", \"Weston\", \"Felicity\", \"Gareth\", \"Rory\", \"Meredith\", \"Sabrina\" (got \"Alice\")"
  ]
}

A language that is not listed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'language' must be one of: \"ar\", \"be\", \"bg\", \"ca\", \"cs\", \"da\", \"de\", \"el\", \"en\", \"es\", \"fa\", \"fi\", \"fr\", \"he\", \"hi\", \"hr\", \"hu\", \"id\", \"it\", \"ja\", \"ko\", \"mk\", \"ms\", \"nl\", \"pl\", \"pt\", \"ro\", \"ru\", \"sk\", \"sl\", \"sr\", \"sv\", \"ta\", \"th\", \"tl\", \"tr\", \"uk\", \"vi\", \"zh\" (got \"english\")",
  "violations": [
    "'language' must be one of: \"ar\", \"be\", \"bg\", \"ca\", \"cs\", \"da\", \"de\", \"el\", \"en\", \"es\", \"fa\", \"fi\", \"fr\", \"he\", \"hi\", \"hr\", \"hu\", \"id\", \"it\", \"ja\", \"ko\", \"mk\", \"ms\", \"nl\", \"pl\", \"pt\", \"ro\", \"ru\", \"sk\", \"sl\", \"sr\", \"sv\", \"ta\", \"th\", \"tl\", \"tr\", \"uk\", \"vi\", \"zh\" (got \"english\")"
  ]
}

expressiveness_boost above 1 (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'expressiveness_boost' must be <= 1 (got 1.5)",
  "violations": [
    "'expressiveness_boost' must be <= 1 (got 1.5)"
  ]
}

A text longer than 5000 characters (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' must be at most 5000 characters (got 5001)",
  "violations": [
    "'text' must be at most 5000 characters (got 5001)"
  ]
}

prompt instead of text (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'text' is required; 'prompt' must be one of:  (got \"Your order has shipped and should arrive within three business days.\"); 'prompt' is not accepted by this model. Send the text to speak in 'text'.",
  "violations": [
    "'text' is required",
    "'prompt' must be one of:  (got \"Your order has shipped and should arrive within three business days.\")",
    "'prompt' is not accepted by this model. Send the text to speak in 'text'."
  ]
}

The safety checker turned off (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'enable_safety_checker' must be one of: true (got false); 'enable_safety_checker' must be true or left out: the safety checker is always on.",
  "violations": [
    "'enable_safety_checker' must be one of: true (got false)",
    "'enable_safety_checker' must be true or left out: the safety checker is always on."
  ]
}

More than one audio file per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'n' must be one of:  (got 2); 'n' is not supported: each request returns one audio file. Send one request per text.",
  "violations": [
    "'n' must be one of:  (got 2)",
    "'n' is not supported: each request returns one audio file. Send one request per text."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the audio file from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-voice-1-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "heygen-voice-1-turbo_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-voice-1-turbo",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.wav"
    ],
    "media_type": "audio/wav"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-voice-1-turbo for this endpoint.
output.media_urlarray of stringsURL of the audio file (one WAV file per request).
output.media_typestringaudio/wav.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-voice-1-turbo/v1/text-to-speech.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the audio file from output.media_url.

Free Until 30 November 2026

Every request to this API is free until 30 November 2026, 23:59 UTC: no hold is placed and nothing is charged, whatever the length of text. From 1 December 2026 the API answers 410. HeyGen Voice Turbo is the paid edition, billed per 1,000 characters of text: POST https://gateway.pixazo.ai/heygen-voice-turbo/v1/text-to-speech.

HeyGen Voice 1 Turbo Free API Pricing

Your request is Free
free until 30 November 2026 (UTC)
7. HeyGen Video

HeyGen Video API Documentation

Generate a video from a text prompt with HeyGen Video. You choose the length (duration, 5 to 30 seconds), the resolution (resolution, 480p, 768p, 1080p or 2k) and the frame shape (aspect_ratio). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-video/v1/text-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Text to Video - HeyGen Video

Request Code

POST https://gateway.pixazo.ai/heygen-video/v1/text-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.",
  "duration": 5,
  "resolution": "768p"
}
import requests

url = "https://gateway.pixazo.ai/heygen-video/v1/text-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.",
  "duration": 5,
  "resolution": "768p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-video/v1/text-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.",
  "duration": 5,
  "resolution": "768p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-video/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.", "duration": 5, "resolution": "768p"}'

Output

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-video/v1/text-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.", "duration": 5, "resolution": "768p"}'

Callback Payload (success)

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-video",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—Non-empty text, up to 16000 characters
What happens in the video: the scene, the action, the camera movement and the mood.
durationNointeger55–30
Requested length of the video in whole seconds. Over 15 seconds needs prompt_enhancement turbo or quality. Billing is per requested second; a video over 15 seconds is billed at a higher rate for every second.
resolutionNostring"768p"480p, 768p, 1080p, 2k
Output resolution, written exactly as listed. 1080p and 2k cost more per second than 480p and 768p. At 1080p and 2k, aspect_ratio must be 16:9 or 9:16.
aspect_ratioNostring"16:9"21:9, 16:9, 4:3, 1:1, 3:4, 9:16
Frame shape of the video. At 1080p and 2k only 16:9 and 9:16 are accepted. It does not change the amount billed.
prompt_enhancementNostring"turbo"turbo, quality, ultraquality, disabled
Prompt enhancement level, or disabled to use your prompt exactly as written. With ultraquality or disabled, duration is 5 to 15 seconds. It does not change the amount billed.
seedNointegerRandom0–4294967295
Seed for the random generator; leave it out for a random seed. It does not change the amount billed.
enable_safety_checkerNobooleantruetrue
The safety checker is always on: only true is accepted.

Good to know

  • Each request returns one video. batch_size, num_images, number_of_images, n and count are rejected — send one request per video.
  • Set the length with duration, in whole seconds from 5 to 30 (5 when you leave it out; over 15 only with prompt_enhancement turbo or quality); seconds, num_frames and frames_per_second are rejected.
  • Set the resolution with resolution: 480p, 768p, 1080p or 2k, written exactly as listed (768p when you leave it out).
  • Send every field at the top level of the JSON body, with the text in prompt; parameters and input are rejected.
  • Text-to-video takes no images or references: image_url, reference_image_urls, reference_video_urls, reference_audio_urls, image_urls, image and images are rejected (use Image to Video for an image, and Reference to Video for reference images and audio; reference videos are not supported).
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are whole numbers (5, not "5"), and enable_safety_checker is true, not a string.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • Reference audio goes only in reference_audio_urls (Reference to Video). Reference videos are not supported: reference_video_urls, videos, video_url and audio_url are rejected.
  • Options this API does not offer are rejected: end_image_url, generate_audio, negative_prompt and stream.

Length and Resolution

Set duration to the length you want in whole seconds, from 5 to 30; 5 applies when you leave it out. Over 15 seconds needs prompt_enhancement turbo (the default) or quality; with ultraquality or disabled the length is 5 to 15 seconds. Set resolution to one of the values below; 768p applies when you leave it out. Billing is per second of the requested duration at the rate for the requested resolution, so a longer or higher-resolution video costs more. A video longer than 15 seconds is billed at a higher per-second rate, for every second of the video (not only the seconds after 15).

resolutionNote
480pThe lower cost per second
768pThe default; the lower cost per second
1080pThe higher cost per second
2kThe higher cost per second

Example: an 8-second vertical video at 1080p

{
  "prompt": "A paper boat drifts down a rain-soaked street at dusk, reflections on the water.",
  "aspect_ratio": "9:16",
  "duration": 8,
  "resolution": "1080p"
}

Example: a 16-second video at 480p

{
  "prompt": "A potter at a wheel in a quiet sunlit studio shapes a tall clay vase, then sets down her tools and wipes her hands on a cloth. Locked-off camera, soft window light, the hum of the wheel and birdsong outside. No music.",
  "duration": 16,
  "resolution": "480p",
  "prompt_enhancement": "turbo"
}

Its completed status: a 16-second 832×480 MP4 with sound.

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T14:50:56.313Z",
  "updated_at": "2026-11-18 14:52:44",
  "completed_at": "2026-11-18 14:52:43"
}

Aspect Ratio

Set aspect_ratio to 21:9, 16:9, 4:3, 1:1, 3:4 or 9:16; 16:9 applies when you leave it out. It does not change the amount billed.

Prompt Enhancement

Set prompt_enhancement to turbo, quality, ultraquality or disabled; turbo applies when you leave it out. disabled uses your prompt exactly as written. With ultraquality or disabled, duration is 5 to 15 seconds; longer videos need turbo or quality. It does not change the amount billed.

Example: use the prompt exactly as written, at 480p

{
  "prompt": "Waves roll onto a quiet beach at sunrise.",
  "prompt_enhancement": "disabled",
  "duration": 5,
  "resolution": "480p"
}

Audio

Audio is generated with every video; there is no setting to turn it off. Audio does not change the price.

Example Request

{
  "prompt": "A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air.",
  "duration": 5,
  "resolution": "768p"
}

Example Response

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 16000 characterssynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
resolution 1080p or 2k with an aspect_ratio other than 16:9 or 9:16synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
prompt_enhancement not one of the allowed values (written exactly as listed)synchronous 400
enable_safety_checker not one of the allowed values (written exactly as listed)synchronous 400
duration not a whole number from 5 to 30 — for example 4, 31, "auto" or the string "5"synchronous 400
duration over 15 with prompt_enhancement ultraquality or disabledsynchronous 400
seed not a whole number from 0 to 4294967295 — for example -1, 4294967296 or the string "0"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
batch_size, num_images, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second (set the length with duration, in whole seconds)synchronous 400
parameters, input (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
image_url (images go to the Image to Video operation)synchronous 400
reference_image_urls, reference_video_urls, reference_audio_urls (reference images and audio go to the Reference to Video operation; reference videos are not supported)synchronous 400
image_urls, image, images (text-to-video takes no images)synchronous 400
videos, video_url, audio_url (reference videos are not supported; reference audio goes in reference_audio_urls, on Reference to Video)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
end_image_url, generate_audio, negative_prompt, stream (not offered on this API)synchronous 400
A prompt the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\" (got \"4K\")",
  "violations": [
    "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\" (got \"4K\")"
  ]
}

A value out of range: 31 seconds (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be <= 30 (got 31)",
  "violations": [
    "'duration' must be <= 30 (got 31)"
  ]
}

Over 15 seconds with prompt_enhancement disabled (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' over 15 seconds needs 'prompt_enhancement' turbo or quality: with disabled, HeyGen Video makes 5-15 second clips.",
  "violations": [
    "'duration' over 15 seconds needs 'prompt_enhancement' turbo or quality: with disabled, HeyGen Video makes 5-15 second clips."
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

More than one video per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: HeyGen Video returns one video per request. Send one request per video.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: HeyGen Video returns one video per request. Send one request per video."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-video for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-video/v1/text-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the requested duration, at the rate for the requested resolution: the amount is the per-second rate for resolution (768p when you leave it out) times duration (5 seconds when you leave it out). A video longer than 15 seconds is billed at a higher per-second rate, which applies to every second of the video. 1080p and 2k cost more per second than 480p and 768p. The prompt, seed, aspect ratio, prompt enhancement and references do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rates, for videos of up to 15 seconds and for longer ones, are shown in the pricing panel on this page.

HeyGen Video API Pricing

Billed per second of video at the requested resolution (480p, 768p, 1080p or 2k); a video over 15 seconds is billed at the higher long-video rate for every second. 768p and 5 seconds are the defaults; duration can be 5 to 30 seconds (over 15 only with prompt_enhancement turbo or quality).

ResolutionPrice (USD)
480p text or image to video / per second$0.02
768p text or image to video / per second$0.02
1080p text or image to video / per second$0.06
2k text or image to video / per second$0.06
480p text or image to video, over 15 s / per second$0.0945
768p text or image to video, over 15 s / per second$0.1575
1080p text or image to video, over 15 s / per second$0.2205
2k text or image to video, over 15 s / per second$0.2205
480p reference to video / per second$0.04
768p reference to video / per second$0.055
1080p reference to video / per second$0.10
2k reference to video / per second$0.10
480p reference to video, over 15 s / per second$0.147
768p reference to video, over 15 s / per second$0.21
1080p reference to video, over 15 s / per second$0.378
2k reference to video, over 15 s / per second$0.378
Image to Video

HeyGen Video API Documentation

Animate an image with HeyGen Video: send the first frame in image_url with a prompt describing how the video unfolds. You choose the length (duration, 5 to 30 seconds) and the resolution (resolution, 480p, 768p, 1080p or 2k). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-video/v1/image-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Image to Video - HeyGen Video

Request Code

POST https://gateway.pixazo.ai/heygen-video/v1/image-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "768p"
}
import requests

url = "https://gateway.pixazo.ai/heygen-video/v1/image-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "768p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-video/v1/image-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "768p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-video/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 5, "resolution": "768p"}'

Output

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-video/v1/image-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.", "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg", "duration": 5, "resolution": "768p"}'

Callback Payload (success)

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-video",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
image_urlYesrequiredstring—One image: a publicly reachable https URL (recommended) or a data URI
The first frame of the video. Use a PNG, JPEG or WebP file.
promptYesrequiredstring—Non-empty text, up to 16000 characters
How the video unfolds from the image: the motion, the camera movement and the mood.
durationNointeger55–30
Requested length of the video in whole seconds. Over 15 seconds needs prompt_enhancement turbo or quality. Billing is per requested second; a video over 15 seconds is billed at a higher rate for every second.
resolutionNostring"768p"480p, 768p, 1080p, 2k
Output resolution, written exactly as listed. 1080p and 2k cost more per second than 480p and 768p.
prompt_enhancementNostring"turbo"turbo, quality, ultraquality, disabled
Prompt enhancement level, or disabled to use your prompt exactly as written. With ultraquality or disabled, duration is 5 to 15 seconds. It does not change the amount billed.
seedNointegerRandom0–4294967295
Seed for the random generator; leave it out for a random seed. It does not change the amount billed.
enable_safety_checkerNobooleantruetrue
The safety checker is always on: only true is accepted.

Good to know

  • Each request returns one video. batch_size, num_images, number_of_images, n and count are rejected — send one request per video.
  • Set the length with duration, in whole seconds from 5 to 30 (5 when you leave it out; over 15 only with prompt_enhancement turbo or quality); seconds, num_frames and frames_per_second are rejected.
  • Set the resolution with resolution: 480p, 768p, 1080p or 2k, written exactly as listed (768p when you leave it out).
  • Send every field at the top level of the JSON body, with the text in prompt; parameters and input are rejected.
  • Send the first frame as image_url; image-to-video takes no frame shape, and reference_image_urls, reference_video_urls, reference_audio_urls, aspect_ratio, image_urls, image and images are rejected.
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are whole numbers (5, not "5"), and enable_safety_checker is true, not a string.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • Reference audio goes only in reference_audio_urls (Reference to Video). Reference videos are not supported: reference_video_urls, videos, video_url and audio_url are rejected.
  • Options this API does not offer are rejected: end_image_url, generate_audio, negative_prompt and stream.

Length and Resolution

Set duration to the length you want in whole seconds, from 5 to 30; 5 applies when you leave it out. Over 15 seconds needs prompt_enhancement turbo (the default) or quality; with ultraquality or disabled the length is 5 to 15 seconds. Set resolution to one of the values below; 768p applies when you leave it out. Billing is per second of the requested duration at the rate for the requested resolution, so a longer or higher-resolution video costs more. A video longer than 15 seconds is billed at a higher per-second rate, for every second of the video (not only the seconds after 15).

resolutionNote
480pThe lower cost per second
768pThe default; the lower cost per second
1080pThe higher cost per second
2kThe higher cost per second

Example: a 10-second video at 1080p

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "Slow orbit around the subject, soft morning light.",
  "duration": 10,
  "resolution": "1080p"
}

Example: a 20-second video with quality enhancement

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The scene comes slowly to life: a gentle push-in, soft natural sound, no music.",
  "duration": 20,
  "resolution": "768p",
  "prompt_enhancement": "quality"
}

Source Image

  • Send the first frame in image_url: a publicly reachable https URL (recommended) or a data URI such as data:image/png;base64,.... A list of images is rejected.
  • Use PNG, JPEG or WebP files. Each image is downloaded when you submit: a URL that cannot be downloaded, or a very large file, may be refused at once with a 400, with nothing charged.
  • Image-to-video takes no aspect_ratio: your image is the first frame. The video keeps the aspect ratio of your image.
  • Describe how the video unfolds in prompt (required).

Example: a fixed seed at 480p

{
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "prompt": "The subject waves at the camera.",
  "seed": 42,
  "duration": 5,
  "resolution": "480p"
}

Audio

Audio is generated with every video; there is no setting to turn it off. Audio does not change the price. Image-to-video output includes generated sound.

Example Request

{
  "prompt": "The subject turns slowly toward the camera and smiles, gentle push-in.",
  "image_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
  "duration": 5,
  "resolution": "768p"
}

Example Response

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or the image could not be downloaded. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. An image that cannot be downloaded is also refused at submit with a 400, and its hold is released at once: nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 16000 characterssynchronous 400
Missing or empty image_url, or image_url sent as anything other than a single stringsynchronous 400
An image_url that cannot be downloaded when you submit, or that returns a web page or an empty file instead of an image (the hold is released at once: nothing is charged)synchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
prompt_enhancement not one of the allowed values (written exactly as listed)synchronous 400
enable_safety_checker not one of the allowed values (written exactly as listed)synchronous 400
duration not a whole number from 5 to 30 — for example 4, 31, "auto" or the string "5"synchronous 400
duration over 15 with prompt_enhancement ultraquality or disabledsynchronous 400
seed not a whole number from 0 to 4294967295 — for example -1, 4294967296 or the string "0"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
batch_size, num_images, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second (set the length with duration, in whole seconds)synchronous 400
parameters, input (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
reference_image_urls, reference_video_urls, reference_audio_urls (reference images and audio go to the Reference to Video operation; reference videos are not supported)synchronous 400
aspect_ratio (image-to-video takes no frame shape)synchronous 400
image_urls, image, images (send the first frame as image_url)synchronous 400
videos, video_url, audio_url (reference videos are not supported; reference audio goes in reference_audio_urls, on Reference to Video)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
end_image_url, generate_audio, negative_prompt, stream (not offered on this API)synchronous 400
An image the model cannot use, for example a file that is not an imagestatus: "ERROR"
A prompt or image the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing image_url (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'image_url' is required",
  "violations": [
    "'image_url' is required"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\" (got \"1440p\")",
  "violations": [
    "'resolution' must be one of: \"480p\", \"768p\", \"1080p\", \"2k\" (got \"1440p\")"
  ]
}

A value out of range (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be >= 5 (got 4)",
  "violations": [
    "'duration' must be >= 5 (got 4)"
  ]
}

A number sent as a string (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'duration' must be integer (got string)",
  "violations": [
    "'duration' must be integer (got string)"
  ]
}

A field this API does not accept (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'video_url' must be one of:  (got \"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\"); 'video_url' is not accepted: reference videos are not supported.",
  "violations": [
    "'video_url' must be one of:  (got \"https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg\")",
    "'video_url' is not accepted: reference videos are not supported."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-video for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-video/v1/image-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the requested duration, at the rate for the requested resolution: the amount is the per-second rate for resolution (768p when you leave it out) times duration (5 seconds when you leave it out). A video longer than 15 seconds is billed at a higher per-second rate, which applies to every second of the video. 1080p and 2k cost more per second than 480p and 768p. The prompt, seed, aspect ratio, prompt enhancement and references do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rates, for videos of up to 15 seconds and for longer ones, are shown in the pricing panel on this page.

HeyGen Video API Pricing

Billed per second of video at the requested resolution (480p, 768p, 1080p or 2k); the start image does not change the price; a video over 15 seconds is billed at the higher long-video rate for every second. 768p and 5 seconds are the defaults; duration can be 5 to 30 seconds (over 15 only with prompt_enhancement turbo or quality).

ResolutionPrice (USD)
480p text or image to video / per second$0.02
768p text or image to video / per second$0.02
1080p text or image to video / per second$0.06
2k text or image to video / per second$0.06
480p text or image to video, over 15 s / per second$0.0945
768p text or image to video, over 15 s / per second$0.1575
1080p text or image to video, over 15 s / per second$0.2205
2k text or image to video, over 15 s / per second$0.2205
480p reference to video / per second$0.04
768p reference to video / per second$0.055
1080p reference to video / per second$0.10
2k reference to video / per second$0.10
480p reference to video, over 15 s / per second$0.147
768p reference to video, over 15 s / per second$0.21
1080p reference to video, over 15 s / per second$0.378
2k reference to video, over 15 s / per second$0.378
Reference to Video

HeyGen Video API Documentation

Generate a new scene with HeyGen Video from reference images and audio: send 1 or 2 images in reference_image_urls and up to 3 audio clips in reference_audio_urls, and describe the scene in prompt. You choose the length (5 to 30 seconds), the resolution (480p, 768p, 1080p or 2k) and the frame shape (aspect_ratio). Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-video/v1/reference-to-video

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Reference to Video - HeyGen Video

Request Code

POST https://gateway.pixazo.ai/heygen-video/v1/reference-to-video
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "prompt": "The person from the reference image walks through a busy street market at dusk.",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 5,
  "resolution": "768p"
}
import requests

url = "https://gateway.pixazo.ai/heygen-video/v1/reference-to-video"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "prompt": "The person from the reference image walks through a busy street market at dusk.",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 5,
  "resolution": "768p"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-video/v1/reference-to-video", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "prompt": "The person from the reference image walks through a busy street market at dusk.",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 5,
  "resolution": "768p"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-video/v1/reference-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"prompt": "The person from the reference image walks through a busy street market at dusk.", "reference_image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "duration": 5, "resolution": "768p"}'

Output

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-video/v1/reference-to-video' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"prompt": "The person from the reference image walks through a busy street market at dusk.", "reference_image_urls": ["https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"], "duration": 5, "resolution": "768p"}'

Callback Payload (success)

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Failure callback shape

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-video",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—Non-empty text, up to 16000 characters
The new scene, and what in it comes from your references.
reference_image_urlsYesrequiredarray—1–2 images
Images of the people, products or places for the scene: publicly reachable https URLs (recommended) or data URIs, as PNG, JPEG or WebP files.
reference_audio_urlsNoarray—1–3 audio clips
Audio clips for the scene, for example a voice: publicly reachable https URLs (recommended) or data URIs, for example MP3 or WAV files.
durationNointeger55–30
Requested length of the video in whole seconds. Over 15 seconds needs prompt_enhancement turbo or quality. Billing is per requested second; a video over 15 seconds is billed at a higher rate for every second.
resolutionNostring"768p"480p, 768p, 1080p, 2k
Output resolution, written exactly as listed. 768p costs more per second than 480p, and 1080p and 2k cost more than 768p. At 1080p and 2k, aspect_ratio must be 16:9 or 9:16; the default adaptive is not available there.
aspect_ratioNostring"adaptive"adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16
Frame shape of the video. At 1080p and 2k only 16:9 and 9:16 are accepted, so send one of them there (the default adaptive is refused). It does not change the amount billed.
prompt_enhancementNostring"turbo"turbo, quality, ultraquality, disabled
Prompt enhancement level, or disabled to use your prompt exactly as written. With ultraquality or disabled, duration is 5 to 15 seconds. It does not change the amount billed.
seedNointegerRandom0–4294967295
Seed for the random generator; leave it out for a random seed. It does not change the amount billed.
enable_safety_checkerNobooleantruetrue
The safety checker is always on: only true is accepted.

Good to know

  • Each request returns one video. batch_size, num_images, number_of_images, n and count are rejected — send one request per video.
  • Set the length with duration, in whole seconds from 5 to 30 (5 when you leave it out; over 15 only with prompt_enhancement turbo or quality); seconds, num_frames and frames_per_second are rejected.
  • Set the resolution with resolution: 480p, 768p, 1080p or 2k, written exactly as listed (768p when you leave it out).
  • Send every field at the top level of the JSON body, with the text in prompt; parameters and input are rejected.
  • Send 1 or 2 images in reference_image_urls and up to 3 audio clips in reference_audio_urls; reference_video_urls, image_url, image_urls, image and images are rejected.
  • Omit a field instead of sending null.
  • Use the JSON types shown: duration and seed are whole numbers (5, not "5"), and enable_safety_checker is true, not a string.
  • Results are always returned as a URL in output.media_url; sync_mode is accepted only as false.
  • Webhooks are set with the X-Webhook-URL / X-Webhook-Mode headers; webhook_url, webhook_mode and callback_url in the JSON body are rejected.
  • Reference audio goes only in reference_audio_urls (Reference to Video). Reference videos are not supported: reference_video_urls, videos, video_url and audio_url are rejected.
  • Options this API does not offer are rejected: end_image_url, generate_audio, negative_prompt and stream.

Length and Resolution

Set duration to the length you want in whole seconds, from 5 to 30; 5 applies when you leave it out. Over 15 seconds needs prompt_enhancement turbo (the default) or quality; with ultraquality or disabled the length is 5 to 15 seconds. Set resolution to one of the values below; 768p applies when you leave it out. Billing is per second of the requested duration at the rate for the requested resolution, so a longer or higher-resolution video costs more. A video longer than 15 seconds is billed at a higher per-second rate, for every second of the video (not only the seconds after 15).

resolutionNote
480pThe lower cost per second
768pThe default; the lower cost per second
1080pThe higher cost per second
2kThe higher cost per second

Example: a 10-second scene at 1080p

{
  "prompt": "The person from the reference image walks along a beach at sunset.",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 10,
  "resolution": "1080p",
  "aspect_ratio": "16:9"
}

Example: a 20-second scene with quality enhancement

{
  "prompt": "The person from the reference image walks along a beach at sunset, then stops and looks at the sea.",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 20,
  "resolution": "768p",
  "prompt_enhancement": "quality"
}

References

  • Send 1 or 2 images in reference_image_urls (required) and, if you like, up to 3 audio clips in reference_audio_urls. Reference videos are not supported: a request with reference_video_urls is refused with a 400, and nothing is charged.
  • Use publicly reachable https URLs (recommended) or data URIs. Very many or very large inputs may be refused at once with a 400, with nothing charged; so may a URL that cannot be downloaded.
  • Describe the new scene in prompt, and say what in it comes from your references.
  • A reference the model cannot use ends the request with status: "ERROR", and its hold is released.

Example: two reference images in a square frame

{
  "prompt": "The two people from the reference images share a meal at a street cafe.",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg",
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "aspect_ratio": "1:1",
  "duration": 6,
  "resolution": "768p"
}

Aspect Ratio

Set aspect_ratio to adaptive, 21:9, 16:9, 4:3, 1:1, 3:4 or 9:16; adaptive applies when you leave it out. It does not change the amount billed.

Audio

Audio is generated with every video; there is no setting to turn it off. Audio does not change the price.

Example Request

{
  "prompt": "The person from the reference image walks through a busy street market at dusk.",
  "reference_image_urls": [
    "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/images/input.jpg"
  ],
  "duration": 5,
  "resolution": "768p"
}

Example Response

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type, is out of range or is not one of the allowed values, a field this operation does not accept was sent, or an input could not be downloaded. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. An input that cannot be downloaded is also refused at submit with a 400, and so may be very many or very large inputs; the hold is then released at once: nothing is charged. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error saying what went wrong. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty prompt, prompt not a string, or longer than 16000 characterssynchronous 400
A reference URL that cannot be downloaded when you submit, or very many or very large inputs (the hold is released at once: nothing is charged)synchronous 400
reference_image_urls missing, not a list or empty, or more than 2 itemssynchronous 400
reference_video_urls sent (reference videos are not supported)synchronous 400
reference_audio_urls not a list or empty, or more than 3 itemssynchronous 400
resolution not one of the allowed values (written exactly as listed)synchronous 400
resolution 1080p or 2k without an aspect_ratio of 16:9 or 9:16 (leaving it out means adaptive)synchronous 400
aspect_ratio not one of the allowed values (written exactly as listed)synchronous 400
prompt_enhancement not one of the allowed values (written exactly as listed)synchronous 400
enable_safety_checker not one of the allowed values (written exactly as listed)synchronous 400
duration not a whole number from 5 to 30 — for example 4, 31, "auto" or the string "5"synchronous 400
duration over 15 with prompt_enhancement ultraquality or disabledsynchronous 400
seed not a whole number from 0 to 4294967295 — for example -1, 4294967296 or the string "0"synchronous 400
sync_mode set to anything other than false (results are always returned as a URL in output.media_url)synchronous 400
batch_size, num_images, number_of_images, n, count (one video per request)synchronous 400
seconds, num_frames, frames_per_second (set the length with duration, in whole seconds)synchronous 400
parameters, input (send the fields at the top level of the JSON body, the text in prompt)synchronous 400
image_url, image_urls, image, images (send images in reference_image_urls)synchronous 400
videos, video_url, audio_url (reference videos are not supported; reference audio goes in reference_audio_urls, on Reference to Video)synchronous 400
webhook_url, webhook_mode, callback_url in the JSON body (use the X-Webhook-URL / X-Webhook-Mode headers)synchronous 400
end_image_url, generate_audio, negative_prompt, stream (not offered on this API)synchronous 400
A reference the model cannot use, for example a file of the wrong typestatus: "ERROR"
A prompt or reference the model refuses, for example under its content policystatus: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing prompt (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'prompt' is required",
  "violations": [
    "'prompt' is required"
  ]
}

More than 2 reference images (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'reference_image_urls' must have at most 2 items (got 3)",
  "violations": [
    "'reference_image_urls' must have at most 2 items (got 3)"
  ]
}

A value that is not allowed (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'aspect_ratio' must be one of: \"adaptive\", \"21:9\", \"16:9\", \"4:3\", \"1:1\", \"3:4\", \"9:16\" (got \"32:9\")",
  "violations": [
    "'aspect_ratio' must be one of: \"adaptive\", \"21:9\", \"16:9\", \"4:3\", \"1:1\", \"3:4\", \"9:16\" (got \"32:9\")"
  ]
}

A length field other than duration (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'seconds' must be one of:  (got 8); 'seconds' is not supported. Set the length with 'duration' (whole seconds, 5-30).",
  "violations": [
    "'seconds' must be one of:  (got 8)",
    "'seconds' is not supported. Set the length with 'duration' (whole seconds, 5-30)."
  ]
}

More than one video per request (synchronous 400)

{
  "error": "Invalid request parameters",
  "message": "'num_images' must be one of:  (got 2); 'num_images' is not supported: HeyGen Video returns one video per request. Send one request per video.",
  "violations": [
    "'num_images' must be one of:  (got 2)",
    "'num_images' is not supported: HeyGen Video returns one video per request. Send one request per video."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

{
  "request_id": "heygen-video_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-video",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/{request_id}/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-10-09T10:04:54.387Z",
  "completed_at": "2026-10-09 10:06:21"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-video for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request).
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-video/v1/reference-to-video.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the requested duration, at the rate for the requested resolution: the amount is the per-second rate for resolution (768p when you leave it out) times duration (5 seconds when you leave it out). A video longer than 15 seconds is billed at a higher per-second rate, which applies to every second of the video. 768p costs more per second than 480p, and 1080p and 2k cost more than 768p; Reference to Video costs more per second than Text to Video and Image to Video. The prompt, seed, aspect ratio, prompt enhancement and references do not change the amount. The amount is placed as a hold when the request is submitted and released in full if the request fails. The current rates, for videos of up to 15 seconds and for longer ones, are shown in the pricing panel on this page.

HeyGen Video API Pricing

Billed per second of video at the requested resolution (480p, 768p, 1080p or 2k); reference images and audio do not change the price; a video over 15 seconds is billed at the higher long-video rate for every second. 768p and 5 seconds are the defaults; duration can be 5 to 30 seconds (over 15 only with prompt_enhancement turbo or quality).

ResolutionPrice (USD)
480p text or image to video / per second$0.02
768p text or image to video / per second$0.02
1080p text or image to video / per second$0.06
2k text or image to video / per second$0.06
480p text or image to video, over 15 s / per second$0.0945
768p text or image to video, over 15 s / per second$0.1575
1080p text or image to video, over 15 s / per second$0.2205
2k text or image to video, over 15 s / per second$0.2205
480p reference to video / per second$0.04
768p reference to video / per second$0.055
1080p reference to video / per second$0.10
2k reference to video / per second$0.10
480p reference to video, over 15 s / per second$0.147
768p reference to video, over 15 s / per second$0.21
1080p reference to video, over 15 s / per second$0.378
2k reference to video, over 15 s / per second$0.378
8. Heygen Video Agent 3.0

Heygen Video Agent 3.0 API Documentation

https://gateway.pixazo.ai/heygen-video-agent/v1/heygen-video-agent-request

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

HeyGen Video Agent generate request

Request Code

POST https://gateway.pixazo.ai/heygen-video-agent/v1/heygen-video-agent-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "A friendly presenter explaining a new mobile app in 30 seconds, with a cheerful tone and modern background.",
  "orientation": "landscape"
}
import requests

url = "https://gateway.pixazo.ai/heygen-video-agent/v1/heygen-video-agent-request"
headers = {
    "Content-Type": "application/json",
    "Cache-Control": "no-cache",
    "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
data = {
    "prompt": "A friendly presenter explaining a new mobile app in 30 seconds, with a cheerful tone and modern background.",
    "orientation": "landscape"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const url = "https://gateway.pixazo.ai/heygen-video-agent/v1/heygen-video-agent-request";
const headers = {
  "Content-Type": "application/json",
  "Cache-Control": "no-cache",
  "Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
};
const data = {
  "prompt": "A friendly presenter explaining a new mobile app in 30 seconds, with a cheerful tone and modern background.",
  "orientation": "landscape"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data));
curl -X POST "https://gateway.pixazo.ai/heygen-video-agent/v1/heygen-video-agent-request" \
  -H "Content-Type: application/json" \
  -H "Cache-Control: no-cache" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
  --data-raw '{
    "prompt": "A friendly presenter explaining a new mobile app in 30 seconds, with a cheerful tone and modern background.",
    "orientation": "landscape"
  }'

Output

{
  "request_id": "heygen-video-agent_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-video-agent_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Add the X-Webhook-URL header to your submit request to receive a POST callback when the job completes — no polling required.

Using curl? These are HTTP request headers — pass each with -H, e.g. -H "X-Webhook-URL: https://your-server.com/webhook/callback". Do not paste them as bare lines, and end every line of a multi-line command with \.

Webhook Headers

HeaderRequiredDefaultDescription
X-Webhook-URLYes (to enable)—HTTPS endpoint on your server that will receive the POST callback. Must respond 2xx within a few seconds (process async if needed).
X-Webhook-ModeNoterminalterminal — fires once at the final status (COMPLETED/FAILED/ERROR). sync — fires on every poll cycle plus the terminal event, and caps the queue’s polling delay at 15s for tighter progress updates.

Example: enable webhook

X-Webhook-URL: https://your-server.com/webhook/callback
X-Webhook-Mode: terminal

Callback Payload

Your endpoint receives a POST application/json with the same shape as the GET /v2/requests/status/{request_id} response. Example terminal callback (mode terminal):

{
  "request_id": "heygen-video-agent_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-video-agent",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-video-agent_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-05-22T13:17:32.110Z",
  "updated_at": "2026-05-22 13:19:23",
  "completed_at": "2026-05-22 13:19:23"
}

Failure callback shape

{
  "request_id": "heygen-video-agent_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-video-agent",
  "error": "Description of the error",
  "output": null,
  "created_at": "...",
  "updated_at": "...",
  "completed_at": "..."
}

Delivery semantics

  • terminal mode (default) — exactly one POST when the request reaches a terminal status. No callback during PROCESSING.
  • sync mode — POST on every status poll (with delay capped at ~15s) plus a final POST at terminal status. Use when you want progress updates.
  • Idempotency — use request_id as your idempotency key. Network retries can deliver the same callback more than once; your handler must tolerate duplicates.
  • Response — respond 200 OK within a few seconds. The queue does not block on slow handlers, but persistent failures may stop further deliveries.
  • HTTPS required — plain http:// URLs are rejected.

Request Parameters - HeyGen Video Agent generate request

ParameterRequiredTypeDefaultAllowed values / range
promptYesrequiredstring—1–10,000 characters
Natural-language prompt describing the video to generate. The agent handles avatar selection, scriptwriting, scene composition, and production automatically. e.g. "Create a 30-second product demo video showcasing our new AI features with professional lighting and modern graphics."
avatarNostring"auto""auto" or a HeyGen avatar name (e.g. "Adriana SuitSofa Front") — 1,286 named avatars
Avatar that presents the video. Leave as auto to let the agent pick the avatar that best matches your prompt.
voiceNostring"auto""auto" or a HeyGen voice name (e.g. "Warm Pro Narrator") — 102 named voices
Voice used for the narration. Leave as auto to let the agent pick a voice that suits your prompt.
style_idNostring——
Style template ID applying a curated visual look, taken from HeyGen’s v3 video-agent styles library. Omit for the agent’s default styling.
orientationNostring— (auto-detected)"landscape", "portrait"
Output video orientation. Auto-detected from the prompt when omitted.
file_urlsNoarray of string—up to 20 URLs
Publicly accessible URLs of supporting assets for the agent to use in the video (images, videos, audio, PDFs).
incognito_modeNobooleanfalsetrue, false
When true, disables the agent’s memory functions (nothing from this request is remembered or reused).

Example Request

POST https://gateway.pixazo.ai/heygen-video-agent/v1/heygen-video-agent-request
Content-Type: application/json
Cache-Control: no-cache
Ocp-Apim-Subscription-Key: YOUR_API_KEY

{
  "prompt": "A friendly presenter explaining a new mobile app in 30 seconds, with a cheerful tone and modern background.",
  "orientation": "landscape"
}

Response

{
  "request_id": "heygen-video-agent_019xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-video-agent_019xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

Header Value
Content-Typeapplication/json
Cache-Controlno-cache
Ocp-Apim-Subscription-KeyYOUR_SUBSCRIPTION_KEY

Heygen Video Agent 3.0 API Pricing

Your request will cost $0.034 per second of output video.
30-second video ≈ $1.02
9. HeyGen v3 Lipsync Precision

HeyGen v3 Lipsync Precision API Documentation

Re-sync the lips in a talking-head video to new speech with HeyGen v3 Lipsync Precision: send the video in video_url and the new speech in audio_url. The speaker's mouth is redrawn to match the new speech, and the new speech becomes the video's sound track. Precision is the higher-accuracy mode: it follows faces that move, turn or are partly covered more closely, and takes longer than Speed. HeyGen v3 Lipsync Speed (https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync) takes the same fields, returns sooner and costs less; use it for drafts and faces that stay still. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video + Audio to Video - HeyGen v3 Lipsync Precision

Request Code

POST https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"
}
import requests

url = "https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"}'

Output

{
  "request_id": "heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"}'

Callback Payload (success)

{
  "request_id": "heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-v3-lipsync-precision",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T13:53:41.205Z",
  "updated_at": "2026-11-18 13:56:34",
  "completed_at": "2026-11-18 13:56:33"
}

Failure callback shape

{
  "request_id": "heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-v3-lipsync-precision",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
video_urlYesrequiredstring—One publicly reachable http(s) URL of a video file (MP4 or MOV)
The talking-head video whose lip movement is redone. It must show the speaker's face, and its own sound track must contain speech. At most 300 seconds long.
audio_urlYesrequiredstring—One publicly reachable http(s) URL of an audio file (MP3 or WAV)
The new speech. Keep it close to the video's length (see Video, Audio and Length). At most 300 seconds long.
enable_dynamic_durationNobooleantruetrue, false
true lets the length of the output follow the new speech; false keeps the length of your video.
disable_music_trackNobooleanfalsetrue, false
true removes the background music of your video.
enable_speech_enhancementNobooleanfalsetrue, false
true cleans up the new speech before it is used.
start_timeNonumber—0 to 300 (seconds)
Re-sync only from this point of the video. Use with end_time to re-sync part of the video.
end_timeNonumber—Greater than start_time, up to 300 (seconds)
Re-sync only up to this point of the video. Use with start_time.
enable_captionNobooleanfalsetrue, false
Accepted so existing requests keep working; it has no effect, and no caption file is returned.
titleNostring—Up to 1000 characters
Accepted so existing requests keep working; it is not used.

Good to know

  • Each request returns one video: your video with the lips re-synced to audio_url. Send one request per video.
  • The mode is set by the endpoint: this endpoint always runs Precision. To switch, send the same body to https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync.
  • The speech always comes from your audio: there is no script or voice setting on this API.
  • Use the JSON types shown: true / false without quotes for the switches, numbers for the times. Omit a field instead of sending null.
  • Send only the fields listed above. Any other field is refused before a video is made, and nothing is charged.
  • Use only videos and voices you have the right to use: your own, or those of a person who has agreed.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged. Omit a field instead of sending null.

ParameterWhy
asset_id, video_asset_id, audio_asset_id, base64, video_base64, audio_base64Not accepted: send public http(s) URLs in 'video_url' and 'audio_url'; asset ids and base64 fields are not accepted.
audioNot accepted. Send the new speech as 'audio_url', a public http(s) URL of the audio file.
audio_urlsNot accepted: send one speech file. Send the new speech as 'audio_url', a public http(s) URL of the audio file.
batch_size, num_images, number_of_images, n, count, num_outputs, num_videosNot supported: each request returns one video. Send one request per video.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
contentNot accepted. Send the video in 'video_url' and the speech in 'audio_url'.
duration, seconds, length, video_length, num_frames, frames_per_second, fps, music_length_msNot accepted: the output follows the source video and the new audio (up to 300 seconds). To lip-sync part of the video, set 'start_time' and 'end_time'.
image, image_url, image_urls, imagesNot accepted: this API re-syncs the lips in a video. To animate a photo, use HeyGen Avatar 6 (POST https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video).
keep_the_same_format, fps_mode, folder_id, enable_watermarkNot supported on this API.
mode, model, engine, typeNot accepted: this endpoint always runs HeyGen Lipsync Precision. For Lipsync Speed use POST https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync.
parameters, inputNot accepted: send the fields at the top level of the JSON body.
prompt, text, script, voice, voice_idNot accepted: the words come from the speech in 'audio_url'. To turn text into speech first, use HeyGen Voice (POST https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech).
resolution, width, height, size, aspect_ratio, output_width, output_heightNot supported: the output keeps the source video's size and shape.
videoNot accepted. Send the talking-head video as 'video_url', a public http(s) URL of the video file.
videos, video_urlsNot accepted: one request re-syncs one video. Send the talking-head video as 'video_url', a public http(s) URL of the video file.

Video, Audio and Length

  • Send each file as one direct, publicly reachable link: the video in video_url, the new speech in audio_url.
  • The video must show the speaker's face, and its own sound track must contain speech: a video with no speech, or with a missing or damaged sound track, ends with status: "ERROR", and nothing is charged.
  • Keep the new speech close to the length of the video. When the two lengths are too different, the request ends with status: "ERROR", and nothing is charged.
  • A video or a recording longer than 300 seconds is refused when you submit, and nothing is charged.
  • With enable_dynamic_duration on (the default), the output follows the length of the new speech; turn it off to keep the length of your video.
  • start_time and end_time re-sync only that part of the video.
  • Use a clean recording of one person speaking: music or several voices make the lip movement less accurate.

Output

One MP4 file per request: your video with the lips re-synced and the new speech as its sound track. At launch, a 17.72-second 1920×1080 video and a 17.03-second recording came back as a 17.00-second MP4 at 1920×1080 and 25 frames per second, with the new speech as its sound track.

Example: re-sync part of a video, without its background music

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3",
  "disable_music_track": true,
  "start_time": 2,
  "end_time": 12
}

Timing

At launch, the 17-second video took about 3 minutes from submit to result. Longer videos take longer, and Precision takes longer than Speed. Poll the status endpoint every 10 seconds or so, or use a Webhook.

Example Request

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"
}

Example Response

{
  "request_id": "heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type or is out of range, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty video_url or audio_url, or either sent as anything other than a single stringsynchronous 400
A switch sent as anything other than true or false, or a time that is not a number in rangesynchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A video or recording longer than 300 seconds (nothing is charged)synchronous 400
A video with no speech in it, or with a missing or damaged sound track (nothing is charged)status: "ERROR"
New speech whose length is too different from the video's (nothing is charged)status: "ERROR"
A file that cannot be downloaded or read (nothing is charged)status: "ERROR"
A video or recording the model refuses under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing video_url (synchronous 400)

Sent {"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"}:

{
  "error": "Invalid request parameters",
  "message": "'video_url' is required",
  "violations": [
    "'video_url' is required"
  ]
}

Missing audio_url (synchronous 400)

Sent {"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required",
  "violations": [
    "'audio_url' is required"
  ]
}

A field this API does not accept (synchronous 400)

Sent {"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4", "duration": 5, "mode": "precision", "resolution": "1080p"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required; 'duration' must be one of:  (got 5); 'mode' must be one of:  (got \"precision\"); 'resolution' must be one of:  (got \"1080p\"); 'duration' is not accepted: the output follows the source video and the new audio (up to 300 seconds). To lip-sync part of the video, set 'start_time' and 'end_time'.; 'mode' is not accepted: this endpoint always runs HeyGen Lipsync Precision. For Lipsync Speed use POST https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync.; 'resolution' is not supported: the output keeps the source video's size and shape.",
  "violations": [
    "'audio_url' is required",
    "'duration' must be one of:  (got 5)",
    "'mode' must be one of:  (got \"precision\")",
    "'resolution' must be one of:  (got \"1080p\")",
    "'duration' is not accepted: the output follows the source video and the new audio (up to 300 seconds). To lip-sync part of the video, set 'start_time' and 'end_time'.",
    "'mode' is not accepted: this endpoint always runs HeyGen Lipsync Precision. For Lipsync Speed use POST https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync.",
    "'resolution' is not supported: the output keeps the source video's size and shape."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen v3 Lipsync Precision request at launch; the request id is masked.

{
  "request_id": "heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-v3-lipsync-precision",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-v3-lipsync-precision_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T13:53:41.205Z",
  "updated_at": "2026-11-18 13:56:34",
  "completed_at": "2026-11-18 13:56:33"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-v3-lipsync-precision for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the output video: the amount is the per-second rate times the length of the output video in whole seconds. The length is rounded up to the next whole second, except that up to a twentieth of a second past a whole second is not counted, and every video counts at least 1 second: a 17.03-second video is billed as 17 seconds, a 17.2-second video is billed as 18 seconds. The switches and the times do not change the per-second rate. A hold is placed when the request is submitted, sized from the longer of your video and your recording; when the video is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rates are shown in the pricing panel on this page.

HeyGen v3 Lipsync Precision API Pricing

Your request will cost $0.0305 per second of output video.
17-second clip ≈ $0.52
10. HeyGen v3 Lipsync Speed

HeyGen v3 Lipsync Speed API Documentation

Re-sync the lips in a talking-head video to new speech with HeyGen v3 Lipsync Speed: send the video in video_url and the new speech in audio_url. The speaker's mouth is redrawn to match the new speech, and the new speech becomes the video's sound track. Speed is the faster, lower-cost mode: best for drafts, previews and faces that move little. HeyGen v3 Lipsync Precision (https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync) takes the same fields and follows faces that move, turn or are partly covered more closely. Asynchronous: submit returns a request_id; poll the status endpoint until the request is COMPLETED, then download the video from output.media_url.

POST https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync

Authentication

All requests require an API key passed via header.

HeaderTypeRequiredDescription
Ocp-Apim-Subscription-KeystringYesYour API subscription key

Video + Audio to Video - HeyGen v3 Lipsync Speed

Request Code

POST https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync
Content-Type: application/json
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3",
  "enable_dynamic_duration": true,
  "enable_caption": false
}
import requests

url = "https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync"
headers = {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
}
data = {
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3",
  "enable_dynamic_duration": true,
  "enable_caption": false
}

resp = requests.post(url, json=data, headers=headers)
print(resp.json())
const res = await fetch("https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY"
  },
  body: JSON.stringify({
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3",
  "enable_dynamic_duration": true,
  "enable_caption": false
})
});
console.log(await res.json());
curl -X POST 'https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  --data-raw '{"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3", "enable_dynamic_duration": true, "enable_caption": false}'

Output

{
  "request_id": "heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Webhook (Optional)

Instead of polling, you can receive a Webhook callback when the request reaches a terminal state. Provide a Webhook URL via header on the submit request.

HeaderRequiredDescription
X-Webhook-URLTo enableHTTPS URL to receive the Webhook callback.
X-Webhook-ModeNoterminal (default, one callback on COMPLETED/ERROR) or sync (per-poll callbacks).

Example: enable Webhook

curl -X POST 'https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync' \
  -H 'Content-Type: application/json' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
  -H 'X-Webhook-URL: https://your-server.com/webhook' \
  --data-raw '{"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4", "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3", "enable_dynamic_duration": true, "enable_caption": false}'

Callback Payload (success)

{
  "request_id": "heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-v3-lipsync-speed",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T13:53:44.165Z",
  "updated_at": "2026-11-18 13:56:02",
  "completed_at": "2026-11-18 13:56:00"
}

Failure callback shape

{
  "request_id": "heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "ERROR",
  "model_id": "heygen-v3-lipsync-speed",
  "error": "Description of the failure"
}

Delivery semantics

  • terminal mode: one Webhook callback when the request is COMPLETED or ERROR.
  • sync mode: a Webhook callback on every poll while the request is processing (status PROCESSING), plus the final COMPLETED/ERROR callback.
  • Callbacks are idempotent on request_id — de-duplicate on it.
  • Respond 200 within a few seconds; the Webhook endpoint must be HTTPS.

Request Parameters

ParameterRequiredTypeDefaultAllowed values / range
video_urlYesrequiredstring—One publicly reachable http(s) URL of a video file (MP4 or MOV)
The talking-head video whose lip movement is redone. It must show the speaker's face, and its own sound track must contain speech. At most 300 seconds long.
audio_urlYesrequiredstring—One publicly reachable http(s) URL of an audio file (MP3 or WAV)
The new speech. Keep it close to the video's length (see Video, Audio and Length). At most 300 seconds long.
enable_dynamic_durationNobooleantruetrue, false
true lets the length of the output follow the new speech; false keeps the length of your video.
disable_music_trackNobooleanfalsetrue, false
true removes the background music of your video.
enable_speech_enhancementNobooleanfalsetrue, false
true cleans up the new speech before it is used.
start_timeNonumber—0 to 300 (seconds)
Re-sync only from this point of the video. Use with end_time to re-sync part of the video.
end_timeNonumber—Greater than start_time, up to 300 (seconds)
Re-sync only up to this point of the video. Use with start_time.
enable_captionNobooleanfalsetrue, false
Accepted so existing requests keep working; it has no effect, and no caption file is returned.
titleNostring—Up to 1000 characters
Accepted so existing requests keep working; it is not used.

Good to know

  • Each request returns one video: your video with the lips re-synced to audio_url. Send one request per video.
  • The mode is set by the endpoint: this endpoint always runs Speed. To switch, send the same body to https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync.
  • The speech always comes from your audio: there is no script or voice setting on this API.
  • Use the JSON types shown: true / false without quotes for the switches, numbers for the times. Omit a field instead of sending null.
  • Send only the fields listed above. Any other field is refused before a video is made, and nothing is charged.
  • Use only videos and voices you have the right to use: your own, or those of a person who has agreed.

Fields this API does not accept

Each of these is refused with a 400 when you submit, before anything is held or charged. Omit a field instead of sending null.

ParameterWhy
asset_id, video_asset_id, audio_asset_id, base64, video_base64, audio_base64Not accepted: send public http(s) URLs in 'video_url' and 'audio_url'; asset ids and base64 fields are not accepted.
audioNot accepted. Send the new speech as 'audio_url', a public http(s) URL of the audio file.
audio_urlsNot accepted: send one speech file. Send the new speech as 'audio_url', a public http(s) URL of the audio file.
batch_size, num_images, number_of_images, n, count, num_outputs, num_videosNot supported: each request returns one video. Send one request per video.
callback_idNot accepted in the JSON body. Send the webhook URL as the X-Webhook-URL request header instead.
callback_urlNot accepted in the JSON body. Send it as the X-Webhook-URL request header instead.
contentNot accepted. Send the video in 'video_url' and the speech in 'audio_url'.
duration, seconds, length, video_length, num_frames, frames_per_second, fps, music_length_msNot accepted: the output follows the source video and the new audio (up to 300 seconds). To lip-sync part of the video, set 'start_time' and 'end_time'.
image, image_url, image_urls, imagesNot accepted: this API re-syncs the lips in a video. To animate a photo, use HeyGen Avatar 6 (POST https://gateway.pixazo.ai/heygen-avatar-6/v1/image-to-video).
keep_the_same_format, fps_mode, folder_id, enable_watermarkNot supported on this API.
mode, model, engine, typeNot accepted: this endpoint always runs HeyGen Lipsync Speed. For Lipsync Precision use POST https://gateway.pixazo.ai/heygen-v3-lipsync-precision/v1/video-to-video/lip-sync.
parameters, inputNot accepted: send the fields at the top level of the JSON body.
prompt, text, script, voice, voice_idNot accepted: the words come from the speech in 'audio_url'. To turn text into speech first, use HeyGen Voice (POST https://gateway.pixazo.ai/heygen-voice/v1/text-to-speech).
resolution, width, height, size, aspect_ratio, output_width, output_heightNot supported: the output keeps the source video's size and shape.
videoNot accepted. Send the talking-head video as 'video_url', a public http(s) URL of the video file.
videos, video_urlsNot accepted: one request re-syncs one video. Send the talking-head video as 'video_url', a public http(s) URL of the video file.

Video, Audio and Length

  • Send each file as one direct, publicly reachable link: the video in video_url, the new speech in audio_url.
  • The video must show the speaker's face, and its own sound track must contain speech: a video with no speech, or with a missing or damaged sound track, ends with status: "ERROR", and nothing is charged.
  • Keep the new speech close to the length of the video. When the two lengths are too different, the request ends with status: "ERROR", and nothing is charged.
  • A video or a recording longer than 300 seconds is refused when you submit, and nothing is charged.
  • With enable_dynamic_duration on (the default), the output follows the length of the new speech; turn it off to keep the length of your video.
  • start_time and end_time re-sync only that part of the video.
  • Use a clean recording of one person speaking: music or several voices make the lip movement less accurate.

Output

One MP4 file per request: your video with the lips re-synced and the new speech as its sound track. At launch, a 17.72-second 1920×1080 video and a 17.03-second recording came back as a 17.00-second MP4 at 1920×1080 and 25 frames per second, with the new speech as its sound track.

Example: re-sync part of a video, without its background music

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3",
  "disable_music_track": true,
  "start_time": 2,
  "end_time": 12
}

Timing

At launch, the 17-second video took about 2 minutes from submit to result. Longer videos take longer. Poll the status endpoint every 10 seconds or so, or use a Webhook.

Example Request

{
  "video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4",
  "audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3",
  "enable_dynamic_duration": true,
  "enable_caption": false
}

Example Response

{
  "request_id": "heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "QUEUED",
  "polling_url": "https://gateway.pixazo.ai/v2/requests/status/heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Request Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
Ocp-Apim-Subscription-KeyYesYour API subscription key.
X-Webhook-URLNoEnable Webhook callbacks (see Webhook section).
X-Webhook-ModeNoterminal (default) or sync (see Webhook section).

Response Handling

Status CodeMeaning
202Accepted — request queued; returns request_id and polling_url.
400Invalid request — a required field is missing, a value has the wrong type or is out of range, or a field this operation does not accept was sent. The message says what to fix.
401Unauthorized — missing or invalid subscription key.
402Insufficient balance for the hold this request needs.
429Too many requests.
500Internal server error.

Parameter problems are caught when you submit and returned as a 400, before any hold is placed on your balance. Problems that need the model to run are reported through the status endpoint as status: "ERROR", with a message in error. Failed requests are not billed — the hold is released in full.

ConditionHow it surfaces
Missing or invalid subscription keysynchronous 401
Balance too low for the holdsynchronous 402
Missing or empty video_url or audio_url, or either sent as anything other than a single stringsynchronous 400
A switch sent as anything other than true or false, or a time that is not a number in rangesynchronous 400
A field this API does not accept (see Request Parameters)synchronous 400
A video or recording longer than 300 seconds (nothing is charged)synchronous 400
A video with no speech in it, or with a missing or damaged sound track (nothing is charged)status: "ERROR"
New speech whose length is too different from the video's (nothing is charged)status: "ERROR"
A file that cannot be downloaded or read (nothing is charged)status: "ERROR"
A video or recording the model refuses under its content policy (nothing is charged)status: "ERROR"
A temporary problem on the provider side (nothing is charged; try again later)status: "ERROR"

Example error responses

A refused request returns error, a message that joins every problem found, and the same problems one by one in violations.

Missing video_url (synchronous 400)

Sent {"audio_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/audio/speech-17s.mp3"}:

{
  "error": "Invalid request parameters",
  "message": "'video_url' is required",
  "violations": [
    "'video_url' is required"
  ]
}

Missing audio_url (synchronous 400)

Sent {"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required",
  "violations": [
    "'audio_url' is required"
  ]
}

A field this API does not accept (synchronous 400)

Sent {"video_url": "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/doc-assets/lipsync/talking-head-17s.mp4", "duration": 5, "mode": "precision", "resolution": "1080p"}:

{
  "error": "Invalid request parameters",
  "message": "'audio_url' is required; 'duration' must be one of:  (got 5); 'mode' must be one of:  (got \"precision\"); 'resolution' must be one of:  (got \"1080p\"); 'duration' is not accepted: the output follows the source video and the new audio (up to 300 seconds). To lip-sync part of the video, set 'start_time' and 'end_time'.; 'mode' is not accepted: this endpoint always runs HeyGen Lipsync Precision. For Lipsync Speed use POST https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync.; 'resolution' is not supported: the output keeps the source video's size and shape.",
  "violations": [
    "'audio_url' is required",
    "'duration' must be one of:  (got 5)",
    "'mode' must be one of:  (got \"precision\")",
    "'resolution' must be one of:  (got \"1080p\")",
    "'duration' is not accepted: the output follows the source video and the new audio (up to 300 seconds). To lip-sync part of the video, set 'start_time' and 'end_time'.",
    "'mode' is not accepted: this endpoint always runs HeyGen Lipsync Precision. For Lipsync Speed use POST https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync.",
    "'resolution' is not supported: the output keeps the source video's size and shape."
  ]
}

Retrieving Results

Poll the status endpoint with the request_id from the submit response until status is COMPLETED or ERROR, then download the video from output.media_url. Treat any status other than QUEUED, PROCESSING or COMPLETED as a failure.

Endpoint

GET https://gateway.pixazo.ai/v2/requests/status/{request_id}
Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY

cURL example

curl 'https://gateway.pixazo.ai/v2/requests/status/heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
  -H 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY'

Completed response

Captured from a real HeyGen v3 Lipsync Speed request at launch; the request id is masked.

{
  "request_id": "heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "COMPLETED",
  "model_id": "heygen-v3-lipsync-speed",
  "error": null,
  "output": {
    "media_url": [
      "https://pub-582b7213209642b9b995c96c95a30381.r2.dev/v1/heygen-v3-lipsync-speed_019dxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/output.mp4"
    ],
    "media_type": "video/mp4"
  },
  "created_at": "2026-11-18T13:53:44.165Z",
  "updated_at": "2026-11-18 13:56:02",
  "completed_at": "2026-11-18 13:56:00"
}

Response Fields

FieldTypeDescription
request_idstringUnique request identifier.
statusstringQUEUED, PROCESSING, COMPLETED or ERROR.
model_idstringThe model that handled the request — heygen-v3-lipsync-speed for this endpoint.
output.media_urlarray of stringsURL of the video (one MP4 file per request). Download it and keep your own copy.
output.media_typestringvideo/mp4.
created_atstringRequest creation timestamp.
completed_atstringCompletion timestamp.
errorstringError message when status is ERROR.
polling_urlstringStatus URL for this request (submit response only).

Status Values & Flow

QUEUED → PROCESSING → COMPLETED (success) or ERROR (failure).

Typical workflow

  1. Send the request to POST https://gateway.pixazo.ai/heygen-v3-lipsync-speed/v1/video-to-video/lip-sync.
  2. Save the request_id from the 202 response.
  3. Poll GET /v2/requests/status/{request_id} every 10 seconds or so, or use a Webhook instead.
  4. When status is COMPLETED, download the video from output.media_url.

How Billing Is Measured

Billing is measured per second of the output video: the amount is the per-second rate times the length of the output video in whole seconds. The length is rounded up to the next whole second, except that up to a twentieth of a second past a whole second is not counted, and every video counts at least 1 second: a 17.03-second video is billed as 17 seconds, a 17.2-second video is billed as 18 seconds. The switches and the times do not change the per-second rate. A hold is placed when the request is submitted, sized from the longer of your video and your recording; when the video is ready you are charged for its real length and the rest of the hold is released. The hold is released in full if the request fails. The current rates are shown in the pricing panel on this page.

HeyGen v3 Lipsync Speed API Pricing

Your request will cost $0.0147 per second of output video.
17-second clip ≈ $0.25

⚡ Performance

Live usage measured on Pixazo's gateway, split by model version. Generation time is how long a generation takes end-to-end (lower is better). Success rate is the percent of generations that complete (higher is better).

Show data for the last
Generations
617,600last 30d
~20,587 per day
Success rate
46.6%
of completed generations
Generation time
42.0savg
p95 74.1s
Requests
Nov 1max 35,300Nov 30
HeyGen Voice 1 Turbo FreeAvg 20,087/day
HeyGen Voice 1 TurboAvg 390/day
HeyGen VideoAvg 40/day
HeyGen Avatar 6 TurboAvg 17/day
OtherAvg 53/day
Generation Time
Nov 1max 5.4minNov 30
HeyGen Voice 1 Turbo FreeAvg 40.9s
HeyGen Voice 1 TurboAvg 59.5s
HeyGen VideoAvg 104.4s
HeyGen Avatar 6 TurboAvg 2.2min
OtherAvg 99.2s
Error Rate
Nov 1max 100.0%Nov 30
HeyGen Voice 1 Turbo FreeAvg 54.9%
HeyGen Voice 1 TurboAvg 0.9%
HeyGen VideoAvg 50.0%
HeyGen Avatar 6 TurboAvg 20.0%
OtherAvg 18.8%

〰 Uptime

Percent of generations that succeeded over the selected period, per model version.

Avg. Success Rate (30d)
46.57%
across all generations of this model family
Uptime
Nov 1max 100%Nov 30
HeyGen Voice 1 Turbo FreeAvg 45.09%
HeyGen Voice 1 TurboAvg 99.15%
HeyGen VideoAvg 50.00%
HeyGen Avatar 6 TurboAvg 80.00%
OtherAvg 81.25%