SDK
import { createVoyantCloudClient } from "@voyant-travel/cloud-sdk";
const cloud = createVoyantCloudClient({ apiKey: process.env.VOYANT_API_KEY });
const captions = await cloud.video.videos.captions.list("<videoId>");curl --request GET \
--url https://api.voyant.travel/video/v1/videos/<videoId>/captions \
--header 'Authorization: Bearer <token>'const response = await fetch("https://api.voyant.travel/video/v1/videos/<videoId>/captions", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.voyant.travel/video/v1/videos/<videoId>/captions",
headers={
"Authorization": "Bearer <token>"
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voyant.travel/video/v1/videos/{videoId}/captions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.voyant.travel/video/v1/videos/{videoId}/captions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.voyant.travel/video/v1/videos/{videoId}/captions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voyant.travel/video/v1/videos/{videoId}/captions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"videoId": "<string>",
"organizationId": "<string>",
"language": "<string>",
"status": "uploaded",
"generated": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"label": "<string>",
"errorMessage": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"retryAfterMs": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Video
List captions
Lists caption tracks for a video. Requires scope: video:read
GET
/
video
/
v1
/
videos
/
{videoId}
/
captions
SDK
import { createVoyantCloudClient } from "@voyant-travel/cloud-sdk";
const cloud = createVoyantCloudClient({ apiKey: process.env.VOYANT_API_KEY });
const captions = await cloud.video.videos.captions.list("<videoId>");curl --request GET \
--url https://api.voyant.travel/video/v1/videos/<videoId>/captions \
--header 'Authorization: Bearer <token>'const response = await fetch("https://api.voyant.travel/video/v1/videos/<videoId>/captions", {
method: "GET",
headers: {
"Authorization": "Bearer <token>"
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.voyant.travel/video/v1/videos/<videoId>/captions",
headers={
"Authorization": "Bearer <token>"
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voyant.travel/video/v1/videos/{videoId}/captions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.voyant.travel/video/v1/videos/{videoId}/captions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.voyant.travel/video/v1/videos/{videoId}/captions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voyant.travel/video/v1/videos/{videoId}/captions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"videoId": "<string>",
"organizationId": "<string>",
"language": "<string>",
"status": "uploaded",
"generated": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"label": "<string>",
"errorMessage": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"retryAfterMs": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Voyant Cloud API token, passed as Authorization: Bearer <token>. Each token carries a fixed set of scopes; an operation rejects tokens missing its required scope.
Path Parameters
Response
Captions
Show child attributes
Show child attributes
⌘I