curl -X POST "https://api-integration.ollang.com/integration/upload/vtt" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: multipart/form-data" \
-F "file=@/path/to/your/subtitles.vtt" \
-F "projectId=60b8d6f1e1b9b1d8c6c0d8e1" \
-F "name=sample_subtitles"
const formData = new FormData();
formData.append("file", vttFile);
formData.append("projectId", "60b8d6f1e1b9b1d8c6c0d8e1");
formData.append("name", "sample_subtitles");
const response = await fetch(
"https://api-integration.ollang.com/integration/upload/vtt",
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
},
body: formData,
},
);
import requests
files = {'file': open('path/to/your/subtitles.vtt', 'rb')}
data = {
'projectId': '60b8d6f1e1b9b1d8c6c0d8e1',
'name': 'sample_subtitles'
}
headers = {'X-Api-Key': '<your-api-key>'}
response = requests.post(
'https://api-integration.ollang.com/integration/upload/vtt',
files=files,
data=data,
headers=headers
)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-integration.ollang.com/integration/upload/vtt',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: <your-api-key>'
),
CURLOPT_POSTFIELDS => array(
'file' => new CURLFile('path/to/your/subtitles.vtt'),
'projectId' => '60b8d6f1e1b9b1d8c6c0d8e1',
'name' => 'sample_subtitles'
),
));
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"bytes"
"io"
"mime/multipart"
"net/http"
"os"
)
func main() {
file, _ := os.Open("path/to/your/subtitles.vtt")
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("file", "subtitles.vtt")
io.Copy(part, file)
writer.WriteField("projectId", "60b8d6f1e1b9b1d8c6c0d8e1")
writer.WriteField("name", "sample_subtitles")
writer.Close()
req, _ := http.NewRequest("POST", "https://api-integration.ollang.com/integration/upload/vtt", body)
req.Header.Set("X-Api-Key", "<your-api-key>")
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, _ := client.Do(req)
}
HttpResponse<String> response = Unirest.post("https://api-integration.ollang.com/integration/upload/vtt")
.header("X-Api-Key", "<your-api-key>")
.field("file", new File("path/to/your/subtitles.vtt"))
.field("projectId", "60b8d6f1e1b9b1d8c6c0d8e1")
.field("name", "sample_subtitles")
.asString();
{
"projectId": "60b8d6f1e1b9b1d8c6c0d8e1"
}
{
"code": -2,
"error": "ValidationError",
"details": [
{
"messages": ["sourceLanguage must be a valid BCP-47 language tag"],
"path": "sourceLanguage"
}
]
}
{
"code": -1,
"error": "UnknownError",
"message": "unknown error",
"detail": "Validation failed (expected size is less than 1073741824)"
}
{
"error": "Not Found",
"message": "<reason>"
}
{
"code": -4,
"error": "UnauthorizedException",
"message": "API Key is missing",
"errorData": "UnauthorizedException"
}
Uploads
Upload VTT File
Upload VTT subtitle files to associate with existing video projects
POST
/
integration
/
upload
/
vtt
curl -X POST "https://api-integration.ollang.com/integration/upload/vtt" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: multipart/form-data" \
-F "file=@/path/to/your/subtitles.vtt" \
-F "projectId=60b8d6f1e1b9b1d8c6c0d8e1" \
-F "name=sample_subtitles"
const formData = new FormData();
formData.append("file", vttFile);
formData.append("projectId", "60b8d6f1e1b9b1d8c6c0d8e1");
formData.append("name", "sample_subtitles");
const response = await fetch(
"https://api-integration.ollang.com/integration/upload/vtt",
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
},
body: formData,
},
);
import requests
files = {'file': open('path/to/your/subtitles.vtt', 'rb')}
data = {
'projectId': '60b8d6f1e1b9b1d8c6c0d8e1',
'name': 'sample_subtitles'
}
headers = {'X-Api-Key': '<your-api-key>'}
response = requests.post(
'https://api-integration.ollang.com/integration/upload/vtt',
files=files,
data=data,
headers=headers
)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-integration.ollang.com/integration/upload/vtt',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: <your-api-key>'
),
CURLOPT_POSTFIELDS => array(
'file' => new CURLFile('path/to/your/subtitles.vtt'),
'projectId' => '60b8d6f1e1b9b1d8c6c0d8e1',
'name' => 'sample_subtitles'
),
));
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"bytes"
"io"
"mime/multipart"
"net/http"
"os"
)
func main() {
file, _ := os.Open("path/to/your/subtitles.vtt")
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("file", "subtitles.vtt")
io.Copy(part, file)
writer.WriteField("projectId", "60b8d6f1e1b9b1d8c6c0d8e1")
writer.WriteField("name", "sample_subtitles")
writer.Close()
req, _ := http.NewRequest("POST", "https://api-integration.ollang.com/integration/upload/vtt", body)
req.Header.Set("X-Api-Key", "<your-api-key>")
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, _ := client.Do(req)
}
HttpResponse<String> response = Unirest.post("https://api-integration.ollang.com/integration/upload/vtt")
.header("X-Api-Key", "<your-api-key>")
.field("file", new File("path/to/your/subtitles.vtt"))
.field("projectId", "60b8d6f1e1b9b1d8c6c0d8e1")
.field("name", "sample_subtitles")
.asString();
{
"projectId": "60b8d6f1e1b9b1d8c6c0d8e1"
}
{
"code": -2,
"error": "ValidationError",
"details": [
{
"messages": ["sourceLanguage must be a valid BCP-47 language tag"],
"path": "sourceLanguage"
}
]
}
{
"code": -1,
"error": "UnknownError",
"message": "unknown error",
"detail": "Validation failed (expected size is less than 1073741824)"
}
{
"error": "Not Found",
"message": "<reason>"
}
{
"code": -4,
"error": "UnauthorizedException",
"message": "API Key is missing",
"errorData": "UnauthorizedException"
}
Upload VTT (WebVTT) subtitle files to associate with your existing video projects for enhanced accessibility and translation workflows.
curl -X POST "https://api-integration.ollang.com/integration/upload/vtt" \
-H "X-Api-Key: <your-api-key>" \
-H "Content-Type: multipart/form-data" \
-F "file=@/path/to/your/subtitles.vtt" \
-F "projectId=60b8d6f1e1b9b1d8c6c0d8e1" \
-F "name=sample_subtitles"
const formData = new FormData();
formData.append("file", vttFile);
formData.append("projectId", "60b8d6f1e1b9b1d8c6c0d8e1");
formData.append("name", "sample_subtitles");
const response = await fetch(
"https://api-integration.ollang.com/integration/upload/vtt",
{
method: "POST",
headers: {
"X-Api-Key": "<your-api-key>",
},
body: formData,
},
);
import requests
files = {'file': open('path/to/your/subtitles.vtt', 'rb')}
data = {
'projectId': '60b8d6f1e1b9b1d8c6c0d8e1',
'name': 'sample_subtitles'
}
headers = {'X-Api-Key': '<your-api-key>'}
response = requests.post(
'https://api-integration.ollang.com/integration/upload/vtt',
files=files,
data=data,
headers=headers
)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-integration.ollang.com/integration/upload/vtt',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: <your-api-key>'
),
CURLOPT_POSTFIELDS => array(
'file' => new CURLFile('path/to/your/subtitles.vtt'),
'projectId' => '60b8d6f1e1b9b1d8c6c0d8e1',
'name' => 'sample_subtitles'
),
));
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"bytes"
"io"
"mime/multipart"
"net/http"
"os"
)
func main() {
file, _ := os.Open("path/to/your/subtitles.vtt")
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("file", "subtitles.vtt")
io.Copy(part, file)
writer.WriteField("projectId", "60b8d6f1e1b9b1d8c6c0d8e1")
writer.WriteField("name", "sample_subtitles")
writer.Close()
req, _ := http.NewRequest("POST", "https://api-integration.ollang.com/integration/upload/vtt", body)
req.Header.Set("X-Api-Key", "<your-api-key>")
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, _ := client.Do(req)
}
HttpResponse<String> response = Unirest.post("https://api-integration.ollang.com/integration/upload/vtt")
.header("X-Api-Key", "<your-api-key>")
.field("file", new File("path/to/your/subtitles.vtt"))
.field("projectId", "60b8d6f1e1b9b1d8c6c0d8e1")
.field("name", "sample_subtitles")
.asString();
Authorizations
This endpoint requires API key authentication. Include your API key in the request header:- Header name:
X-Api-Key - Header value: Your API key from the Ollang dashboard
- Format:
X-Api-Key: your-api-key-here
Body Parameters
The VTT (WebVTT) subtitle file to upload. Only .vtt format is supported.
Maximum file size: 1GB; a larger file is rejected with
400. Note: For
testing in the API playground, the upload limit is 5MB.Unique identifier for the project to associate this VTT file with. This should
be an existing project ID from a previous video upload.
Name of the file being uploaded. This will be used as the identifier for your
uploaded subtitle content.
The source language of the content in the uploaded file, as a BCP-47 language
tag listed in Supported Languages.
The value
all is not accepted: it is rejected with 400
(sourceLanguage must be a valid BCP-47 language tag). Omit the field or send
it empty if you don’t want to set it.Response
Unique identifier for the project associated with the uploaded VTT file. This
confirms the successful association of the subtitle file with the project.
{
"projectId": "60b8d6f1e1b9b1d8c6c0d8e1"
}
{
"code": -2,
"error": "ValidationError",
"details": [
{
"messages": ["sourceLanguage must be a valid BCP-47 language tag"],
"path": "sourceLanguage"
}
]
}
{
"code": -1,
"error": "UnknownError",
"message": "unknown error",
"detail": "Validation failed (expected size is less than 1073741824)"
}
{
"error": "Not Found",
"message": "<reason>"
}
{
"code": -4,
"error": "UnauthorizedException",
"message": "API Key is missing",
"errorData": "UnauthorizedException"
}
Was this page helpful?