Upload Subtitles

Upload .srt or .vtt file to the video asset. The response of this API call gives upload_url for each language specified. You need to send a PUT request of the subtitle files to those URLs. Once that's done, you need to call the subtitle upload complete API. Only after that, Gumlet will add subtitles to asset.

Path Parameters

  • An asset id for the previously created asset.

Body

application/json
  • List of language codes to upload subtitle file (use ISO 639-1 Language Codes)

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/video/assets/{asset_ID}/subtitle/upload
import Gumlet from '@gumlet/nodejs-sdk';

const client = new Gumlet({
  apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});

const subtitleUpload = await client.subtitleUpload.upload('assetId');

console.log(subtitleUpload);
{
  "signed_urls": [
    {
      "language_code": "en",
      "upload_url": "<UPLOAD_URL>"
    }
  ],
  "asset_id": "6a8491aaf180d34362c9587a"
}