> For the documentation index, fetch https://sync.so/docs/llms.txt. Append .md to a page URL for Markdown. Documentation-search MCP: https://sync.so/docs/_mcp/server.

# Dubbing

> Translate a video's audio into another language and lipsync to the dubbed audio in a single API call.

Dubbing is supported natively on `POST /v2/generate`. Pass the `dubParams` object alongside your normal generation request and Sync Labs will extract audio from the video input, dub it into the target language, and run lipsync on the dubbed result — all as one job.

> **Note**
>
> A video with audio is sufficient for dubbing to work — video input alone (with an embedded audio track) is acceptable. You do not need to supply a separate audio input; any audio inputs in the `input` array are ignored when `dubParams` is present. You must pass the dub parameters (`dubParams`) to enable dubbing.

## When to use dubbing

* **Native `dubParams` flow (this page)**: single API call, recommended for standard translation-plus-lipsync workflows.
* **Manual orchestration**: when you need custom control over transcription, TTS voice cloning, or intermediate steps, see the [Translation/Dubbing tutorial](/docs/tutorials/translation) which wires ElevenLabs, OpenAI, and Sync Labs together manually.

## Workflow

#### Prepare a video with audio

Ensure your source file is a video whose audio track you want translated. No separate audio input is required.

#### Pick a target language

Choose one of the supported `targetLang` codes (see the [`DubLanguage`](/api-reference/api/generate-api/create#request.body.dubParams.targetLang) enum in the API Reference for the full list).

#### Send the generation request

Include `dubParams` in the request body. `providerName` and `targetLang` are required; `sourceLang` defaults to `auto`.

#### Poll for completion

Poll `GET /v2/generate/{id}` until `status` is `COMPLETED`; the `outputUrl` will contain the dubbed and lipsynced video.

## DubDto fields

See the full API reference for [`dubParams`](/api-reference/api/generate-api/create#request.body.dubParams).

* `providerName` (`DubProviderName`, required): dubbing provider to use. Currently `elevenlabs` is the only supported value.
* `targetLang` (`DubLanguage`, required): target language code for dubbing, e.g. `es`, `fr`, `ja`.
* `sourceLang` (`DubSourceLanguage`, optional, default `auto`): source language code, or `auto` to let the engine detect it.
* `numSpeakers` (`integer`, optional): deprecated and ignored — Dubbing v2 detects speakers automatically. Accepted for backward compatibility only.

If you need a target language that is not listed in `DubLanguage`, generate or record the translated audio yourself and submit it as a normal `audio` input instead of using `dubParams`. Lipsync models can match clear audio in any language.

## Request examples

#### TypeScript SDK

```typescript
import { SyncClient } from "@sync.so/sdk";

const sync = new SyncClient();

const response = await sync.generations.create({
  model: "lipsync-2",
  input: [
    { type: "video", url: "https://assets.sync.so/docs/example-video.mp4" }
  ],
  dubParams: {
    providerName: "elevenlabs",
    targetLang: "es"
  }
});
```

#### Python SDK

```python
from sync import Sync

client = Sync()

response = client.generations.create(
    model="lipsync-2",
    input=[
        {"type": "video", "url": "https://assets.sync.so/docs/example-video.mp4"}
    ],
    dub_params={
        "provider_name": "elevenlabs",
        "target_lang": "es"
    },
)
```

#### cURL (HTTP)

```bash
curl -X POST https://api.sync.so/v2/generate \
  -H "x-api-key: $SYNC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lipsync-2",
    "input": [
      { "type": "video", "url": "https://assets.sync.so/docs/example-video.mp4" }
    ],
    "dubParams": {
      "providerName": "elevenlabs",
      "targetLang": "es"
    }
  }'
```

## Behavior notes

* When `dubParams` is provided, audio is extracted from the video input, dubbed via ElevenLabs into the target language, and lipsync is run against the dubbed audio.
* Any audio inputs in the `input` array are ignored when dubbing is enabled — pass only the video input.
* A probed audio duration is required on the source video; dubbing requests without a decodable audio track are rejected.
* Billing is reported per dubbed output minute. See the [Billing](/docs/product/billing) page for details.

## See also

* [Models → Lipsync](/docs/models/lipsync) — underlying lipsync model used after dubbing.
* [Translation/Dubbing tutorial](/docs/tutorials/translation) — legacy multi-service orchestration with fine-grained control.