Create a new frame extraction for a file
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>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Frames
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.
POST
/
files
/
{file_id}
/
frames
Create a new frame extraction for a file
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>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Body
application/json
Frame extraction configuration
Frame extraction configuration (root level) with optional thumbnails configuration.
Response
Frame extraction created successfully