Editor
PUT
/videos/{id}/captions

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
AuthorizationBearer <token>

An API key created under Settings > API & Webhooks. Keys start with sf_live_.

In: header

Path Parameters

id*string

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": {}      }    ]  }}