Skip to main content

Get Subtitles

GET /v1/videos/:id/subtitles

Retrieve subtitles for a video in JSON or SRT format.

Prerequisites

The video must be analyzed first. Returns 404 if no subtitles exist.

Path parameters

ParameterTypeRequiredDescription
idstringYesVideo ID

Query parameters

ParameterTypeRequiredDefaultDescription
formatstringNojsonResponse format: json or srt

Example (JSON)

curl "https://api.vidocu.ai/v1/videos/vid_.../subtitles?format=json" \
-H "Authorization: Bearer vdo_live_your_key_here"

Response 200 OK

{
"videoId": "vid_1708300000000_abc1234",
"language": "en",
"subtitles": [
{
"startTime": 0.5,
"endTime": 3.2,
"text": "Welcome to the product demo"
},
{
"startTime": 3.5,
"endTime": 6.8,
"text": "Today we'll walk through the new dashboard"
}
]
}

Subtitle object fields

FieldTypeDescription
startTimenumberStart time in seconds
endTimenumberEnd time in seconds
textstringSubtitle text

Example (SRT)

curl "https://api.vidocu.ai/v1/videos/vid_.../subtitles?format=srt" \
-H "Authorization: Bearer vdo_live_your_key_here"

Response 200 OK (Content-Type: text/plain)

1
00:00:00,500 --> 00:00:03,200
Welcome to the product demo

2
00:00:03,500 --> 00:00:06,800
Today we'll walk through the new dashboard

Errors

StatusCodeCause
400validation_errorInvalid format query parameter
401authentication_errorInvalid or missing API key
404not_foundVideo not found, or no subtitles generated yet