List an asset's subtitle tracks
GET /assets/{id}/subtitle-tracks
Returns the subtitle and caption tracks attached to a video, audio
or audiobook asset, sorted by language tag, or an empty array if it
has none. Each track is a WebVTT file in storage; to read one,
download it with GET /storage/objects/{hash} using its
file_hash.
The list includes every track on the asset: uploaded ones and, if
your instance runs AI transcription, the ones it made. AI tracks
have the source_format whisper, which isn’t among the values
listed below, and their confidence can be lower than 1. GET /assets/{id} returns the same tracks in its subtitle_tracks
field.
Subtitles apply only to assets whose type is Video, Audio or Audiobook; the server goes by the type alone, not by the file. Another type gets a 422, and an unknown id or an asset in the trash a 404. Any signed-in account can list the tracks of any such asset; the asset’s access rules aren’t checked.
If the database fails while the asset is being checked, the server currently answers 200 with an empty body, not JSON, so treat an empty body as an error. Other server errors get a plain-text 500, not the JSON shown.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The asset’s id.
Responses
Section titled “ Responses ”The tracks, sorted by language tag. An empty array if there are none.
One subtitle or caption track. An asset has at most one per language; uploading another for the same language replaces it.
object
The track’s language tag, such as en or fr-CA. und means the
language couldn’t be worked out from the file name.
A display name, such as English (US) or Forced. Empty when none
was given.
The SHA-256 of the stored WebVTT file.
The format the track was uploaded in. It’s stored as WebVTT whatever the source format.
How reliable the conversion to WebVTT is, from 0 to 1. Every format accepted today converts from text and gives 1; image-based subtitles, such as DVD IDX files, aren’t accepted yet.
Authentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Resource not found
object
Human-readable error summary
Example
the request could not be completedRequest shape is valid but the action doesn’t apply (e.g. subtitles on a non-video/audio asset).
object
Human-readable error summary
Example
the request could not be completed