Add a subtitle from URL
curl --request POST \
--url https://api.videobase.com/v1/subtitles/upload/url \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"id": "a1b2c3d4e5f6",
"language": "<string>",
"url": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'a1b2c3d4e5f6', language: '<string>', url: '<string>'})
};
fetch('https://api.videobase.com/v1/subtitles/upload/url', 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/url"
payload = {
"id": "a1b2c3d4e5f6",
"language": "<string>",
"url": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"subtitle": {
"language": "<string>",
"url": "<string>"
}
}{
"message": "File not found",
"status": 500
}Subtitles
Add a subtitle from URL
Downloads an SRT or WebVTT subtitle from an HTTP or HTTPS URL with a 30-second upstream timeout. SRT input is converted to WebVTT.
POST
/
v1
/
subtitles
/
upload
/
url
Add a subtitle from URL
curl --request POST \
--url https://api.videobase.com/v1/subtitles/upload/url \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"id": "a1b2c3d4e5f6",
"language": "<string>",
"url": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'a1b2c3d4e5f6', language: '<string>', url: '<string>'})
};
fetch('https://api.videobase.com/v1/subtitles/upload/url', 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/url"
payload = {
"id": "a1b2c3d4e5f6",
"language": "<string>",
"url": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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
application/json
Response
Queued subtitle.
Show child attributes
Show child attributes