Create Overdub
- Endpoint:
POST https://api.heygen.com/v3/overdubs - Purpose: Dub or replace audio on a video using a provided audio file. HeyGen re-syncs the speaker’s lip movements to match the new audio. The job runs asynchronously — poll status via the Get Overdub Details endpoint.
Authentication
| Header | Value |
|---|---|
X-Api-Key | Your HeyGen API key |
Authorization | Bearer YOUR_ACCESS_TOKEN (OAuth) |
Quick Example
Request Body
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
video | object | Yes | — | Source video. Provide as { "type": "url", "url": "https://..." } or { "type": "asset_id", "asset_id": "..." } (from POST /v3/assets). |
audio | object | Yes | — | Replacement audio. Same format options as video. |
title | string | No | — | Display title for the overdub in the HeyGen dashboard. |
mode | string | No | "speed" | Quality mode: "speed" (faster) or "precision" (higher quality, uses avatar inference). |
enable_caption | boolean | No | false | Generate captions for the output video. |
enable_dynamic_duration | boolean | No | true | Allow output duration to adjust to match the new audio length. |
disable_music_track | boolean | No | false | Strip background music from the source video. |
enable_speech_enhancement | boolean | No | false | Enhance speech quality in the output. |
enable_watermark | boolean | No | false | Add a watermark to the output. |
start_time | number | No | — | Start time in seconds for partial overdub. |
end_time | number | No | — | End time in seconds for partial overdub. |
keep_the_same_format | boolean | No | — | Preserve the source video’s resolution and bitrate. |
fps_mode | string | No | — | Frame rate mode: "vfr", "cfr", or "passthrough". |
callback_url | string | No | — | Webhook URL — receives a POST when the job completes or fails. |
callback_id | string | No | — | Arbitrary ID echoed back in the webhook payload. |
folder_id | string | No | — | Organize the overdub into a specific project folder. |
Response
| Field | Type | Description |
|---|---|---|
overdub_id | string | Unique identifier. Use with GET /v3/overdubs/{overdub_id} to poll status. |
Get Overdub Details
- Endpoint:
GET https://api.heygen.com/v3/overdubs/{overdub_id} - Purpose: Get detailed information about an overdub including status, download URL, and metadata.
Quick Example
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
overdub_id | string | Yes | Unique overdub identifier. |
Response
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique overdub identifier. |
title | string or null | Display title. |
status | string | Current status: "pending", "running", "completed", or "failed". |
duration | number or null | Video duration in seconds. Present when completed. |
video_url | string or null | Presigned download URL for the output video. Only present when status is "completed". |
callback_id | string or null | Client-provided callback ID. |
created_at | integer or null | Unix timestamp of creation. |
failure_message | string or null | Error description. Only present when status is "failed". |
List Overdubs
- Endpoint:
GET https://api.heygen.com/v3/overdubs - Purpose: List overdubs with cursor-based pagination.
Quick Example
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | 10 | Results per page (1–100). |
token | string | No | — | Opaque cursor token for the next page. |
Response
Update Overdub
- Endpoint:
PATCH https://api.heygen.com/v3/overdubs/{overdub_id} - Purpose: Update an overdub’s title.
Quick Example
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | New title for the overdub. |
Delete Overdub
- Endpoint:
DELETE https://api.heygen.com/v3/overdubs/{overdub_id} - Purpose: Permanently delete an overdub.
Quick Example
Response
Polling Pattern
Overdubs are processed asynchronously. After creating one, poll the Get Overdub Details endpoint until the status reaches"completed" or "failed".
Status transitions: pending → running → completed | failed
Asset Inputs
Bothvideo and audio fields accept two input formats:
By URL — any publicly accessible HTTPS link:
POST /v3/assets:
Speed vs Precision
| Mode | Speed | Quality | How it works |
|---|---|---|---|
"speed" | Faster | Good | Audio-only resync |
"precision" | Slower | Higher | Uses avatar inference for more accurate lip movements |
"precision" when the speaker’s face is prominent and lip-sync accuracy matters. Use "speed" for batch jobs or when turnaround time is the priority.
