captions
The caption lines on a timeline, by action. generate builds caption lines from the timeline’s speech (voiceover, dialogue or lyrics) in a template or a style, transcribing uploaded clips that have no words yet; it replaces any caption track already there, so a restyle is a re-run. import writes an SRT or WebVTT file the user has onto a clip as its words and draws the lines, never transcribing. rewrite with no lines returns every line with its clip_id and limits; with lines and language it replaces the words in place, slots and word timing kept. translate rewrites the lines in another language with a model, audio untouched. export returns the lines as SRT, VTT or plain text, from a timeline or from one library item’s stored words. Nothing here re-voices speech: that is change_language. Free, except generate on clips without words (cloud processing) and translate: credits.
Authorizations
An API key (es_live_…) from Settings, under API keys, or an OAuth access token.
Headers
Retry a paid dispatch safely: the same key returns the job already dispatched instead of charging again.
The workspace this one call acts in, when it is not the key's own.
Body
generate, import, rewrite, translate, export The timeline. Every action but export with a ref needs it.
generate and export: which speech, voiceover, dialogue or music (lyrics); default is whichever the timeline has.
voiceover, dialogue, music, auto, all 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.
generate: lineAnim, wordAnim. Unnamed fields are not kept.
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.
generate: save the caption template this call lands under this name for later pieces. An existing name is overwritten.
60import: the subtitle file's contents (SRT or WebVTT). Give this or ref.
2000000import: 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.
import: the clip the subtitles belong to. Omitted: the one clip on the timeline still missing its words.
import: draw the caption lines once the words land. Default true; false writes the words only.
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.
file, auto import: write over words the clip already has. Without it a clip that knows its words is left alone.
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.
1 - 5000 elementsrewrite with lines: the language they are written in.
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 translate: the language to write the lines in.
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 rewrite and translate: write to a forked copy named " · " instead of this timeline.
export: default srt. txt is the words with no times.
srt, vtt, txt 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.
Optional: one sentence shown to the user beside this action.
600
