Skip to main content
POST
Translate and caption

Authorizations

Authorization
string
header
required

A workspace API key.

Body

application/json

Send exactly one source: either transcript or assetId, not both and not neither. Priced per language-minute of the transcript that results.

targetLanguages
string[]
required
Required array length: 1 - 20 elements
Required string length: 1 - 20
transcript
object

The transcript to translate. Send exactly one of transcript or assetId.

assetId
string

Translate a transcript this workspace has already had transcribed instead of sending one. Send exactly one of transcript or assetId. An asset in another workspace is reported as not found.

Required string length: 1 - 200
sourceLanguage
string

Source language. Required with assetId when no language was recorded for that asset — there is no default, because guessing would mis-translate a non-English asset silently.

Required string length: 1 - 20
dub
boolean
default:false
captionFormat
enum<string>
Available options:
srt,
vtt
voiceId
string
Maximum string length: 120
provider
string
Maximum string length: 60
context
string
Maximum string length: 4000
projectId
string

The project to file this work under. Optional: omit it and one is created for you, and its id comes back on the response — read it from there rather than assuming. Pass the same id across calls when you want the script, the render and the thumbnail to land in one container. A project this workspace does not own answers not_found; the work is never silently filed somewhere else.

Required string length: 1 - 200

Response

Success.

success
boolean
required
projectId
string
required

The project this work was filed under. Read it from here — a call that sent no projectId had one created, and this is where its id comes back.

Example:

"prj_9x2a4c"

credits
number
required

What this call actually cost, which is not always what was quoted.

Example:

300

localization
any
required

Per-language captions with the cue timing preserved, plus dubbed audio if asked.

languageMinutes
number
required

What was billed: languages multiplied by transcript minutes.

creditBalance
number

Your balance after the charge. Absent when billing is disabled for the workspace.

Example:

3900

{key}
any