# List your custom voices Source: https://docs.dubly.ai/api-reference/account/list-custom-voices /openapi.json get /api/v1/custom-voices Returns all custom voices configured for your account, newest first. Use the returned id as custom_voice_id when creating a dub. # List your projects Source: https://docs.dubly.ai/api-reference/account/list-projects /openapi.json get /api/v1/projects Returns all projects owned by your account, newest first. Use the returned project IDs as project_id when creating a dub. # Create a dub from a Google Drive video Source: https://docs.dubly.ai/api-reference/create-dubs/create-dub-google-drive /openapi.json post /api/v1/dubs/google-drive Checks the Google Drive file, takes its name and duration, charges credits based on that duration, and starts the dubbing pipeline. The file must be shared as "Anyone with the link" with downloading allowed. A file that is not found or not shared publicly returns 404; a folder, a non-video file, a file with downloading disabled or a video Drive is still processing returns 400; if Google Drive cannot be reached the request returns 500 and can be retried. In each of these refused cases no dub is created and no credits are charged. # Create a dub from a video URL Source: https://docs.dubly.ai/api-reference/create-dubs/create-dub-url /openapi.json post /api/v1/dubs/url Creates a dub from a publicly accessible video URL. A minimum credit charge (1 minute per language) is applied upfront — additional credits are charged once the actual duration is known. # Create a dub from a YouTube video Source: https://docs.dubly.ai/api-reference/create-dubs/create-dub-youtube /openapi.json post /api/v1/dubs/youtube Downloads the video from YouTube, extracts metadata, charges credits based on duration, and starts the dubbing pipeline. # List the segments of one language Source: https://docs.dubly.ai/api-reference/dub-editing/get-dub-segments /openapi.json get /api/v1/dubs/{id}/segments Returns every segment of one target language of a completed dub, sorted by index, with its id (what PATCH …/segments takes), start and end in seconds as the editor shows them, source_text, target_text, speaker, is_muted, speech_rate, pending_revoice (engine v1: edited and waiting to be voiced at the next update; always false on engine v2), processing (a re-translation or re-voicing of this segment is running right now) and api_edits_remaining. On the language level it returns the engine, its capabilities (supportsSourceEdit, supportsTranslationEdit and supportsVoiceSwap tell which PATCH fields the engine accepts), speakers (exactly the ids PATCH speaker accepts) and the same render state as GET /api/v1/dubs/{id}/update. A language without segments returns 200 with an empty segments array. An unknown dub, a dub of another account and a target_language the dub does not have all return 404. Read-only: nothing is counted and no credits are charged. # Get the render state of one language Source: https://docs.dubly.ai/api-reference/dub-editing/get-dub-update /openapi.json get /api/v1/dubs/{id}/update Returns the render state of one language — the same fields as the language level of GET /api/v1/dubs/{id}/segments: pending_changes (edits that POST /api/v1/dubs/{id}/update would apply; v1: segments waiting for an update, v2: changes waiting for "Apply changes"), is_updating, update_status ("idle", or the running phase voice_cloning → speech_syncing → merging → rendering; "error" if the last update failed), lipsync_status, api_update_rounds_remaining and video_url. video_url is null while an update is running and otherwise a signed URL of the current video, valid for 7 days, like GET /api/v1/dubs/{id}. Read-only: nothing is counted. # Correct segments of one language Source: https://docs.dubly.ai/api-reference/dub-editing/patch-dub-segments /openapi.json patch /api/v1/dubs/{id}/segments Corrects source text, translation and/or speaker of up to 500 segments of one target language at once, with the web editor's own save logic. Every entry is checked before anything is written: an unknown, deleted or duplicate segment id, a field the dub's engine does not allow or an unknown speaker returns 400 naming the segment, and nothing is written. Engine v1 (per segment): a changed target_text or speaker is saved and voiced at the next POST /api/v1/dubs/{id}/update (pending_revoice becomes true); an empty target_text mutes the segment. A changed source_text sent alone is saved and the segment is re-translated and re-voiced in this language right away; sent together with a target_text, both are saved and the given translation is kept. also_retranslate_languages re-translates and re-voices every segment with a changed source_text into those languages too. Engine v2 (batch): speaker and also_retranslate_languages are not available (400); edits are saved and marked as pending changes, and nothing is re-translated or voiced until POST /api/v1/dubs/{id}/update, whose "Apply changes" itself carries corrected source texts over to every language of the dub. Each entry is reported as "updated", "unchanged" (all values already as stored: nothing written, nothing counted) or "failed" (with error, not counted); "updated" with an error means the text was saved but the re-translation failed. While a review is in progress, an update or a lip sync is running for this language (or one in also_retranslate_languages), or a changed segment is being re-translated or re-voiced, the request returns 409 and changes nothing. Every segment that actually changes costs one of its 2 API edits. See [Edit limits](/guides/edit-limits). No credits are charged. # Re-voice one segment Source: https://docs.dubly.ai/api-reference/dub-editing/regenerate-dub-segment /openapi.json post /api/v1/dubs/{id}/segments/{segmentId}/regenerate 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/{id}/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/{id}/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/{id}/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](/guides/edit-limits). No credits are charged. # Save timeline edits of one language Source: https://docs.dubly.ai/api-reference/dub-editing/save-dub-timeline /openapi.json post /api/v1/dubs/{id}/segments/timeline One save of the web app's visual (timeline) editor for one target language of a completed dub: move segments, shorten or lengthen them, change their speech rate, text or speaker, split them, create new ones and delete them — with the editor's own save logic and limits. Engine v1 only (capability supportsTimelineEditor): on any other engine the request returns 400 — correct texts there with PATCH /api/v1/dubs/{id}/segments. All times are in seconds. Every entry of updated carries the segment's complete new state; an entry whose values are all as stored is reported as "unchanged" and is neither written nor counted. The changes reach the video with the next POST /api/v1/dubs/{id}/update, which re-voices every segment whose duration, text or speaker changed (pending_revoice in GET /api/v1/dubs/{id}/segments); an empty target_text mutes a segment. A changed source_text sent with the stored (or an empty) target_text clears the translation: the segment is translated from the new source line; sent with a new target_text, that translation is kept. created adds segments, and the answer (200) maps each client_id to the new segment id. A split is the original segment in updated, shortened to its left half (with source_rebase when its source line is divided as well), plus its right half in created with split_from set to the original's id; a split_from that is not in updated of the same request returns 400. deleted removes segments: the freed time stays a gap, and GET /api/v1/dubs/{id}/segments no longer lists them. resync_retranslations: true re-translates and re-voices every segment whose source_text changed right away and voices every created segment that has a target_text (resynced_segment_ids); without it nothing is voiced before the next update. Everything is checked before anything is written: a speech_rate outside 0.7–1.3, a duration under 0.8 s (a segment that is already shorter may keep its length), an unknown speaker, an invalid field, an id twice or in updated and deleted, or more than 500 entries return 400; a segment id that does not belong to this dub and target_language, or is deleted, returns 404. While a review is in progress, an update or a lip sync is running for this language, or a changed segment is being re-translated or re-voiced, the request returns 409. Nothing is written in any of these cases. Every segment in updated that actually changes costs one of its 2 API edits — the same counter as PATCH /api/v1/dubs/{id}/segments and POST …/regenerate. A new segment starts with 1 edit used, both halves of a split continue with the original's count + 1, and deleting costs nothing. If even one segment would go over the limit, the request returns 403 FORBIDDEN and nothing is written. A save that fails with an internal error while writing can already have written part of the changes, so its edits stay counted — check GET /api/v1/dubs/{id}/segments before you send it again. See [Edit limits](/guides/edit-limits). No credits are charged. # Apply pending edits and re-render Source: https://docs.dubly.ai/api-reference/dub-editing/start-dub-update /openapi.json post /api/v1/dubs/{id}/update Applies the pending edits of the given languages. Engine v1 runs the editor's "Update": re-voices every waiting segment, merges the audio and renders the video. Engine v2 runs "Apply changes", which also carries corrected source texts over to every other language of the dub that is not busy: those languages start as well, pass the same checks, cost one update round each and are listed in retranslated_languages. Each language is reported as "started", "nothing_to_apply" (no pending changes), "already_running" (v2: already being regenerated, e.g. through another language's source correction; its remaining changes stay pending), "deferred" (v1: the dub's voices are being restored for an earlier language; retry this one once that update has finished) or "failed" (with error). The response is 200 even when no language has anything to apply. All languages are checked before the first one starts: while an update, a lip sync, a review or a single-segment re-voicing is running for any of them, the request returns 409 and nothing starts. If a language has a finished lip sync, the request returns 409 unless reset_lipsync is true, because the update replaces the audio the lip sync was made from. Every language that actually starts costs one of its 2 API update rounds; nothing else counts. See [Edit limits](/guides/edit-limits). No credits are charged. Poll GET /api/v1/dubs/{id}/update for progress. # Delete a dub permanently Source: https://docs.dubly.ai/api-reference/dubs/delete-dub /openapi.json delete /api/v1/dubs/{id} Deletes the dub with all its languages, segments and stored files (videos, audio, subtitles, lip syncs), like "Delete" in the web app. Deleting is permanent and cannot be undone: there is no trash and no restore, neither through the API nor in the web app — download everything you still need first (GET /api/v1/dubs/{id}/downloads). Afterwards GET /api/v1/dubs/{id}, every other endpoint for this ID and a second DELETE return 404. Works in every dub status, with no limit and no review lock. # Get dub status and result URLs Source: https://docs.dubly.ai/api-reference/dubs/get-dub /openapi.json get /api/v1/dubs/{id} Check the current status of a dub. Returns "Processing" while in progress, "Dubbed" with download URLs when complete, or "Error" if the dub failed. After a change in the editor ("Update"), the dub is re-rendered: the status is "Updating" without URLs until the new version is ready, then "Dubbed" again with URLs to the updated video. A change of the original-voice volume (PATCH /api/v1/dubs/{id}/audio-settings) on a finished dub does the same while its languages are re-mixed: "Updating" without URLs, then "Dubbed" again. An update also resets a finished lip sync of that language (GET /api/v1/dubs/{id}/lipsync answers "NotStarted") — start it again once the status is "Dubbed". See [Dub status lifecycle](/guides/dub-status). Download URLs are signed and valid for 7 days; download the file instead of storing the link, and call this endpoint again for a fresh one. Every answer, in every status, also carries audio_settings: original_voice_volume_db (the volume of the original voice under the dubbed one, in dB), adjustable (whether PATCH /api/v1/dubs/{id}/audio-settings can change it for this dub) and api_changes_remaining (API volume changes left for this dub; null if it cannot be read at the moment — the rest of the answer is unaffected). The dub ID is passed as a path parameter; a deleted dub returns 404. # List the downloads of one language Source: https://docs.dubly.ai/api-reference/dubs/get-dub-downloads /openapi.json get /api/v1/dubs/{id}/downloads Returns exactly the files the Download tab of the web app offers for one target language of a completed dub. Each entry has id, file_name (the same file name as a download in the web app), a signed url and expires_at (ISO 8601): the link is valid for 1 hour — the same as a download in the web app — and stops working at expires_at — download the file, and call this endpoint again for a fresh link. The ids: - "video" (final video) and "audio" (final audio) always; - "lipsync" only when the lip sync of this language is finished ("Synced"); - "audio-voice" (dubbed voice only) and "audio-background" (background without voices) only on an engine with separate audio tracks, and only once those tracks are ready — on a v2 dub the background is the language's own and its file_name carries the language like every other entry (e.g. My_Video_de_background.mp3); a dub created before per-language backgrounds has one background for all languages, without the language (My_Video_background.mp3); - "subtitled-video" only when its burn-in is "ready" (see POST /api/v1/dubs/{id}/subtitled-video). An option that is not available is left out; subtitle files (SRT) are not offered. "video", "lipsync" and "subtitled-video" pass the same integrity check as a download in the web app: a damaged file stays in the list with url null, expires_at null and error "video_corrupted" instead of silently missing. A dub that has not finished processing returns 400; an unknown dub, a dub of another account and a target_language the dub does not have return 404. Read-only: nothing is counted, there is no limit and no credits are charged. # Rename a dub or move it to a project Source: https://docs.dubly.ai/api-reference/dubs/patch-dub /openapi.json patch /api/v1/dubs/{id} Renames the dub and/or moves it into a project, like "Rename" and "Move to project" in the web app. Send title, project_id or both; a body with neither returns 400. Both are checked before anything is written: if one of them is invalid, neither is changed. A value that is already as stored is not written, so a request that changes nothing returns 200 with the current values. Works in every dub status, with no limit and no review lock. No credits are charged. # Change the volume of the original voice Source: https://docs.dubly.ai/api-reference/dubs/patch-dub-audio-settings /openapi.json patch /api/v1/dubs/{id}/audio-settings Sets how loud the original voice plays under the dubbed voice, like the audio settings on the dub page of the web app. The value is saved for the dub; if the dub has finished processing, every language is re-mixed with it right away — nothing is re-voiced and no credits are charged. While the re-mix runs, GET /api/v1/dubs/{id} reports "Updating" without URLs; once it is done, "Dubbed" again with URLs to the re-mixed videos. A finished lip sync is not reset by a volume change: GET /api/v1/dubs/{id}/lipsync stays "Synced", and its video is not re-made with the new volume. Possible only when the dub's engine supports it and the dub was created keeping the original voice under the dubbed one (audio_settings.adjustable in GET /api/v1/dubs/{id}); otherwise the request returns 400. A value that is not a whole number from -30 to -5 returns 400. While any language of the dub is being updated or a review is in progress, the request returns 409 and changes nothing. Sending the current value returns 200 without a re-mix and is not counted. Every change that actually takes effect costs one of the dub's 2 API volume changes; once they are used up, the next change returns 403 FORBIDDEN — the value and the audio stay as they are, and the volume can still be changed in the Dubly web app. A request refused with 400, 403, 404 or 409 before anything is written is not counted, and neither is one whose save fails with 500. Once the new value is saved, the change counts even if the re-mix does not finish: if another change was re-mixing a language at the same moment, the request returns 409, and if the re-mix fails, 500 — in both cases the new value stays saved and the message says so. See [Edit limits](/guides/edit-limits). # Get lip-sync status and result URL Source: https://docs.dubly.ai/api-reference/lip-sync/get-lipsync /openapi.json get /api/v1/dubs/{id}/lipsync Check the current status of a lip-sync job. Returns "NotStarted" if lip-sync has never been triggered, "Processing" with the current pipeline step while running (step is one of "face_setup", "segmenting", "processing", "reconstructing"), "Synced" with the final video URL when complete, or "Error" if the job failed. An editor update of the dub resets a finished lip sync to "NotStarted". The URL is signed and valid for 7 days; call this endpoint again for a fresh one. The dub ID is passed as a path parameter and the target language as a query parameter. Works for a dub in any status. Read-only: nothing is counted, no credits are charged and there is no limit. # List the lip-sync blocks of one language Source: https://docs.dubly.ai/api-reference/lip-sync/get-lipsync-segments /openapi.json get /api/v1/dubs/{id}/lipsync/segments Returns the lip-sync blocks of one target language of a completed dub — the lip-sync track of the web app's visual editor — in track order, each with its id (what PATCH /api/v1/dubs/{id}/lipsync/segments takes), start and end in seconds and enabled (true: the block shows the lip-synced video; false: it shows the original video). On the language level it returns api_lipsync_applies_remaining, the API lip-sync applies this language has left. The blocks exist only for a finished lip sync: while the lip sync of the language is not "done" — never started, running, being re-assembled ("reconstructing") or failed — the request returns 409. Engine v1 only (capability supportsTimelineEditor): on any other engine the request returns 400. A dub that has not finished processing returns 400; an unknown dub, a dub of another account and a target_language the dub does not have return 404. Read-only: nothing is counted, no credits are charged and there is no limit. # Switch lip sync on or off per block Source: https://docs.dubly.ai/api-reference/lip-sync/patch-lipsync-segments /openapi.json patch /api/v1/dubs/{id}/lipsync/segments 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/{id}/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/{id}/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/{id}/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](/guides/edit-limits). # Start lip-sync for a subdub Source: https://docs.dubly.ai/api-reference/lip-sync/start-lipsync /openapi.json post /api/v1/dubs/{id}/lipsync Starts the lip-sync pipeline for one target language of a dub. The dub must already be fully processed (status "Dubbed") — this includes waiting for a re-render after an editor update (status "Updating"). Credits are charged at 1 credit per minute of video, rounded up (at least 1 credit). The job runs asynchronously — poll GET /api/v1/dubs/{id}/lipsync to retrieve the final URL once the status is "Synced". A language whose lip sync has finished ("Synced") can be started again. The new run is charged again, and before it starts, the previous lip-synced video of that language and its lip-sync blocks — including blocks switched with PATCH /api/v1/dubs/{id}/lipsync/segments — are deleted; until the new run is "Synced", the language has no lip-synced video. A language whose lip sync is already running or whose last run failed, and a language whose audio for lip sync is not available yet, return 409; without enough credits the request returns 403. A start refused with 400, 403, 404 or 409 charges nothing. If the lip-sync pipeline cannot be started once the credits are charged, the request returns 500, the credits stay charged and the lip sync of the language is marked as failed ("Error"), so every further start returns 409. There is no API limit on lip-sync runs — every run is paid in credits. # Get the burn-in state of one language Source: https://docs.dubly.ai/api-reference/subtitled-video/get-subtitled-video /openapi.json get /api/v1/dubs/{id}/subtitled-video Returns the burn-in state of one target language: status (null = never started, "aligning", "rendering", "ready" or "failed"), style and accent_color of the last run (accent_color is null for a style without an accent colour or when its default colour is used), error (only when "failed": what went wrong) and api_runs_remaining. Only when "ready" does the answer add download_url, download_file_name and download_expires_at, built like the "subtitled-video" entry of GET /api/v1/dubs/{id}/downloads: a signed URL valid until download_expires_at (1 hour after the request), or download_url null with download_error "video_corrupted" when the file fails the integrity check. Works for a dub in any status. An unknown dub, a dub of another account and a target_language the dub does not have return 404. Read-only: nothing is counted, no credits are charged and there is no limit. # Burn subtitles into the video of one language Source: https://docs.dubly.ai/api-reference/subtitled-video/start-subtitled-video /openapi.json post /api/v1/dubs/{id}/subtitled-video Starts burning subtitles into the video of one target language of a completed dub — the same burn-in as on the dub page of the web app. The base is the lip-sync video when the lip sync of this language is finished ("Synced"), otherwise the final dubbed video. The run is asynchronous: the answer's status is "aligning" (the words are timed first) or "rendering". Poll GET /api/v1/dubs/{id}/subtitled-video until it is "ready", then download the file there or via GET /api/v1/dubs/{id}/downloads. A language whose burn-in is "ready" or "failed" can be started again; that is a new run. A dub that has not finished processing, a language without a base video, an unknown style and an invalid accent_color return 400. While a burn-in is already running for this language ("aligning" or "rendering") or a review of the language is in progress, the request returns 409 and starts nothing. Every run that actually starts costs one of the language's 2 API burn-ins; once they are used up, the next start returns 403 FORBIDDEN, starts nothing and leaves the status as it is — burning in subtitles is still possible in the Dubly web app. A start refused with 400, 403, 404 or 409, or one that fails with 500, is not counted. See [Edit limits](/guides/edit-limits). No credits are charged. # Authentication Source: https://docs.dubly.ai/authentication Send your API token as a Bearer token with every request. All API requests must include a Bearer token in the `Authorization` header: ```text theme={null} Authorization: Bearer YOUR_API_TOKEN ``` A request without a token, or with an unknown or revoked one, is refused with `UNAUTHORIZED` — see [Errors](/guides/errors). ## Create a token **1. Open the API settings** Sign in to the Dubly web app and open **Settings → API**. **2. Generate a token** Click **Generate new token** and give it a name that tells you where it is used, e.g. *Production* or *CI/CD*. **3. Copy it now** Copy the token right away and store it somewhere safe. You won't be able to see it again. A token gives access to the dubs, projects and custom voices of your account. Keep it secret: out of client-side code and out of version control. **Settings → API** lists your tokens with when they were created and last used. **Revoke** a token you no longer need — any application using it loses access. ## Base URL ```text theme={null} https://app.dubly.ai ``` ## Try your token ```bash theme={null} curl -X GET https://app.dubly.ai/api/v1/projects \ -H "Authorization: Bearer YOUR_API_TOKEN" ``` A valid token answers with the projects of your account — see [`GET /api/v1/projects`](/api-reference/account/list-projects). In the **API Reference** tab, paste the token into the Bearer field of the playground to send requests right from the docs. # Dub status lifecycle Source: https://docs.dubly.ai/guides/dub-status What each dub status means, and how long result links stay valid. A dub runs in the background after you create it. `GET /api/v1/dubs/{id}` reports where it stands in `status`: | Status | Meaning | `url` | | - | - | - | | `Processing` | The dub is being created — download, transcription, translation, voices, rendering. | — | | `Dubbed` | The dub is finished. | One link to the final video per target language | | `Updating` | The dub is being re-rendered after an update in the editor, or re-mixed after a change of the original-voice volume. | — | | `Error` | The dub failed. | — | ```mermaid theme={null} flowchart LR Processing --> Dubbed Processing --> Error Dubbed -- "Update" --> Updating Dubbed -- "Volume change" --> Updating Updating --> Dubbed ``` Every answer, in every status, also carries `audio_settings`: `original_voice_volume_db` (the volume of the original voice under the dubbed one, in dB), `adjustable` (whether the original-voice volume can be changed for this dub — always `false` for a dub created through the API, which cannot keep the original voice yet) and `api_changes_remaining` (API volume changes left for this dub; `null` if it cannot be read at the moment — the rest of the answer is unaffected). ```json Processing theme={null} { "status": "success", "response": { "status": "Processing", "audio_settings": { "original_voice_volume_db": -20, "adjustable": false, "api_changes_remaining": 2 } } } ``` ```json Updating theme={null} { "status": "success", "response": { "status": "Updating", "audio_settings": { "original_voice_volume_db": -20, "adjustable": false, "api_changes_remaining": 2 } } } ``` ```json Dubbed theme={null} { "status": "success", "response": { "status": "Dubbed", "url": [ "https://...amazonaws.com/.../final_video.mp4?X-Amz-Expires=604800&...", "https://...amazonaws.com/.../final_video.mp4?X-Amz-Expires=604800&..." ], "audio_settings": { "original_voice_volume_db": -20, "adjustable": false, "api_changes_remaining": 2 } } } ``` ```json Error theme={null} { "status": "success", "response": { "status": "Error", "audio_settings": { "original_voice_volume_db": -20, "adjustable": false, "api_changes_remaining": 2 } } } ``` ## After an update or a volume change An update — in the web app's editor, or through the API after you corrected segments — re-renders the dub. A change of the original-voice volume of a finished dub — in the web app, or with `PATCH /api/v1/dubs/{id}/audio-settings` — re-mixes its languages. While either runs, the status is `Updating` without URLs. Once the new version is ready, the status is `Dubbed` again, with URLs to the updated video. An update also resets a finished lip sync of that language: the lip-sync status is `NotStarted` again. Start the lip sync again once the dub is `Dubbed`. A volume change does not: the lip sync stays `Synced`, and its video is not re-made with the new volume. ## Result links While the status is `Dubbed`, `url` holds one signed link to the final video per target language. The links are valid for 7 days. Download the files instead of storing the links, and call [`GET /api/v1/dubs/{id}`](/api-reference/dubs/get-dub) again for fresh ones. The lip-sync video URL of [`GET /api/v1/dubs/{id}/lipsync`](/api-reference/lip-sync/get-lipsync) is signed and valid for 7 days as well. [`GET /api/v1/dubs/{id}/downloads`](/api-reference/dubs/get-dub-downloads) lists every file the Download tab of the web app offers for one language. Its links are valid for 1 hour — the same as a download in the web app — and stop working at `expires_at`: download the file, and call the endpoint again for a fresh link. > [!WARNING] > > Download the file, do not store the link. A stored link stops working when it expires — ask the API again for a fresh one. A deleted dub, or one of another account, answers `NOT_FOUND`. See [Errors](/guides/errors). # Edit limits Source: https://docs.dubly.ai/guides/edit-limits How often the API lets you edit, update, lip-sync and subtitle a dub. Editing a dub through the API, burning in subtitles and changing the original-voice volume charge no credits: * **Editing a dub:** [`GET /api/v1/dubs/{id}/segments`](/api-reference/dub-editing/get-dub-segments), [`PATCH /api/v1/dubs/{id}/segments`](/api-reference/dub-editing/patch-dub-segments), [`POST /api/v1/dubs/{id}/segments/timeline`](/api-reference/dub-editing/save-dub-timeline), [`POST /api/v1/dubs/{id}/segments/{segmentId}/regenerate`](/api-reference/dub-editing/regenerate-dub-segment), [`POST /api/v1/dubs/{id}/update`](/api-reference/dub-editing/start-dub-update), [`GET /api/v1/dubs/{id}/update`](/api-reference/dub-editing/get-dub-update), [`GET /api/v1/dubs/{id}/lipsync/segments`](/api-reference/lip-sync/get-lipsync-segments), [`PATCH /api/v1/dubs/{id}/lipsync/segments`](/api-reference/lip-sync/patch-lipsync-segments) * **Burning in subtitles:** [`POST /api/v1/dubs/{id}/subtitled-video`](/api-reference/subtitled-video/start-subtitled-video) * **Changing the original-voice volume:** [`PATCH /api/v1/dubs/{id}/audio-settings`](/api-reference/dubs/patch-dub-audio-settings) In return, the API allows at most 2 edits per segment and 2 update rounds per language of a dub, 2 subtitle burn-ins per language and 2 original-voice volume changes per dub, and 2 lip-sync applies per language. The limits are fixed and the same for everyone. Downloads, renaming, moving and deleting a dub have no limit. | What is counted | Counted per | API limit | | - | - | - | | Edits — segment corrections, timeline saves and regenerates share them | segment | 2 | | Update rounds | language | 2 | | Lip-sync applies | language | 2 | | Subtitle burn-ins | language | 2 | | Original-voice volume changes | dub | 2 | ## What counts * **Edits:** every `PATCH /api/v1/dubs/{id}/segments` that actually changes a segment counts 1 for that segment, however many of its fields it changes. A segment re-translated into another language through `also_retranslate_languages` counts 1 for that language's segment. Entries reported as `"unchanged"` or `"failed"` do not count. * **Timeline saves and regenerates** count on the same edits: every segment in `updated` of `POST …/segments/timeline` that actually changes (start, length, speech rate, text or speaker) counts 1, at most 1 per segment and request; `"unchanged"` entries and deleted segments do not count. A segment in `created` starts with 1 edit used; after a split, both halves have the original's count + 1 — splitting never resets it. Every accepted `POST …/segments/{segmentId}/regenerate` counts 1 for that segment. * **Lip-sync applies:** every `PATCH /api/v1/dubs/{id}/lipsync/segments` that actually re-assembles the lip-sync video counts 1 for that language, on a counter of its own. A PATCH in which every block already has the requested value (`applied` false) does not count. * **Update rounds:** every language that `POST /api/v1/dubs/{id}/update` actually starts counts 1 for that language. `"nothing_to_apply"`, `"already_running"`, `"deferred"` and `"failed"` do not count. * **Subtitle burn-ins:** every run `POST /api/v1/dubs/{id}/subtitled-video` actually starts counts 1 for that language. A start that fails with a server error (5xx) does not count, and parallel starts never go over the limit. * **Original-voice volume changes:** every `PATCH /api/v1/dubs/{id}/audio-settings` that actually changes the value counts 1 for the dub. Sending the current value does not count, and neither does a change refused before anything is written or one whose save fails with a server error (5xx). Once the new value is saved, the change counts even if the request then fails: with `409` when another change was re-mixing a language at the same moment, with a server error (5xx) when the re-mix fails or after an unexpected error that may have left the value saved — the message says which. ## Only API calls count Edits, regenerates, updates, lip-sync blocks, burn-ins and volume changes in the Dubly web app are not counted, do not reset the counters, and are never blocked by a reached API limit. ## When a limit is reached A request that would go over a limit — for even one segment or language, or for the dub's volume changes — returns `403 FORBIDDEN`, naming the limit and the exhausted segments or languages. Nothing is changed or started and nothing is counted — all of it is still possible in the Dubly web app. A request that ends in `400`, `404` or `409` is not counted either — except a volume change whose new value was already saved (see [`PATCH /api/v1/dubs/{id}/audio-settings`](/api-reference/dubs/patch-dub-audio-settings)). ## What is left Every answer that can be limited tells you how much is left: * `api_edits_remaining` on every segment of `GET …/segments`, every result of `PATCH …/segments`, every created and updated entry of `POST …/segments/timeline` and in `POST …/regenerate` * `api_lipsync_applies_remaining` in `GET` and `PATCH …/lipsync/segments` * `api_update_rounds_remaining` in `GET …/segments`, `GET …/update` and every language result of `POST …/update` * `api_runs_remaining` in `POST` and `GET …/subtitled-video` * `api_changes_remaining` in `PATCH …/audio-settings` and in `audio_settings` of `GET /api/v1/dubs/{id}` ## Request size One PATCH carries at most 500 segments, one timeline save at most 500 entries in `created`, `updated` and `deleted` together (more returns `400`). Split larger corrections into several requests — that costs nothing extra, because the limit is counted per segment, not per request. # Errors Source: https://docs.dubly.ai/guides/errors The error envelope and what each error code means. Every answer is JSON in the same envelope. A successful request answers `{ "status": "success", "response": … }` with the payload in `response`: ```json theme={null} { "status": "success", "response": { ... } } ``` A failed request answers `{ "status": "error", "message": … }`: ```json theme={null} { "status": "error", "message": "Human-readable error message" } ``` The HTTP status tells you which error occurred. `message` says what went wrong, in English, for a person to read — don't branch on its text. ## Error codes | HTTP status | Code | Meaning | | - | - | - | | `400` | `BAD_REQUEST` | Missing or invalid request body, or validation failed. | | `401` | `UNAUTHORIZED` | Missing or invalid API token. | | `403` | `FORBIDDEN` | The token is valid, but the request is refused: your credits do not cover a new dub or a lip-sync run; the requested dubbing engine is not enabled for your account; or an API editing limit is reached (at most 2 API edits per segment and 2 API update rounds per language, 2 API subtitle burn-ins per language and 2 API original-voice volume changes per dub, and 2 API lip-sync applies per language; segment corrections, timeline saves and regenerates of a segment share its edits). Nothing is charged. A dub refused for its credits has already been created and gets status "Error"; otherwise nothing was changed or started, and nothing was counted. See [Edit limits](/guides/edit-limits). | | `404` | `NOT_FOUND` | The requested resource does not exist. | | `409` | `CONFLICT` | Conflicting state — e.g. lip-sync is already running for this subdub, or a previous lip-sync failed and must be restarted via support. When editing a dub: a review is in progress, an update or lip sync is running, a segment is being re-voiced, or a finished lip sync would be replaced without "reset_lipsync": true. When burning in subtitles: a burn-in is already running for that language, or its review is in progress. When changing the original-voice volume: a language of the dub is being updated or in review. When switching lip-sync blocks: the lip sync of the language is running or not finished, or its block files have been cleaned up. Nothing was changed or started. | | `500` | `INTERNAL_ERROR` | An unexpected server error occurred. | The page of each endpoint in the **API Reference** tab lists when that endpoint answers with which code. `FORBIDDEN` also answers a request that would go over one of the API's edit limits — see [Edit limits](/guides/edit-limits). # Supported target languages Source: https://docs.dubly.ai/guides/supported-languages The language codes you can dub into, per dubbing engine. Use these BCP 47 codes in the `target_languages` array when you create a dub. Which of them a dub can use depends only on its dubbing engine, never on your account. The engine is set with the optional `engine` field when the dub is created, defaults to `v1` and cannot be changed afterwards. * `v1` (the default) offers all 78 codes. * `v2` offers 70 of the 78 codes. A dub answers `400 BAD_REQUEST` for a code its engine does not offer — when it is created, and in [`POST /api/v1/dubs/{id}/lipsync`](/api-reference/lip-sync/start-lipsync) for `target_language`. Nothing is created and no credits are charged. | Code | Language | `v1` | `v2` | | - | - | - | - | | `af` | Afrikaans | ✓ | ✓ | | `ar` | Arabic | ✓ | ✓ | | `hy` | Armenian | ✓ | ✓ | | `as` | Assamese | ✓ | ✓ | | `az` | Azerbaijani | ✓ | ✓ | | `be` | Belarusian | ✓ | ✓ | | `bn` | Bengali | ✓ | — | | `bs` | Bosnian | ✓ | ✓ | | `bg` | Bulgarian | ✓ | ✓ | | `ca` | Catalan | ✓ | ✓ | | `ceb` | Cebuano | ✓ | ✓ | | `ny` | Chichewa | ✓ | — | | `zh` | Chinese | ✓ | ✓ | | `hr` | Croatian | ✓ | ✓ | | `cs` | Czech | ✓ | ✓ | | `da` | Danish | ✓ | ✓ | | `nl` | Dutch | ✓ | ✓ | | `en` | English | ✓ | ✓ | | `et` | Estonian | ✓ | ✓ | | `fil` | Filipino | ✓ | ✓ | | `fi` | Finnish | ✓ | ✓ | | `fr` | French | ✓ | ✓ | | `gl` | Galician | ✓ | ✓ | | `ka` | Georgian | ✓ | ✓ | | `de` | German | ✓ | ✓ | | `el` | Greek | ✓ | ✓ | | `gu` | Gujarati | ✓ | ✓ | | `ha` | Hausa | ✓ | ✓ | | `he` | Hebrew | ✓ | ✓ | | `hi` | Hindi | ✓ | ✓ | | `hu` | Hungarian | ✓ | ✓ | | `is` | Icelandic | ✓ | ✓ | | `id` | Indonesian | ✓ | ✓ | | `ga` | Irish | ✓ | — | | `it` | Italian | ✓ | ✓ | | `ja` | Japanese | ✓ | ✓ | | `jv` | Javanese | ✓ | ✓ | | `kn` | Kannada | ✓ | ✓ | | `kk` | Kazakh | ✓ | ✓ | | `ko` | Korean | ✓ | ✓ | | `ky` | Kyrgyz | ✓ | ✓ | | `lv` | Latvian | ✓ | ✓ | | `ln` | Lingala | ✓ | — | | `lt` | Lithuanian | ✓ | ✓ | | `lb` | Luxembourgish | ✓ | — | | `mk` | Macedonian | ✓ | ✓ | | `ms` | Malay | ✓ | ✓ | | `ml` | Malayalam | ✓ | ✓ | | `mr` | Marathi | ✓ | ✓ | | `ne` | Nepali | ✓ | ✓ | | `no` | Norwegian (Bokmål) | ✓ | ✓ | | `ps` | Pashto | ✓ | — | | `fa` | Persian | ✓ | ✓ | | `pl` | Polish | ✓ | ✓ | | `pt` | Portuguese | ✓ | ✓ | | `pa` | Punjabi | ✓ | ✓ | | `ro` | Romanian | ✓ | ✓ | | `ru` | Russian | ✓ | ✓ | | `sr` | Serbian | ✓ | — | | `sd` | Sindhi | ✓ | ✓ | | `sk` | Slovak | ✓ | ✓ | | `sl` | Slovenian | ✓ | ✓ | | `so` | Somali | ✓ | — | | `es` | Spanish | ✓ | ✓ | | `sw` | Swahili | ✓ | ✓ | | `sv` | Swedish | ✓ | ✓ | | `ta` | Tamil | ✓ | ✓ | | `te` | Telugu | ✓ | ✓ | | `th` | Thai | ✓ | ✓ | | `tr` | Turkish | ✓ | ✓ | | `uk` | Ukrainian | ✓ | ✓ | | `ur` | Urdu | ✓ | ✓ | | `vi` | Vietnamese | ✓ | ✓ | | `cy` | Welsh | ✓ | ✓ | | `en-GB` | English (UK) | ✓ | ✓ | | `en-US` | English (USA) | ✓ | ✓ | | `es-419` | Spanish (Latin American) | ✓ | ✓ | | `es-ES` | Spanish (Peninsular) | ✓ | ✓ | # Introduction Source: https://docs.dubly.ai/index Create, edit and download AI-dubbed videos with the Dubly API. The Dubly API lets your own code do what the Dubly web app does: start a dub from a YouTube video, a Google Drive file or a public video URL, follow it until it is finished, correct its segments, add lip sync or burned-in subtitles, and download the results. > [card] [Quickstart](/quickstart) > > Create an API token, start your first dub and download the result. > [card] [Authentication](/authentication) > > Send your API token as a Bearer token with every request. > [card] [Dub status lifecycle](/guides/dub-status) > > What each dub status means and how long result links stay valid. > [card] [Errors](/guides/errors) > > The error envelope and what each error code means. > [card] [Edit limits](/guides/edit-limits) > > How many edits, updates and burn-ins the API allows per dub. > [card] [Supported target languages](/guides/supported-languages) > > The language codes you can dub into, per dubbing engine. ## Base URL Every endpoint path in this documentation is relative to: ```text theme={null} https://app.dubly.ai ``` ## Response format All responses follow the same envelope format. A successful request carries its payload in `response`; a failed one carries a human-readable `message` — see [Errors](/guides/errors). ```json Success theme={null} { "status": "success", "response": { ... } } ``` ```json Error theme={null} { "status": "error", "message": "Human-readable error message" } ``` ## API reference The **API Reference** tab documents every endpoint with its parameters, responses and errors, and lets you send requests right from the page with your token. Its sections: **Create dubs** — Start a dub from a YouTube video, a Google Drive file or a public video URL. * [`POST /api/v1/dubs/youtube`](/api-reference/create-dubs/create-dub-youtube) — Create a dub from a YouTube video * [`POST /api/v1/dubs/google-drive`](/api-reference/create-dubs/create-dub-google-drive) — Create a dub from a Google Drive video * [`POST /api/v1/dubs/url`](/api-reference/create-dubs/create-dub-url) — Create a dub from a video URL **Dubs** — Read a dub's status and results, rename, move or delete it, list its downloads and set the original-voice volume. * [`GET /api/v1/dubs/{id}`](/api-reference/dubs/get-dub) — Get dub status and result URLs * [`PATCH /api/v1/dubs/{id}`](/api-reference/dubs/patch-dub) — Rename a dub or move it to a project * [`DELETE /api/v1/dubs/{id}`](/api-reference/dubs/delete-dub) — Delete a dub permanently * [`GET /api/v1/dubs/{id}/downloads`](/api-reference/dubs/get-dub-downloads) — List the downloads of one language * [`PATCH /api/v1/dubs/{id}/audio-settings`](/api-reference/dubs/patch-dub-audio-settings) — Change the volume of the original voice **Dub editing** — Read and correct segments, edit the timeline, re-voice a segment and apply the changes with an update. See [Edit limits](/guides/edit-limits). * [`GET /api/v1/dubs/{id}/segments`](/api-reference/dub-editing/get-dub-segments) — List the segments of one language * [`PATCH /api/v1/dubs/{id}/segments`](/api-reference/dub-editing/patch-dub-segments) — Correct segments of one language * [`POST /api/v1/dubs/{id}/segments/timeline`](/api-reference/dub-editing/save-dub-timeline) — Save timeline edits of one language * [`POST /api/v1/dubs/{id}/segments/{segmentId}/regenerate`](/api-reference/dub-editing/regenerate-dub-segment) — Re-voice one segment * [`POST /api/v1/dubs/{id}/update`](/api-reference/dub-editing/start-dub-update) — Apply pending edits and re-render * [`GET /api/v1/dubs/{id}/update`](/api-reference/dub-editing/get-dub-update) — Get the render state of one language **Lip sync** — Start lip sync for a language, follow its progress and switch lip sync per block. * [`POST /api/v1/dubs/{id}/lipsync`](/api-reference/lip-sync/start-lipsync) — Start lip-sync for a subdub * [`GET /api/v1/dubs/{id}/lipsync`](/api-reference/lip-sync/get-lipsync) — Get lip-sync status and result URL * [`GET /api/v1/dubs/{id}/lipsync/segments`](/api-reference/lip-sync/get-lipsync-segments) — List the lip-sync blocks of one language * [`PATCH /api/v1/dubs/{id}/lipsync/segments`](/api-reference/lip-sync/patch-lipsync-segments) — Switch lip sync on or off per block **Subtitled video** — Burn subtitles into the video of a language and fetch the result. * [`POST /api/v1/dubs/{id}/subtitled-video`](/api-reference/subtitled-video/start-subtitled-video) — Burn subtitles into the video of one language * [`GET /api/v1/dubs/{id}/subtitled-video`](/api-reference/subtitled-video/get-subtitled-video) — Get the burn-in state of one language **Account** — List the projects and custom voices of your account. * [`GET /api/v1/projects`](/api-reference/account/list-projects) — List your projects * [`GET /api/v1/custom-voices`](/api-reference/account/list-custom-voices) — List your custom voices # Quickstart Source: https://docs.dubly.ai/quickstart Create an API token, start your first dub and download the result. **1. Create an API token** In the Dubly web app, open **Settings → API** and click **Generate new token**. Give it a name and copy it right away — you won't be able to see it again. Every request sends the token in the `Authorization` header. See [Authentication](/authentication). **2. Create a dub** Start a dub with [`POST /api/v1/dubs/youtube`](/api-reference/create-dubs/create-dub-youtube): send the YouTube link, the language of the video and the languages to dub it into. ```bash theme={null} curl -X POST https://app.dubly.ai/api/v1/dubs/youtube \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "yt_link": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "source_language": "en", "target_languages": ["de", "fr"], "title": "My first dub" }' ``` The answer carries the ID of the new dub: ```json Response theme={null} { "status": "success", "response": { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } } ``` The dub runs in the background. Keep its `id`. **3. Check its status** Ask [`GET /api/v1/dubs/{id}`](/api-reference/dubs/get-dub) for the dub's status: ```bash theme={null} curl -X GET https://app.dubly.ai/api/v1/dubs/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \ -H "Authorization: Bearer YOUR_API_TOKEN" ``` ```json Processing theme={null} { "status": "success", "response": { "status": "Processing", "audio_settings": { "original_voice_volume_db": -20, "adjustable": false, "api_changes_remaining": 2 } } } ``` ```json Dubbed theme={null} { "status": "success", "response": { "status": "Dubbed", "url": [ "https://...amazonaws.com/.../final_video.mp4?X-Amz-Expires=604800&...", "https://...amazonaws.com/.../final_video.mp4?X-Amz-Expires=604800&..." ], "audio_settings": { "original_voice_volume_db": -20, "adjustable": false, "api_changes_remaining": 2 } } } ``` The status is `Processing` until the dub is finished. Call the endpoint again until it is `Dubbed` — or `Error` if the dub failed. [Dub status lifecycle](/guides/dub-status) explains every status. **4. Download the result** Once the status is `Dubbed`, `url` holds one link to the final video per target language. Download the files — the links are valid for 7 days, so don't store them; call the status endpoint again for fresh ones. For the other files of a language — the audio tracks, the lip-sync or the subtitled video — use the downloads endpoint; its links are valid for 1 hour. See [Dub status lifecycle](/guides/dub-status#result-links). ## Next steps > [card] [Errors](/guides/errors) > > What a failed request answers. > [card] [Edit limits](/guides/edit-limits) > > Correct segments and re-render a dub through the API.