Dub a video into other languages
localize_videoFull automatic dubbing of an uploaded video: transcribe once, translate, voice every target language with its own voice and render a dubbed video per language. Each language returns an audio_url (voice track aligned to the original timeline - upload it to YouTube Studio as a multi-language audio track) and a final_video_url. Takes several minutes: returns job_guids immediately; poll get_localization_status. Confirm the cost with estimate_video_localization for long videos. Several characters (drama, film, interview)? Set multi_speaker = true: speakers are detected on the whole video and each one can get its own voice - pass speaker_voices per target if you already know them, otherwise the job pauses with current_step WaitingSpeakerVoices and get_localization_status lists the speakers with sample lines; ask the user which voice fits each character, then call set_speaker_voices.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"video_url": "<video_url>",
"source_language": "<source_language>",
"targets": "<targets>"
},
"name": "localize_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targets | Yes | One entry per target language (the server allows 10 per job by default). | |
| video_url | Yes | public_url from create_upload_url. | |
| multi_speaker | No | Dub each character with its own voice. Speakers are detected on the whole video (labels 0, 1, 2... in order of appearance). | |
| source_language | Yes | Spoken language of the video, e.g. vi. | |
| speaker_voice_step | No | multi_speaker without speaker_voices: pause for voice choice after transcription (srt) or after translation (translated, shows translated sample lines). | srt |
| keep_original_voice | No | Keep the ORIGINAL voice in some parts instead of dubbing them (voice demos, cloned / AI voice samples, recordings played back, songs). Before the video is rendered, AI (Gemini Flash) picks those lines from the whole transcript and the dubbed video keeps the original audio there automatically. Costs a few extra credits, charged by tokens used. | |
| keep_original_instruction | No | With keep_original_voice: what to keep, in the user's words, e.g. 'keep the original voice in every voice demo'. Empty = voice demos, recordings and songs. | |
| original_audio_volume_percent | No | Keep the original sound (music/effects) under the new voice at this volume in the dubbed video. 0 = remove. |