Upload a subtitle file
curl --request POST \
--url https://api.videobase.com/v1/subtitles/upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-Api-Key: <api-key>' \
--form id=a1b2c3d4e5f6 \
--form 'language=<string>' \
--form file='@example-file'const form = new FormData();
form.append('id', 'a1b2c3d4e5f6');
form.append('language', '<string>');
form.append('file', '<string>');
const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
options.body = form;
fetch('https://api.videobase.com/v1/subtitles/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.videobase.com/v1/subtitles/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"id": "a1b2c3d4e5f6",
"language": "<string>"
}
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text){
"subtitle": {
"language": "<string>",
"url": "<string>"
}
}{
"message": "File not found",
"status": 500
}Subtitles
Upload a subtitle file
Uploads an SRT or WebVTT subtitle. SRT input is converted to WebVTT. The maximum configured file size is 500 KB.
The current backend source requires a deployment fix before this operation can run.
POST
/
v1
/
subtitles
/
upload
Upload a subtitle file
curl --request POST \
--url https://api.videobase.com/v1/subtitles/upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-Api-Key: <api-key>' \
--form id=a1b2c3d4e5f6 \
--form 'language=<string>' \
--form file='@example-file'const form = new FormData();
form.append('id', 'a1b2c3d4e5f6');
form.append('language', '<string>');
form.append('file', '<string>');
const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
options.body = form;
fetch('https://api.videobase.com/v1/subtitles/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.videobase.com/v1/subtitles/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"id": "a1b2c3d4e5f6",
"language": "<string>"
}
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text){
"subtitle": {
"language": "<string>",
"url": "<string>"
}
}{
"message": "File not found",
"status": 500
}Authorizations
ApiKeyHeaderApiKeyQuery
Recommended. Your 16-character Videobase API key.
Body
multipart/form-data
Twelve-character Videobase video or remote-upload identifier.
Required string length:
12Pattern:
^\w{12}$Example:
"a1b2c3d4e5f6"
Subtitle language identifier containing letters, numbers, or underscores.
Pattern:
^\w+$SRT or WebVTT subtitle file, up to 500 KB.
Response
Queued subtitle.
Show child attributes
Show child attributes