translate audio for preview
translation-previews_createStart a paid job that translates a saved audio asset into a target language, producing reviewable translated audio before a separate lip-sync.
Instructions
Start one paid job that translates a saved audio asset's speech into another language, producing translated audio the user can review before a separate lip-sync. Use it when the user wants to hear the translation first or place the audio on a timeline; for a finished dubbed video in one step use dubbing_create, and for speech from a script use speech-previews_create. Confirm the source audio, target language and the translation-previews_estimate quote with the user first. It needs a project: for new work call projects_create (defaultWorkflow translate_and_dub) and pass that id with projectIntent=explicit; use an existing project only when the user explicitly selected it, never because of a matching name or open editor. Persist one UUID idempotencyKey before calling and, after an uncertain response, resend the identical request with it; a new key bills again. Returns the job (id, status, outputMediaUrl once done, error, recoveryRequired); follow it with translation-previews_get wait: true, or jobs_wait kind translation_preview when available. Never translate again because attaching the output failed or recoveryRequired is true. Lip-syncing the translated audio is a separate, explicitly approved lipsync_create or lipsync_create-timeline call, not dubbing_create.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project for the job: one just created with projects_create for this request, or one the user explicitly selected; pass projectIntent=explicit with it. Use the same id for translation-previews_get. | |
| sourceLang | No | Optional and usually omitted: the source language is detected (sent as auto). | |
| targetLang | Yes | Language code to translate into, from dubbing_get-options targetLanguages (for example es or pt-BR). | |
| audioAssetId | Yes | Saved AUDIO asset to translate, such as one from assets_create (type=AUDIO), assets_list or audio-trims_create; the same asset you quoted with translation-previews_estimate. | |
| projectIntent | No | Required with projectId. Set only for an explicit user project selection/update, or the new project just created for this request. Never infer intent from a matching project name, workflow name or active editor. | |
| idempotencyKey | Yes | A new UUID saved before the call. Reuse it with identical input only to recover an uncertain response. | |
| organizationId | No | Run only this call in another of the user’s Sync organizations, by id from organizations_list, when the user asks for it (for example “generate this in the Acme org”). The session keeps its organization; reads of the ids this call returns stay in this organization. Omit to use the session’s organization. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||