Dubbing and Lipsync
This guide dubs a video or an audio into another language, in the speaker's own voice, with the lipsync API. It has two modes:
dub: send a video, get back the video in the new language with the mouth moved to the new speech (lipsync). $0.60 per started minute of media.dub_audio: send an audio (or a video), get back only the dubbed audio. $0.15 per started minute of media.
Only finished dubs are charged.
Closed beta. Lipsync is enabled per organization. Until yours is enabled, the API answers 403 ("Lipsync is not enabled for this organization yet"). Contact support to join the beta.
Base URL: https://api.mamutecloud.com. Every call uses your organization API key in the Authorization header, without Bearer:
Authorization: mamute-...
Before you start
- Create an API key (see Authentication) and store it as
MAMUTECLOUD_API_KEY. - Lipsync is paid from your balance, free signup credit included, or with auto-recharge. Check what is available with
GET /v1/lipsync/balance.
Which mode to use
| Mode | Send | Get back | Use it for |
|---|---|---|---|
dub (default) | a video | the video (MP4) in the new language, with the mouth moved to it | talking-head videos, classes, ads: anything where the face is on screen |
dub_audio | an audio, or a video (its sound is used) | the dubbed audio (M4A) | podcasts, voice-overs, or videos you edit yourself and only need the new track |
Both keep the speaker's voice and the timing of the original speech. One job dubs into one target language; for a second language, create a second job (the same upload can feed both).
1. Dub a video (dub)
dub)curl -X POST https://api.mamutecloud.com/v1/lipsync \
-H "Authorization: $MAMUTECLOUD_API_KEY" \
-H "content-type: application/json" \
-d '{"mode": "dub", "media": {"url": "https://example.com/class-01.mp4"}, "source": "pt", "target": "en"}'The call always answers 202 with "status": "queued":
{
"data": {
"id": "3f9d0c2a-6b1e-4a7d-9c55-2e8f1a6b7c90",
"status": "queued",
"mode": "dub",
"media": "url",
"source": "pt",
"target": "en",
"mediaSeconds": null,
"billedSeconds": null,
"estimatedCostUsd": null,
"error": null,
"createdAt": "2026-11-11T18:02:11.000Z",
"finishedAt": null
}
}Keep the id and follow the job (step 3), or use a webhook (step 4). Omit source to detect the spoken language.
2. Dub only the audio (dub_audio)
dub_audio)For a local file, get an upload URL, PUT the file to it, then create the job with the uploadKey:
curl -X POST https://api.mamutecloud.com/v1/lipsync/upload -H "Authorization: $MAMUTECLOUD_API_KEY"
# -> { "data": { "uploadUrl": "https://...", "uploadKey": "in/uploads/...", "expiresIn": 3600 } }
curl -X PUT --upload-file podcast-ep12.mp3 "$UPLOAD_URL"
curl -X POST https://api.mamutecloud.com/v1/lipsync \
-H "Authorization: $MAMUTECLOUD_API_KEY" \
-H "content-type: application/json" \
-d '{"mode": "dub_audio", "media": {"uploadKey": "'$UPLOAD_KEY'"}, "target": "es"}'{
"data": {
"id": "8a1c5e3f-0d2b-4f6a-b7c8-9d0e1f2a3b4c",
"status": "queued",
"mode": "dub_audio",
"media": "upload",
"target": "es",
"mediaSeconds": null,
"billedSeconds": null,
"estimatedCostUsd": null,
"error": null,
"createdAt": "2026-11-11T18:10:02.000Z",
"finishedAt": null
}
}The upload URL is valid for 1 hour. Uploads work for dub too, and a public URL works for dub_audio. Media can be up to 4 GB.
3. Follow the job until the result
curl https://api.mamutecloud.com/v1/lipsync/$LIPSYNC_ID \
-H "Authorization: $MAMUTECLOUD_API_KEY"status goes from queued to processing, then ends in done or error. A finished dub:
{
"data": {
"id": "3f9d0c2a-6b1e-4a7d-9c55-2e8f1a6b7c90",
"status": "done",
"mode": "dub",
"media": "url",
"source": "pt",
"target": "en",
"mediaSeconds": 94.2,
"billedSeconds": 95,
"estimatedCostUsd": 1.2,
"error": null,
"createdAt": "2026-11-11T18:02:11.000Z",
"finishedAt": "2026-11-11T18:05:40.000Z",
"expiresAt": "2026-11-18T18:05:40.000Z",
"url": "https://..."
}
}A finished dub_audio has the same shape; its url points to an M4A file instead of an MP4.
urlis signed for 1 hour. Ask again for a fresh link.- Results are deleted 7 days after the job ends (
expiresAt); after that the job showsexpired: trueand nourl. sourceshows the detected language once it is known.- While a job is
queuedagain after an attempt that did not finish,errortells why; the job is retried on its own.
When polling, wait 30 to 60 seconds between calls. A webhook (step 4) saves the polling.
4. Get notified with a webhook
Send webhookUrl when you create the job. When it ends, MamuteCloud sends a POST to it:
{ "data": { "id": "3f9d0c2a-...", "status": "done" } }status is done or error. Answer with any 2xx within 10 seconds; redirects are not followed. A delivery that fails is retried up to 7 more times over about 7 hours and 40 minutes. Each request carries the attempt number in the X-Mamute-Webhook-Attempt header. Delivery is at least once: dedupe on id. Fetch the full result with GET /v1/lipsync/{id} when it arrives.
Timing
Dubbing is not instant: the speech is transcribed, translated and spoken again in the speaker's voice, and in dub mode the mouth is moved to the new speech. Times measured in our tests:
| Situation | Time to done |
|---|---|
| Warm: capacity is already running | about 3 minutes |
| Cold start: capacity has to be reactivated after a quiet period | about 15 minutes |
| New capacity: none is available and more has to be provisioned | longer than 15 minutes |
Longer media takes longer, and dub takes longer than dub_audio. A job waiting for capacity stays queued. If no capacity becomes available within 6 hours, the job ends in error and nothing is charged.
Do not hold a request open waiting for the result: create the job, then use the webhook or poll GET /v1/lipsync/{id}.
Languages
target is one of:
ar, da, de, el, en, es, fi, fr, he, hi, it, ja, ko, ms, nl, no, pl, pt, ru, sv, sw, tr, zh
source is an ISO 639-1 code such as pt and must differ from target; omit it to detect the language. GET /v1/lipsync/options lists the modes, their prices and the targets.
Pricing and balance
dub | dub_audio | |
|---|---|---|
| Price | $0.60 per started minute of media | $0.15 per started minute of media |
| Unit | each started minute of the source media, per job (one target language) | each started minute of the source media, per job (one target language) |
| Charged when | the dub is done; failed jobs cost nothing | the dub is done; failed jobs cost nothing |
| Pays with | balance (signup credit included) or auto-recharge | balance (signup credit included) or auto-recharge |
A 1 minute 34 second video is billed as 2 minutes: $1.20 in dub, $0.30 in dub_audio. Dubbing it into English and Spanish is two jobs, so twice that.
Without any balance or auto-recharge, POST /v1/lipsync and POST /v1/lipsync/upload answer 402. Once the media length is known, its price is held from your balance; if the balance cannot cover it, the job ends in error and nothing is charged.
curl https://api.mamutecloud.com/v1/lipsync/balance -H "Authorization: $MAMUTECLOUD_API_KEY"
# -> { "data": { "totalUsd": 27.98, "reservedUsd": 1.2, "availableUsd": 26.78, "autoRecharge": true } }List and monitor
# Newest first; page with ?before=<nextBefore>
curl "https://api.mamutecloud.com/v1/lipsync?status=failed&limit=50" -H "Authorization: $MAMUTECLOUD_API_KEY"
# This month's billed seconds, requests and spend, seconds and cost per day, and health
curl "https://api.mamutecloud.com/v1/lipsync/analytics?days=30" -H "Authorization: $MAMUTECLOUD_API_KEY"Errors
| Status | When |
|---|---|
| 400 | invalid body: unknown mode or target, not exactly one of media.url/media.uploadKey, nothing uploaded at uploadKey, source equal to target, URL that is not public http or https |
| 401 | missing or invalid API key (remember: no Bearer before mamute-) |
| 402 | no balance and no auto-recharge |
| 403 | the account is not active, or the organization is not in the lipsync beta |
| 404 | the job does not belong to your organization |
A job can also be accepted and then end in error (not charged). Common reasons in error:
media URL answered 403(or another status): the URL could not be downloaded.media over 4 GB.the media is already in en: the spoken language is the target.no speech found in the media.The media is longer than the remaining balance covers. Top up and resend.
Full reference: Lipsync API.
Updated 11 days ago
