curl --request POST \
--url https://app.dubly.ai/api/v1/dubs/{id}/segments/{segmentId}/regenerate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_language": "de"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({target_language: 'de'})
};
fetch('https://app.dubly.ai/api/v1/dubs/{id}/segments/{segmentId}/regenerate', 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}/segments/{segmentId}/regenerate"
payload = { "target_language": "de" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "success",
"response": {
"dub_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"target_language": "de",
"segment_id": "5b1e7c2a-9d43-4f8e-a6b0-2c7d9e1f3a54",
"mode": "revoice",
"api_edits_remaining": 1
}
}Re-voice one segment
Re-voices one segment of a completed dub right away with its stored state — “Regenerate” in the web app’s visual editor. The stored translation is spoken again (mode “revoice”). If the translation was cleared because POST /api/v1/dubs//segments/timeline changed the source text, the segment is first translated from the new source line and then voiced (mode “retranslate”); a muted segment stays silent.
The run is asynchronous: the answer is 202, and GET /api/v1/dubs//segments shows processing true for the segment until its new voice-over is in place. Engine v1 only (capabilities supportsTimelineEditor and supportsPerSegmentRegenerate): on any other engine the request returns 400.
A segmentId that does not belong to this dub and target_language, or is deleted, returns 404. While the segment is already being re-translated or re-voiced, a review is in progress, or an update or a lip sync is running for this language, the request returns 409 and starts nothing.
Every accepted regenerate costs one of the segment’s 2 API edits — the same counter as PATCH /api/v1/dubs//segments and POST …/segments/timeline; once they are used up, the next regenerate returns 403 FORBIDDEN and starts nothing — the segment can still be regenerated in the Dubly web app. A regenerate refused with 400, 403, 404 or 409, or one that fails to start with 500, is not counted. See Edit limits. No credits are charged.
curl --request POST \
--url https://app.dubly.ai/api/v1/dubs/{id}/segments/{segmentId}/regenerate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_language": "de"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({target_language: 'de'})
};
fetch('https://app.dubly.ai/api/v1/dubs/{id}/segments/{segmentId}/regenerate', 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}/segments/{segmentId}/regenerate"
payload = { "target_language": "de" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "success",
"response": {
"dub_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"target_language": "de",
"segment_id": "5b1e7c2a-9d43-4f8e-a6b0-2c7d9e1f3a54",
"mode": "revoice",
"api_edits_remaining": 1
}
}Authorizations
Path Parameters
Body
BCP 47 code of the language the segment belongs to. 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 
