> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt.
> For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Create Dubbing Job

POST https://api.sarvam.ai/dubbing/jobs
Content-Type: application/json

## Creative Agents - Dubbing

Create a dubbing job that translates a source video or audio file into one or more Indian languages, with optional voice cloning, watermark control, and translation-style (register) control.

**Base URL:** `https://api.sarvam.ai/dubbing`.
**Auth:** send your key in the `api-subscription-key` header, not `Authorization: Bearer`.

This call only creates the job. It does not accept the media file. The response returns `data.job_id` and a short-lived signed `data.upload_url`. After that:

1. `PUT` the raw media bytes to `upload_url` with headers `Content-Type: <mime>` (e.g. `video/mp4`) and `x-ms-blob-type: BlockBlob`.
2. `POST /jobs/{job_id}/start` to begin the pipeline.

A single job dubs into every language in `target_langs`, so you don't need a separate job per language.

Reference: https://docs.sarvam.ai/api-reference/creative-agents-dubbing/create-dub

## Authentication

- `api-subscription-key` header (required)

## Request

### Body (application/json)

- `src_lang` (enum, required) — Source language of the input media (BCP-47).
  - Allowed values: `en-IN`, `hi-IN`, `bn-IN`, `gu-IN`, `kn-IN`, `ml-IN`, `mr-IN`, `or-IN`, `pa-IN`, `ta-IN`, `te-IN`, `as-IN`
- `target_langs` (list of enum, required) — One or more target languages to dub into. A single job dubs into all of them.
  - Allowed values: `en-IN`, `hi-IN`, `bn-IN`, `gu-IN`, `kn-IN`, `ml-IN`, `mr-IN`, `or-IN`, `pa-IN`, `ta-IN`, `te-IN`, `as-IN`
- `export_options` (list of enum, optional) — Which formats to auto-produce per target language. When provided, only the listed formats are auto-exported. When omitted, the dubbed video, the isolated audio track, and an MP3 of that track are produced — but never SRT, which must be requested explicitly. Audio-only sources cannot produce a video, so `video` resolves to `audio` for them.
  - Allowed values: `video`, `audio`, `srt`
- `voice_cloning` (boolean, optional, default: true) — Clone the original speaker's voice. Set `false` to use a preset `voice_id` instead.
- `voice_id` (string, optional, nullable) — Preset (prebuilt) voice to use when `voice_cloning` is `false`. Single speaker only.
- `pace_preset` (enum, optional, nullable) — Speech pace preset, used when `voice_cloning` is false.
  - Allowed values: `slow`, `moderate`, `normal`, `fast`
- `num_speakers` (integer, optional, nullable, default: 1) — Number of speakers in the source audio.
- `disable_watermark` (boolean, optional, default: false) — Set `true` for a watermark-free export.
- `register` (enum, optional, nullable) — Translation-style / tone register.
  - Allowed values: `formal`, `common-indic`, `classic-colloquial`, `modern-colloquial`, `academic`, `auto`
- `editor_flow` (boolean, optional, default: false) — Keep `false` for API integrations so exports fire automatically once TTS finishes. When `true`, auto-export is suppressed: the pipeline completes but `export-status` stays empty until exports are triggered manually in Creator Studio. **Billing:** `true` charges the editor-flow rate (₹80/min on Starter — double the default API rate). See Pricing for plan-specific rates.
- `job_name` (string, optional, nullable) — Human-readable label to identify the job later. Recommended (e.g. the source file's name).

## Response

### 200

Successful Response

- `status` (string, required) — Response status, e.g. `success`.
- `message` (string, required)
- `data` (object, required)
  - `job_id` (string, required) — Unique identifier for the created dubbing job.
  - `upload_url` (string, required, nullable) — Short-lived signed URL. `PUT` the raw media bytes here with headers `Content-Type: <mime>` and `x-ms-blob-type: BlockBlob` before starting the job.
  - `expires_in_hours` (integer, required, nullable) — How long the signed upload URL(s) remain valid, in hours.
  - `processing_started` (boolean, required, default: false) — Whether processing has already begun for this job.
  - `voice_cloning` (boolean, required, default: true)
  - `srt_upload_url` (string, optional, nullable) — Signed URL to upload a source SRT file, when applicable.
  - `voice_id` (string, optional, nullable)
  - `pace_preset` (string, optional, nullable)
  - `model_tier` (string, optional, nullable) — Echo of the requested quality tier (`plus`/`lite`), or null when the service default was used.

## Examples

**Request**

```json
{
  "src_lang": "en-IN",
  "target_langs": [
    "hi-IN",
    "ta-IN",
    "te-IN"
  ],
  "export_options": [
    "video",
    "audio",
    "srt"
  ],
  "voice_cloning": true,
  "num_speakers": 1,
  "disable_watermark": true,
  "register": "modern-colloquial",
  "job_name": "segment1"
}
```

**Response**

```json
{
  "status": "success",
  "message": "Upload job created successfully",
  "data": {
    "job_id": "dub_5cb7faa6",
    "upload_url": "https://api.sarvam.ai/dubbing/uploads/dub_5cb7faa6?sig=...",
    "processing_started": false,
    "voice_cloning": true
  }
}
```

**SDK Code**

```typescript
import { SarvamAIClient } from "sarvamai";

async function main() {
    const client = new SarvamAIClient({
        apiSubscriptionKey: "YOUR_API_KEY_HERE",
    });
    await client.dubbing.create({
        source_language_code: "en-IN",
        target_language_codes: [
            "hi-IN",
            "ta-IN",
            "te-IN",
        ],
        export_options: [
            "video",
            "audio",
            "srt",
        ],
        voice_cloning: true,
        num_speakers: 1,
        disable_watermark: true,
        register: "modern-colloquial",
        job_name: "segment1",
    });
}
main();

```

```python
from sarvamai import SarvamAI

client = SarvamAI(
    api_subscription_key="YOUR_API_KEY_HERE",
)

client.dubbing.create(
    source_language_code="en-IN",
    target_language_codes=[
        "hi-IN",
        "ta-IN",
        "te-IN"
    ],
    export_options=[
        "video",
        "audio",
        "srt"
    ],
    voice_cloning=True,
    num_speakers=1,
    disable_watermark=True,
    register="modern-colloquial",
    job_name="segment1",
)

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sarvam.ai/dubbing/jobs"

	payload := strings.NewReader("{\n  \"src_lang\": \"en-IN\",\n  \"target_langs\": [\n    \"hi-IN\",\n    \"ta-IN\",\n    \"te-IN\"\n  ],\n  \"export_options\": [\n    \"video\",\n    \"audio\",\n    \"srt\"\n  ],\n  \"voice_cloning\": true,\n  \"num_speakers\": 1,\n  \"disable_watermark\": true,\n  \"register\": \"modern-colloquial\",\n  \"job_name\": \"segment1\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("api-subscription-key", "<apiSubscriptionKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sarvam.ai/dubbing/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["api-subscription-key"] = '<apiSubscriptionKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"src_lang\": \"en-IN\",\n  \"target_langs\": [\n    \"hi-IN\",\n    \"ta-IN\",\n    \"te-IN\"\n  ],\n  \"export_options\": [\n    \"video\",\n    \"audio\",\n    \"srt\"\n  ],\n  \"voice_cloning\": true,\n  \"num_speakers\": 1,\n  \"disable_watermark\": true,\n  \"register\": \"modern-colloquial\",\n  \"job_name\": \"segment1\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sarvam.ai/dubbing/jobs")
  .header("api-subscription-key", "<apiSubscriptionKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"src_lang\": \"en-IN\",\n  \"target_langs\": [\n    \"hi-IN\",\n    \"ta-IN\",\n    \"te-IN\"\n  ],\n  \"export_options\": [\n    \"video\",\n    \"audio\",\n    \"srt\"\n  ],\n  \"voice_cloning\": true,\n  \"num_speakers\": 1,\n  \"disable_watermark\": true,\n  \"register\": \"modern-colloquial\",\n  \"job_name\": \"segment1\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sarvam.ai/dubbing/jobs', [
  'body' => '{
  "src_lang": "en-IN",
  "target_langs": [
    "hi-IN",
    "ta-IN",
    "te-IN"
  ],
  "export_options": [
    "video",
    "audio",
    "srt"
  ],
  "voice_cloning": true,
  "num_speakers": 1,
  "disable_watermark": true,
  "register": "modern-colloquial",
  "job_name": "segment1"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'api-subscription-key' => '<apiSubscriptionKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sarvam.ai/dubbing/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("api-subscription-key", "<apiSubscriptionKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"src_lang\": \"en-IN\",\n  \"target_langs\": [\n    \"hi-IN\",\n    \"ta-IN\",\n    \"te-IN\"\n  ],\n  \"export_options\": [\n    \"video\",\n    \"audio\",\n    \"srt\"\n  ],\n  \"voice_cloning\": true,\n  \"num_speakers\": 1,\n  \"disable_watermark\": true,\n  \"register\": \"modern-colloquial\",\n  \"job_name\": \"segment1\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "api-subscription-key": "<apiSubscriptionKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "src_lang": "en-IN",
  "target_langs": ["hi-IN", "ta-IN", "te-IN"],
  "export_options": ["video", "audio", "srt"],
  "voice_cloning": true,
  "num_speakers": 1,
  "disable_watermark": true,
  "register": "modern-colloquial",
  "job_name": "segment1"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sarvam.ai/dubbing/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```