Skip to main content
POST
captions

Authorizations

Authorization
string
header
required

An API key (es_live_…) from Settings, under API keys, or an OAuth access token.

Headers

Idempotency-Key
string

Retry a paid dispatch safely: the same key returns the job already dispatched instead of charging again.

x-workspace-id
string

The workspace this one call acts in, when it is not the key's own.

Body

application/json
action
enum<string>
required
Available options:
generate,
import,
rewrite,
translate,
export
timeline_id
string

The timeline. Every action but export with a ref needs it.

source
enum<string>

generate and export: which speech, voiceover, dialogue or music (lyrics); default is whichever the timeline has.

Available options:
voiceover,
dialogue,
music,
auto,
all
style
object

generate: color, activeColor, position, fontSize, fontFamily, fontWeight, fadeInFrames, fadeOutFrames, shadowEnabled, strokeEnabled, strokeColor, strokeWidth, backgroundColor, backgroundOpacity, emphasis ({words, color, emoji}), maxWords (default 6), maxChars (0 = no cap), closeGapMs (default 500). Unnamed fields are not kept; an unknown font is refused with the ones available.

animation
object

generate: lineAnim, wordAnim. Unnamed fields are not kept.

template
string

generate: a caption template as the base, sized to this timeline: one saved for this workspace, or built in: Subtitles, Kinetic, One word, Karaoke, Broadcast, Boxed, Story, Social, Hook. get_templates kind caption describes each. Social suits a talking head cut for a feed, Broadcast a landscape interview, Subtitles plain lines. style and animation override what they name.

save_template_as
string

generate: save the caption template this call lands under this name for later pieces. An existing name is overwritten.

Maximum string length: 60
file_text
string

import: the subtitle file's contents (SRT or WebVTT). Give this or ref.

Maximum string length: 2000000
ref
string

import: the library item that is the subtitle file (an uploaded .srt or .vtt). export: a library item whose stored words to export instead of a timeline's.

clip_id
string

import: the clip the subtitles belong to. Omitted: the one clip on the timeline still missing its words.

draw
boolean

import: draw the caption lines once the words land. Default true; false writes the words only.

cut
enum<string>

import: file (default) keeps each cue as the file wrote it; auto re-cuts the words into lines by the style's maxWords and maxChars.

Available options:
file,
auto
replace
boolean

import: write over words the clip already has. Without it a clip that knows its words is left alone.

lines
object[]

rewrite: every caption line once, by the clip_id a rewrite read returned, with its new text. A missing, unknown, empty or overlong line refuses the whole call and names it.

Required array length: 1 - 5000 elements
language
enum<string>

rewrite with lines: the language they are written in.

Available options:
en,
es,
fr,
de,
it,
pt,
ja,
ko,
zh,
ar,
hi,
ru,
nl,
pl,
sv,
da,
fi,
no,
cs,
sk,
hu,
ro,
bg,
hr,
uk,
el,
tr,
th,
vi,
id,
ms,
fil,
ta,
te,
ml,
kn,
bn,
gu,
mr,
pa,
he,
fa,
ur,
sw,
ha,
af,
ga,
cy,
is,
ca,
gl,
sl,
et,
lv,
lt,
sr,
bs,
mk,
ka,
hy,
az,
kk,
ne
target_language
enum<string>

translate: the language to write the lines in.

Available options:
en,
es,
fr,
de,
it,
pt,
ja,
ko,
zh,
ar,
hi,
ru,
nl,
pl,
sv,
da,
fi,
no,
cs,
sk,
hu,
ro,
bg,
hr,
uk,
el,
tr,
th,
vi,
id,
ms,
fil,
ta,
te,
ml,
kn,
bn,
gu,
mr,
pa,
he,
fa,
ur,
sw,
ha,
af,
ga,
cy,
is,
ca,
gl,
sl,
et,
lv,
lt,
sr,
bs,
mk,
ka,
hy,
az,
kk,
ne
as_new_timeline
boolean

rewrite and translate: write to a forked copy named " · " instead of this timeline.

format
enum<string>

export: default srt. txt is the words with no times.

Available options:
srt,
vtt,
txt
if_revision

The revision get_timeline returned. A stale one fails with revision_conflict instead of applying; so does no revision once a user edited the timeline in the app since this connection last read it.

context
string

Optional: one sentence shown to the user beside this action.

Maximum string length: 600

Response

Done, or a job started for work that runs longer (follow it with get_jobs).

ok
any
required
data
object
required
meta
object
required
media
object[]