Captions

Upload a caption

Changed on

Upload a VTT file to add captions to your video. More information can be found here

post/videos/{videoId}/captions/{language}

Request

  • Base URL
    https://ws.api.video
  • URL
    https://ws.api.video/videos/{videoId}/captions/{language}
  • Auth
    HTTP basic

Path parameters

videoIdstring required

The unique identifier for the video you want to add a caption to.

languagestring required

A valid language identifier using IETF language tags. You can use primary subtags like en (English), extended subtags like fr-CA (French, Canada), or region subtags like zh-Hans-CN (Simplified Chinese used in the PRC).

  • This parameter only accepts dashes for separators, for example fr-CA. If you use a different separator in your request, the API returns an error.
  • When the value in your request does not match any covered language, the API returns an error.
  • You can find the list of supported tags here.

Request body multipart/form-data

filestring binary required

The video text track (VTT) you want to upload.

Response

Success

uristring

The unique resource identifier of the uploaded caption.

srcstring

A direct URL to the uploaded caption file.

srclangstring

Indicates the language of the uploaded caption file using IETF language tags.

languageNamestring

Returns the native name of the caption language in UTF-8 encoding.

defaultboolean

Whether you will have subtitles or not. True for yes you will have subtitles, false for no you will not have subtitles.

Example response

{
  "default": false,
  "src": "https://cdn.api.video/vod/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl.vtt",
  "srclang": "sr-Cyrl",
  "uri": "/videos/vi1111DinStg3oBbN79GklWS/captions/sr-Cyrl",
  "languageName": "српски (ћирилица)"
}

Changes