Create Content Subtitle
Associates the provided subtitle for the content with the mentioned language_code
If a new subtitle is uploaded with the same language_code, existing one is replaced with the new one
curl -X POST "https://api.videograph.ai/video/services/api/v1/contents/example_string/subtitles" \
-H "Content-Type: application/json" \
-H "Accept: example_string" \
-H "Authorization: Basic YOUR_CREDENTIALS" \
-d '{
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
}'
import requests
import json
url = "https://api.videograph.ai/video/services/api/v1/contents/example_string/subtitles"
headers = {
"Content-Type": "application/json",
"Accept": "example_string",
"Authorization": "Basic YOUR_CREDENTIALS"
}
data = {
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.videograph.ai/video/services/api/v1/contents/example_string/subtitles", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "example_string",
"Authorization": "Basic YOUR_CREDENTIALS"
},
body: JSON.stringify({
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
}`)
req, err := http.NewRequest("POST", "https://api.videograph.ai/video/services/api/v1/contents/example_string/subtitles", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "example_string")
req.Header.Set("Authorization", "Basic YOUR_CREDENTIALS")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.videograph.ai/video/services/api/v1/contents/example_string/subtitles')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Accept'] = 'example_string'
request['Authorization'] = 'Basic YOUR_CREDENTIALS'
request.body = '{
"url": "example_string",
"name": "John Doe",
"language_code": "example_string",
"support_closed_captions": true
}'
response = http.request(request)
puts response.body
{
"status": "Success",
"message": "Updated video details",
"code": 200,
"data": {
"url": "https://d133d5ts749j6w.cloudfront.net/ane/HSHM2586532201040000_ACTA_HD.scc",
"name": "English US",
"language_code": "en_US",
"support_closed_captions": false,
"uuid": "subtitleid"
}
}
/video/services/api/v1/contents/{CONTENT_ID}/subtitlesUsername for basic authentication
Password for basic authentication
Content UUID
The media type of the request body
Provide source url of Subtitle file. Supported formats include SRT & VTT.
Name of subtitle ex-English US
Mention Language code ex-en_US
Does your subtitle support closed captions (CC), allowed values true/false
Request Preview
Response
Response will appear here after sending the request
Authentication
Basic authentication credentials. Provide username and password encoded in Base64 format: Basic base64(username:password)
Path Parameters
Content UUID
Headers
Body
Provide source url of Subtitle file. Supported formats include SRT & VTT.
Name of subtitle ex-English US
Mention Language code ex-en_US
Does your subtitle support closed captions (CC), allowed values true/false
Responses
Last updated Dec 29, 2025

