curl --request POST \
--url https://api.cloudglue.dev/v1/files/{file_id}/frames \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"strategy": "uniform",
"uniform_config": {
"frames_per_second": 15.05,
"max_width": 2080
},
"thumbnails_config": {
"enable_frame_thumbnails": true
},
"start_time_seconds": 1,
"end_time_seconds": 1
}
'import requests
url = "https://api.cloudglue.dev/v1/files/{file_id}/frames"
payload = {
"strategy": "uniform",
"uniform_config": {
"frames_per_second": 15.05,
"max_width": 2080
},
"thumbnails_config": { "enable_frame_thumbnails": True },
"start_time_seconds": 1,
"end_time_seconds": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
strategy: 'uniform',
uniform_config: {frames_per_second: 15.05, max_width: 2080},
thumbnails_config: {enable_frame_thumbnails: true},
start_time_seconds: 1,
end_time_seconds: 1
})
};
fetch('https://api.cloudglue.dev/v1/files/{file_id}/frames', 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/files/{file_id}/frames",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'strategy' => 'uniform',
'uniform_config' => [
'frames_per_second' => 15.05,
'max_width' => 2080
],
'thumbnails_config' => [
'enable_frame_thumbnails' => true
],
'start_time_seconds' => 1,
'end_time_seconds' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudglue.dev/v1/files/{file_id}/frames"
payload := strings.NewReader("{\n \"strategy\": \"uniform\",\n \"uniform_config\": {\n \"frames_per_second\": 15.05,\n \"max_width\": 2080\n },\n \"thumbnails_config\": {\n \"enable_frame_thumbnails\": true\n },\n \"start_time_seconds\": 1,\n \"end_time_seconds\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudglue.dev/v1/files/{file_id}/frames")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"strategy\": \"uniform\",\n \"uniform_config\": {\n \"frames_per_second\": 15.05,\n \"max_width\": 2080\n },\n \"thumbnails_config\": {\n \"enable_frame_thumbnails\": true\n },\n \"start_time_seconds\": 1,\n \"end_time_seconds\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudglue.dev/v1/files/{file_id}/frames")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"strategy\": \"uniform\",\n \"uniform_config\": {\n \"frames_per_second\": 15.05,\n \"max_width\": 2080\n },\n \"thumbnails_config\": {\n \"enable_frame_thumbnails\": true\n },\n \"start_time_seconds\": 1,\n \"end_time_seconds\": 1\n}"
response = http.request(request)
puts response.read_body{
"frame_extraction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": 1,
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"frame_extraction_config": {
"strategy": "uniform",
"uniform_config": {
"frames_per_second": 15.05,
"max_width": 2080
},
"thumbnails_config": {
"enable_frame_thumbnails": true
},
"start_time_seconds": 1,
"end_time_seconds": 1
},
"frame_count": 1,
"data": {
"object": "list",
"total": 123,
"limit": 123,
"offset": 123,
"frames": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": 123,
"thumbnail_url": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Create File Frame Extraction
Create a new frame extraction for a file using the specified frame extraction configuration. This is an async operation that returns immediately with a ‘pending’ status. Results are cached, so identical requests will return the same frame extraction.
curl --request POST \
--url https://api.cloudglue.dev/v1/files/{file_id}/frames \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"strategy": "uniform",
"uniform_config": {
"frames_per_second": 15.05,
"max_width": 2080
},
"thumbnails_config": {
"enable_frame_thumbnails": true
},
"start_time_seconds": 1,
"end_time_seconds": 1
}
'import requests
url = "https://api.cloudglue.dev/v1/files/{file_id}/frames"
payload = {
"strategy": "uniform",
"uniform_config": {
"frames_per_second": 15.05,
"max_width": 2080
},
"thumbnails_config": { "enable_frame_thumbnails": True },
"start_time_seconds": 1,
"end_time_seconds": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
strategy: 'uniform',
uniform_config: {frames_per_second: 15.05, max_width: 2080},
thumbnails_config: {enable_frame_thumbnails: true},
start_time_seconds: 1,
end_time_seconds: 1
})
};
fetch('https://api.cloudglue.dev/v1/files/{file_id}/frames', 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/files/{file_id}/frames",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'strategy' => 'uniform',
'uniform_config' => [
'frames_per_second' => 15.05,
'max_width' => 2080
],
'thumbnails_config' => [
'enable_frame_thumbnails' => true
],
'start_time_seconds' => 1,
'end_time_seconds' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudglue.dev/v1/files/{file_id}/frames"
payload := strings.NewReader("{\n \"strategy\": \"uniform\",\n \"uniform_config\": {\n \"frames_per_second\": 15.05,\n \"max_width\": 2080\n },\n \"thumbnails_config\": {\n \"enable_frame_thumbnails\": true\n },\n \"start_time_seconds\": 1,\n \"end_time_seconds\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudglue.dev/v1/files/{file_id}/frames")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"strategy\": \"uniform\",\n \"uniform_config\": {\n \"frames_per_second\": 15.05,\n \"max_width\": 2080\n },\n \"thumbnails_config\": {\n \"enable_frame_thumbnails\": true\n },\n \"start_time_seconds\": 1,\n \"end_time_seconds\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudglue.dev/v1/files/{file_id}/frames")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"strategy\": \"uniform\",\n \"uniform_config\": {\n \"frames_per_second\": 15.05,\n \"max_width\": 2080\n },\n \"thumbnails_config\": {\n \"enable_frame_thumbnails\": true\n },\n \"start_time_seconds\": 1,\n \"end_time_seconds\": 1\n}"
response = http.request(request)
puts response.read_body{
"frame_extraction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": 1,
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"frame_extraction_config": {
"strategy": "uniform",
"uniform_config": {
"frames_per_second": 15.05,
"max_width": 2080
},
"thumbnails_config": {
"enable_frame_thumbnails": true
},
"start_time_seconds": 1,
"end_time_seconds": 1
},
"frame_count": 1,
"data": {
"object": "list",
"total": 123,
"limit": 123,
"offset": 123,
"frames": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": 123,
"thumbnail_url": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the file to extract frames from
Body
Frame extraction configuration
Frame extraction configuration (root level) with optional thumbnails configuration.
Frame extraction strategy - currently only 'uniform' is supported
uniform Configuration for uniform frame extraction
Show child attributes
Show child attributes
Configuration for frame thumbnails. Optional.
Show child attributes
Show child attributes
Optional: The start time of the video in seconds to start extracting frames from
x >= 0Optional: The end time of the video in seconds to stop extracting frames at
x >= 0Response
Frame extraction created successfully
Unique identifier for the frame extraction job
Status of the frame extraction job
pending, processing, completed, failed Unix timestamp in milliseconds when the frame extraction was created
x >= 0ID of the file this frame extraction belongs to
Configuration for frame extraction. Currently only supports uniform strategy.
Show child attributes
Show child attributes
Total number of frames extracted (only present when status is completed)
x >= 0Frame data with pagination (only present when status is completed and frames exist)
Show child attributes
Show child attributes