Create language target

Add a language to dub a project into, and queue the dub. This is the call that produces dubbed audio, and it is billed per generation. The target is created `queued` and starts as soon as the project is `ready`, so it can be added at any point after the project is created. It inherits the project's dubbing model and cannot pick another. A project created with `webhook_ids` sends a `dubbing_language_completed` event carrying the output download URLs, so we recommend subscribing rather than polling this target to completion.

Path parameters

project_idstringRequired
Identifier of the parent dubbing project.

Headers

xi-api-keystringOptional

Request

This endpoint expects an object.
target_languagestringRequired

BCP-47 language tag to dub the project into (for example, fr or es-MX). Must be one of the languages the project’s dubbing model supports, and a region-qualified tag must be one of the supported dialects.

voice_settingsobject or nullOptional
Voice settings applied to every speaker in this language. Omit to use the defaults.
translationsmap from strings to strings or nullOptional

Enterprise only. Optional translations to use instead of machine translation. A map from each source segment’s external_id (or its id, if you supplied none) to the translated text; every source segment must be covered exactly once. At most 20,000 entries, totaling at most 4 MiB of text. See Bring your own transcript.

Response

Successful Response
language_idstring
Unique identifier of the language target.
project_idstring
Identifier of the parent dubbing project.
target_languagestring

BCP-47 language tag this target is dubbed into.

statusenum

Lifecycle status: queued (waiting on the project to be ready, or on a worker), processing while it is being dubbed, completed once its output is available, stale when the transcript changed after the output was produced, or failed.

revisioninteger

Monotonic counter incremented whenever this target’s transcript changes (a source edit affecting it, or an edit to its translation).

created_atstringformat: "date-time"
When the language target was created.
updated_atstringformat: "date-time"
When the language target was last updated.
model_idstring or nullOptional
Dubbing model this target is dubbed with, inherited from the project and not selectable per language.
voice_settingsobject or nullOptional
Voice settings applied to every speaker in this language, or null if the defaults apply.
outputsobject or nullOptional

Signed output URLs; null until the target has produced an output (present once completed, and kept while stale — compare output_revision against revision to tell whether the output is up to date).

output_revisioninteger or nullOptional

The revision the current dubbed output was generated from; equal to revision when up to date, and lower when stale. This is null until a generation has completed.

errorobject or nullOptional

Why this language failed; null unless status is failed, and also null for the few languages that failed before failure reporting was introduced. A code of project_failed means the parent project failed, so read the project for the underlying cause.

warningslist of objectsOptional

Non-fatal conditions raised while dubbing this language, empty when there are none. Reflects the latest generation. Conditions raised while preparing the source are reported on the project instead.

Errors

422
Unprocessable Entity Error