Send captions, captionsPages or both. Whichever half you send is
replaced wholesale; the other is left untouched.
Caption pages carry editor decorations (an emoji, a sound effect) that
this API does not accept, so an incoming page is layered over the
stored page with the same id, keeping those decorations. A page whose
id is unknown is treated as new. Ids are minted when absent.
Caps per request: 6000 caption words, 2000 pages. endMs must be at or
after startMs on every item.
Authorization
bearerAuth An API key created under Settings > API & Webhooks. Keys start with sf_live_.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/videos/string/captions" \ -H "Content-Type: application/json" \ -d '{ "captionsPages": [ { "id": "p1a2b3", "startMs": 0, "endMs": 2000 }, { "id": "p4d5e6", "startMs": 2000, "endMs": 3620, "hidden": true } ] }'{ "data": { "captions": [ { "id": "string", "startMs": 0, "endMs": 0, "text": "string", "punctuated_word": "string", "confidence": 0 } ], "captionsPages": [ { "id": "string", "startMs": 0, "endMs": 0, "hidden": true, "emoji": {}, "audioEffect": {} } ] }}Replace the b-roll segments PUT
Replaces the whole b-roll timeline. Send a bare JSON array or wrap it as `{ "bRolls": [ ... ] }`. Only the brief fields travel on the wire: `id`, `startMs`, `endMs`, `text`, `prompt`, `keywords` and `mediaType`. The resolved media (the chosen file, its quality variants) and the editor styling (animation, transition, layout, scale, sound effect) are read-only, and are carried over from the stored segment with the same `id`. A segment whose id is unknown is new and starts with no media. Cap: 500 segments per request. Changing what a segment should show does not re-fetch its media on its own: requeue generation with `addBRolls: true` for that.
Replace the presentation timeline PUT
Replaces the whole scene timeline. Send a bare JSON array or wrap it as `{ "presentationScenes": [ ... ] }` (`{ "scenes": [ ... ] }` is accepted too). Every scene is validated against the end of the transcript, or the source duration when there is none: a scene outside that window is clamped, and one that ends at or before it starts is dropped. Scenes are stored sorted by `startMs`. A video with neither a transcript nor a known duration cannot place scene timings and is refused with `409` `warning-source-not-ready`. Only presentation videos have this timeline; anything else is `409` `wrong-video-type`.