curl --request PATCH \
--url https://app.dubly.ai/api/v1/dubs/{id}/lipsync/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_language": "de",
"blocks": [
{
"id": "8d2f4b6a-1c3e-4a5b-9d7f-0e2a4c6b8d1f",
"enabled": false
},
{
"id": "f1e3c5a7-9b2d-4f6e-8a0c-2d4f6b8a0c3e",
"enabled": true
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
target_language: 'de',
blocks: [
{id: '8d2f4b6a-1c3e-4a5b-9d7f-0e2a4c6b8d1f', enabled: false},
{id: 'f1e3c5a7-9b2d-4f6e-8a0c-2d4f6b8a0c3e', enabled: true}
]
})
};
fetch('https://app.dubly.ai/api/v1/dubs/{id}/lipsync/segments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.dubly.ai/api/v1/dubs/{id}/lipsync/segments"
payload = {
"target_language": "de",
"blocks": [
{
"id": "8d2f4b6a-1c3e-4a5b-9d7f-0e2a4c6b8d1f",
"enabled": False
},
{
"id": "f1e3c5a7-9b2d-4f6e-8a0c-2d4f6b8a0c3e",
"enabled": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"status": "success",
"response": {
"dub_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"target_language": "de",
"applied": false,
"changed_segment_ids": [],
"lipsync_status": "done",
"api_lipsync_applies_remaining": 2
}
}Switch lip sync on or off per block
Switches lip sync on or off for blocks of one target language and re-assembles the finished lip-sync video from the segments it already has — the visual editor’s “Re-render” when only the lip-sync track changed. There is no POST /api/v1/dubs//update, no new lip-sync run and no credits. Send the blocks to change, each id at most once.
The re-assembly runs asynchronously: the answer is 202 with lipsync_status “reconstructing”; poll GET /api/v1/dubs//lipsync, which answers “Processing” with step “reconstructing” until it is “Synced” again. If every block already has the requested value, the answer is 200 with applied false: nothing is re-assembled and nothing is counted.
An empty blocks array or a duplicate id returns 400, and so does a dub whose engine has no supportsTimelineEditor (v2). A block id that belongs to another language or another dub returns 404 — once the language’s lip sync is finished; before that, every request returns 409. While the lip sync of the language is running or not finished, an update is running, a review is in progress, or the block files have already been cleaned up (then only a new lip sync via POST /api/v1/dubs//lipsync can change the blocks), the request returns 409; so does a block whose lip sync is no longer stored and can only come back with a new run. Nothing is changed in any of these cases.
Every re-assembly that actually starts costs one of the language’s 2 API lip-sync applies — a counter of its own, separate from the segment edits; once they are used up, the next change returns 403 FORBIDDEN and changes nothing — the blocks can still be switched in the Dubly web app. A request refused with 400, 403, 404 or 409, or one whose re-assembly fails to start with 500, is not counted. See Edit limits.
curl --request PATCH \
--url https://app.dubly.ai/api/v1/dubs/{id}/lipsync/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_language": "de",
"blocks": [
{
"id": "8d2f4b6a-1c3e-4a5b-9d7f-0e2a4c6b8d1f",
"enabled": false
},
{
"id": "f1e3c5a7-9b2d-4f6e-8a0c-2d4f6b8a0c3e",
"enabled": true
}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
target_language: 'de',
blocks: [
{id: '8d2f4b6a-1c3e-4a5b-9d7f-0e2a4c6b8d1f', enabled: false},
{id: 'f1e3c5a7-9b2d-4f6e-8a0c-2d4f6b8a0c3e', enabled: true}
]
})
};
fetch('https://app.dubly.ai/api/v1/dubs/{id}/lipsync/segments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.dubly.ai/api/v1/dubs/{id}/lipsync/segments"
payload = {
"target_language": "de",
"blocks": [
{
"id": "8d2f4b6a-1c3e-4a5b-9d7f-0e2a4c6b8d1f",
"enabled": False
},
{
"id": "f1e3c5a7-9b2d-4f6e-8a0c-2d4f6b8a0c3e",
"enabled": True
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"status": "success",
"response": {
"dub_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"target_language": "de",
"applied": false,
"changed_segment_ids": [],
"lipsync_status": "done",
"api_lipsync_applies_remaining": 2
}
}Authorizations
Path Parameters
Body
BCP 47 code of the language whose lip-sync blocks are switched. A language the dub does not have returns 404.
af, ar, hy, as, az, be, bn, bs, bg, ca, ceb, ny, zh, hr, cs, da, nl, en, et, fil, fi, fr, gl, ka, de, el, gu, ha, he, hi, hu, is, id, ga, it, ja, jv, kn, kk, ko, ky, lv, ln, lt, lb, mk, ms, ml, mr, ne, no, ps, fa, pl, pt, pa, ro, ru, sr, sd, sk, sl, so, es, sw, sv, ta, te, th, tr, uk, ur, vi, cy, en-GB, en-US, es-419, es-ES 
