curl --request POST \
--url https://api.framelane.io/v1/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content_type": "video/mp4",
"filename": "my-clip.mp4",
"duration": 12.5,
"width": 1920,
"height": 1080
}
'import requests
url = "https://api.framelane.io/v1/uploads"
payload = {
"content_type": "video/mp4",
"filename": "my-clip.mp4",
"duration": 12.5,
"width": 1920,
"height": 1080
}
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({
content_type: 'video/mp4',
filename: 'my-clip.mp4',
duration: 12.5,
width: 1920,
height: 1080
})
};
fetch('https://api.framelane.io/v1/uploads', 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.framelane.io/v1/uploads",
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([
'content_type' => 'video/mp4',
'filename' => 'my-clip.mp4',
'duration' => 12.5,
'width' => 1920,
'height' => 1080
]),
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.framelane.io/v1/uploads"
payload := strings.NewReader("{\n \"content_type\": \"video/mp4\",\n \"filename\": \"my-clip.mp4\",\n \"duration\": 12.5,\n \"width\": 1920,\n \"height\": 1080\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.framelane.io/v1/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content_type\": \"video/mp4\",\n \"filename\": \"my-clip.mp4\",\n \"duration\": 12.5,\n \"width\": 1920,\n \"height\": 1080\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.framelane.io/v1/uploads")
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 \"content_type\": \"video/mp4\",\n \"filename\": \"my-clip.mp4\",\n \"duration\": 12.5,\n \"width\": 1920,\n \"height\": 1080\n}"
response = http.request(request)
puts response.read_body{
"upload_url": "https://storage.googleapis.com/framelane-prod-user/uploads/ws_01J.../a1b2c3.mp4?upload_id=...",
"source_url": "https://cdn-user.framelane.io/uploads/ws_01J.../a1b2c3.mp4",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Request a file upload URL
Returns a GCS resumable upload URL and the corresponding CDN source URL. PUT your file bytes directly to upload_url with the correct Content-Type header. Once the upload completes, pass source_url as the source_url field in any render or task request.
The upload_url expires in 1 hour.
curl --request POST \
--url https://api.framelane.io/v1/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content_type": "video/mp4",
"filename": "my-clip.mp4",
"duration": 12.5,
"width": 1920,
"height": 1080
}
'import requests
url = "https://api.framelane.io/v1/uploads"
payload = {
"content_type": "video/mp4",
"filename": "my-clip.mp4",
"duration": 12.5,
"width": 1920,
"height": 1080
}
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({
content_type: 'video/mp4',
filename: 'my-clip.mp4',
duration: 12.5,
width: 1920,
height: 1080
})
};
fetch('https://api.framelane.io/v1/uploads', 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.framelane.io/v1/uploads",
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([
'content_type' => 'video/mp4',
'filename' => 'my-clip.mp4',
'duration' => 12.5,
'width' => 1920,
'height' => 1080
]),
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.framelane.io/v1/uploads"
payload := strings.NewReader("{\n \"content_type\": \"video/mp4\",\n \"filename\": \"my-clip.mp4\",\n \"duration\": 12.5,\n \"width\": 1920,\n \"height\": 1080\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.framelane.io/v1/uploads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content_type\": \"video/mp4\",\n \"filename\": \"my-clip.mp4\",\n \"duration\": 12.5,\n \"width\": 1920,\n \"height\": 1080\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.framelane.io/v1/uploads")
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 \"content_type\": \"video/mp4\",\n \"filename\": \"my-clip.mp4\",\n \"duration\": 12.5,\n \"width\": 1920,\n \"height\": 1080\n}"
response = http.request(request)
puts response.read_body{
"upload_url": "https://storage.googleapis.com/framelane-prod-user/uploads/ws_01J.../a1b2c3.mp4?upload_id=...",
"source_url": "https://cdn-user.framelane.io/uploads/ws_01J.../a1b2c3.mp4",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
MIME type of the file you will upload.
"video/mp4"
The file's original name. Sets the stored object's extension and is kept as the asset's display name; without it the asset shows as its uuid key.
"my-clip.mp4"
Optional client-probed media duration in seconds — video and audio only; ignored for images, which have no duration. When provided, the asset is immediately usable/listable instead of waiting on server-side metadata extraction; the server probe (when it runs) overrides it.
12.5
Optional client-probed pixel width (video or image).
1920
Optional client-probed pixel height (video or image).
1080
Response
Successful Response
Response from POST /v1/uploads.
GCS resumable upload URL. PUT your file bytes here with the correct Content-Type.
"https://storage.googleapis.com/framelane-prod-user/uploads/ws_01J.../a1b2c3.mp4?upload_id=..."
CDN URL for the uploaded file. Pass this as source_url in render/task requests.
"https://cdn-user.framelane.io/uploads/ws_01J.../a1b2c3.mp4"
When the upload_url expires (1 hour from now).

