GET Video Subtitles
Overview
The following table contains information about the GET
method for managing the process of retrieving subtitles for a specific video by its ID.
GET Video Subtitles by VideoId | |
---|---|
Method | GET |
URL or Endpoint | /api/projects/projectId /videos/videoId /subtitles |
Headers | Authorization |
Parameters | videoId, projectId |
Body | Not Applicable |
The description of the URL parameters is as follows:
URL Parameter Name | Mandatory | Type | Description |
---|---|---|---|
projectId | Yes | string | Unique Id of the project. |
videoId | Yes | string | Unique id of the video for which subtitles are being fetched. |
Request Body
The GET
method doesn't contain a request body.
Response
{
"success": true,
"errors": [
"string"
],
"messages": [
"string"
],
"result": [
{
"id": 0,
"videoId": "string",
"languageId": 0,
"languageName": "string",
"languageCode": "string",
"filePath": "string",
"extension": "string",
"active": true,
"isAutoGenerated": true,
"status": "string",
"statusId": 0
}
],
"resultInfo": "string",
"statusCode": 0
}
Information about the fields that appear when you receive the response are displayed in the table below.
Field Name | Type | Description |
---|---|---|
success | bool | If the response is successful, it will return true. Otherwise, it will return false. |
errors | array[string] | Indicates whether there was an error. |
messages | array[string] | Returns the response messages from the backend. |
result | array[Object] | Returns an array of subtitle objects. |
id | integer($int32) | The unique Id of the subtitle. |
videoId | string | The unique Id of the video. |
languageId | integer($int32) | The unique Id of the language. |
languageName | string | The name of the language of the subtitle. |
languageCode | string | The code for the subtitle language (e.g., "file"). |
filePath | string | The URL of the subtitle file. |
extension | string | The file extension of the subtitle (e.g., '.vtt'). |
active | boolean | Indicates whether the subtitle is active. |
isAutoGenerated | boolean | Indicates whether the subtitle is auto-generated. |
status | string | The current status of the subtitle (e.g., "In Progress"). |
statusId | integer($int32) | The unique Id of the subtitle's status. |
resultInfo | string | Returns extra information about the result. |
statusCode | integer($int32) | Returns the HTTP Status Code. |
If the action is successful, the service sends back an HTTP 200 or 201 response.
When subtitles are AI-generated:
- If the video status is "In Progress" or "Pending", the languageName will display "(Auto-Generated)".
- If the video status is "Ready", the languageName will show the actual language, e.g., "English (Auto-Generated)".
For more information about subtitle statues, please visit the Subtitle Status API
Errors
For information about the errors that are common to all actions, see Common Errors:
HTTP Status Code 400: Bad Request
HTTP Status Code 401: Unauthorized
HTTP Status Code 403: Forbidden
HTTP Status Code 404: Result Not Found
HTTP Status Code 500: Internal Server Error
HTTP Status Code 503: Backend Fetch Failed