Skip to Content
Generate track subtitles
post

Generates subtitles (captions) for a given audio track. This API can be used for up to 7 days after an asset is created.

Request body params

Generate subtitle tracks using automatic speech recognition with this configuration.

generated_subtitles[].name
string

A name for this subtitle track.

generated_subtitles[].passthrough
string

Arbitrary metadata set for the subtitle track. Max 255 characters.

generated_subtitles[].language_code
string
(default: en)
Possible values: "en""es""it""pt""de""fr""pl""ru""nl""ca""tr""sv""uk""no""fi""sk""el""cs""hr""da""ro""bg"

The language to generate subtitles in.

Request path & query params
ASSET_ID
string

The asset ID.

TRACK_ID
string

The track ID.

post
201
/video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles
Request
(application/json)
{
  "generated_subtitles": [
    {
      "language_code": "en",
      "name": "English (generated)",
      "passthrough": "English (generated)"
    }
  ]
}
Response
(application/json)
{
  "data": [
    {
      "type": "text",
      "text_type": "subtitles",
      "status": "preparing",
      "passthrough": "English (generated)",
      "name": "English (generated)",
      "language_code": "en",
      "id": "hXhnqUq0054k9SBFB5aczHhj6xMbOTlriTG7gqRn8kikv101lkFUgKNw"
    }
  ]
}