curl --request GET \
--url https://api.cloudglue.dev/v1/segments/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloudglue.dev/v1/segments/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloudglue.dev/v1/segments/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudglue.dev/v1/segments/{job_id}",
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.cloudglue.dev/v1/segments/{job_id}"
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.cloudglue.dev/v1/segments/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudglue.dev/v1/segments/{job_id}")
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{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "segments",
"status": "pending",
"criteria": "shot",
"created_at": 123,
"shot_config": {
"detector": "content",
"max_duration_seconds": 300.5,
"min_duration_seconds": 300.3,
"fill_gaps": true
},
"narrative_config": {
"prompt": "<string>",
"strategy": "comprehensive",
"number_of_chapters": 2,
"min_chapters": 2,
"max_chapters": 2
},
"total_segments": 1,
"total_shots": 1,
"total_chapters": 1,
"segments": [
{
"start_time": 1,
"end_time": 1,
"description": "<string>",
"thumbnail_url": "<string>",
"shot_index": 123
}
],
"shots": [
{
"index": 123,
"start_time": 1,
"end_time": 1
}
],
"chapters": [
{
"index": 123,
"start_time": 1,
"end_time": 1,
"description": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Get Segments
Retrieve the current state of a segmentation job
curl --request GET \
--url https://api.cloudglue.dev/v1/segments/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloudglue.dev/v1/segments/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloudglue.dev/v1/segments/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudglue.dev/v1/segments/{job_id}",
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.cloudglue.dev/v1/segments/{job_id}"
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.cloudglue.dev/v1/segments/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudglue.dev/v1/segments/{job_id}")
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{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "segments",
"status": "pending",
"criteria": "shot",
"created_at": 123,
"shot_config": {
"detector": "content",
"max_duration_seconds": 300.5,
"min_duration_seconds": 300.3,
"fill_gaps": true
},
"narrative_config": {
"prompt": "<string>",
"strategy": "comprehensive",
"number_of_chapters": 2,
"min_chapters": 2,
"max_chapters": 2
},
"total_segments": 1,
"total_shots": 1,
"total_chapters": 1,
"segments": [
{
"start_time": 1,
"end_time": 1,
"description": "<string>",
"thumbnail_url": "<string>",
"shot_index": 123
}
],
"shots": [
{
"index": 123,
"start_time": 1,
"end_time": 1
}
],
"chapters": [
{
"index": 123,
"start_time": 1,
"end_time": 1,
"description": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the segmentation job
Response
Successful response with job details
Unique identifier for the segment job
ID of the file this segment belongs to
Object type, always 'segments'
segments Current status of the segment job
pending, processing, completed, failed Segment criteria used for this job
shot, narrative Unix timestamp in milliseconds when the job was created
Configuration used for shot-based segmentation (only present when criteria is 'shot')
Show child attributes
Show child attributes
Configuration used for narrative-based segmentation (only present when criteria is 'narrative')
Show child attributes
Show child attributes
Total number of segments generated (only present when status is 'completed')
x >= 0Total number of shots in the original video (only present when criteria is 'shot')
x >= 0Total number of chapters in the video (only present when criteria is 'narrative')
x >= 0Array of generated segments (only present when status is 'completed')
Show child attributes
Show child attributes
Array of shots in the original video (only present when criteria is 'shot')
Show child attributes
Show child attributes
Array of narrative chapters in the video (only present when criteria is 'narrative')
Show child attributes
Show child attributes