> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.synthesia.io/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.synthesia.io/docs/_mcp/server.

# Create a localization from a media URL

POST https://developers.synthesia.io/api/localizations/from-media-url
Content-Type: application/json

Start localizing a video from a URL. Poll `GET /localizations/{localization_id}` until `done` is true.

**Required scope:** [`localization:write`](https://developers.synthesia.io/docs/scopes) (in Studio: Localization (write))

Reference: https://developers.synthesia.io/docs/api-reference/localization/create-localization-from-media-url

## Authentication

- `Authorization` header (bearer token, required) — Your Synthesia API key. * Send it as `Authorization: Bearer <key>`; a bare key also works. * An endpoint that needs a scope names it in its description; [Scopes](https://developers.synthesia.io/docs/scopes) lists them all. * A `:write` scope also satisfies the same resource's `:read`. * Without the scope, the request fails with a 403 `insufficient_scope`.

## Request

### Body (application/json)

This endpoint expects a CreateLocalizationFromMediaUrl.

- `mediaUrl` (string, required) — A presigned S3 HTTPS URL for the video to localize, with the bucket in the host (`https://<bucket>.s3.<region>.amazonaws.com/...`). Other URLs are not supported yet.
- `title` (string, required) — The title of the localized video.
- `sourceLanguage` (string, required) — The language spoken in the video, from `GET /localizations/languages?supports=dubbing_source`, or `auto` to detect it.
- `targetLanguages` (list of string, required) — The languages to localize into, from `GET /localizations/languages?supports=dubbing_target`. Each language once.
- `lipsyncEnabled` (boolean, optional, default: true) — Whether to lip-sync the localized videos. Lip-sync costs extra credit and needs a plan that includes it: without it, adding locales is refused, and a new localization fails once processed.
- `burnedInCaptionsEnabled` (boolean, optional, default: false) — Whether to burn captions into the localized videos.
- `videoDuration` (enum, optional) — `adaptive` adjusts the video's speed to fit the translation; `original` keeps the source's duration.
  - Allowed values: `adaptive`, `original`
- `visibility` (enum, optional) — Who can view the localized videos.
  - Allowed values: `private`, `public`

## Response

### 202

Successful Response

- `id` (string, required) — The localization id, prefixed `l10n_…`.
- `status` (enum, required) — `queued` while the source video is fetched, `processing` once localization starts, then `completed` or `failed`.
  - Allowed values: `queued`, `processing`, `completed`, `failed`, `canceled`
- `error` (Problem, required, nullable) — Why the localization failed. Branch on its `code`: `moderation` or `processing_error`. More codes may be added. Null unless the status is `failed`.
- `createdAt` (datetime, required, nullable) — Null until the source video is imported.
- `done` (boolean, required) — True once `status` is terminal, whatever the outcome. Poll until it is true, then read `status`.

## Errors

### 400 Bad Request Error

The request is invalid, a language code is unknown, or `mediaUrl` is not a presigned S3 URL (validation_error).

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 401 Unauthorized Error

Unauthenticated

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 403 Forbidden Error

Insufficiently scoped or forbidden

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 413 Content Too Large Error

Payload too large

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 415 Unsupported Media Type Error

Unsupported media type

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 429 Too Many Requests Error

Rate limited

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 500 Internal Server Error

Internal error

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 503 Service Unavailable Error

Service unavailable

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 504 Gateway Timeout Error

Upstream timeout

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

## Types

### Problem

An error response in RFC 9457 Problem Details format.

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

## Examples

**Request**

```json
{
  "mediaUrl": "https://my-bucket.s3.amazonaws.com/onboarding.mp4?X-Amz-Signature=...",
  "title": "Product onboarding",
  "sourceLanguage": "en-US",
  "targetLanguages": [
    "es-ES",
    "fr-FR"
  ],
  "lipsyncEnabled": true,
  "burnedInCaptionsEnabled": false
}
```

**Response**

```json
{
  "id": "string",
  "status": "queued",
  "error": {
    "type": "string",
    "title": "string",
    "status": 1,
    "code": "string",
    "detail": "string",
    "features": [
      "string"
    ],
    "instance": "string",
    "requestId": "string"
  },
  "createdAt": "2024-01-15T09:30:00Z",
  "done": true
}
```

**SDK Code**

```python Create a localization from a media URL
import requests

url = "https://developers.synthesia.io/api/localizations/from-media-url"

payload = {
    "mediaUrl": "https://my-bucket.s3.amazonaws.com/onboarding.mp4?X-Amz-Signature=...",
    "title": "Product onboarding",
    "sourceLanguage": "en-US",
    "targetLanguages": ["es-ES", "fr-FR"],
    "lipsyncEnabled": True,
    "burnedInCaptionsEnabled": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create a localization from a media URL
const url = 'https://developers.synthesia.io/api/localizations/from-media-url';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"mediaUrl":"https://my-bucket.s3.amazonaws.com/onboarding.mp4?X-Amz-Signature=...","title":"Product onboarding","sourceLanguage":"en-US","targetLanguages":["es-ES","fr-FR"],"lipsyncEnabled":true,"burnedInCaptionsEnabled":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create a localization from a media URL
package main

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

func main() {

	url := "https://developers.synthesia.io/api/localizations/from-media-url"

	payload := strings.NewReader("{\n  \"mediaUrl\": \"https://my-bucket.s3.amazonaws.com/onboarding.mp4?X-Amz-Signature=...\",\n  \"title\": \"Product onboarding\",\n  \"sourceLanguage\": \"en-US\",\n  \"targetLanguages\": [\n    \"es-ES\",\n    \"fr-FR\"\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 Create a localization from a media URL
require 'uri'
require 'net/http'

url = URI("https://developers.synthesia.io/api/localizations/from-media-url")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"mediaUrl\": \"https://my-bucket.s3.amazonaws.com/onboarding.mp4?X-Amz-Signature=...\",\n  \"title\": \"Product onboarding\",\n  \"sourceLanguage\": \"en-US\",\n  \"targetLanguages\": [\n    \"es-ES\",\n    \"fr-FR\"\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}"

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

```java Create a localization from a media URL
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://developers.synthesia.io/api/localizations/from-media-url")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"mediaUrl\": \"https://my-bucket.s3.amazonaws.com/onboarding.mp4?X-Amz-Signature=...\",\n  \"title\": \"Product onboarding\",\n  \"sourceLanguage\": \"en-US\",\n  \"targetLanguages\": [\n    \"es-ES\",\n    \"fr-FR\"\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}")
  .asString();
```

```php Create a localization from a media URL
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://developers.synthesia.io/api/localizations/from-media-url', [
  'body' => '{
  "mediaUrl": "https://my-bucket.s3.amazonaws.com/onboarding.mp4?X-Amz-Signature=...",
  "title": "Product onboarding",
  "sourceLanguage": "en-US",
  "targetLanguages": [
    "es-ES",
    "fr-FR"
  ],
  "lipsyncEnabled": true,
  "burnedInCaptionsEnabled": false
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Create a localization from a media URL
using RestSharp;

var client = new RestClient("https://developers.synthesia.io/api/localizations/from-media-url");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"mediaUrl\": \"https://my-bucket.s3.amazonaws.com/onboarding.mp4?X-Amz-Signature=...\",\n  \"title\": \"Product onboarding\",\n  \"sourceLanguage\": \"en-US\",\n  \"targetLanguages\": [\n    \"es-ES\",\n    \"fr-FR\"\n  ],\n  \"lipsyncEnabled\": true,\n  \"burnedInCaptionsEnabled\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create a localization from a media URL
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "mediaUrl": "https://my-bucket.s3.amazonaws.com/onboarding.mp4?X-Amz-Signature=...",
  "title": "Product onboarding",
  "sourceLanguage": "en-US",
  "targetLanguages": ["es-ES", "fr-FR"],
  "lipsyncEnabled": true,
  "burnedInCaptionsEnabled": false
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://developers.synthesia.io/api/localizations/from-media-url")! 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()
```