v1

latestOpenAPI 3.0.02026-07-175989869.3 KB
Captions

Upload a caption

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

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

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.

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": "српски (ћирилица)"
}