Initiate multipart upload
curl --request POST \
--url https://app.autoposting.ai/api-proxy/clips/upload/init \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "my-podcast.mp4",
"fileSize": 524288000,
"mimeType": "video/mp4",
"brandSlug": "acme-corp"
}
'import requests
url = "https://app.autoposting.ai/api-proxy/clips/upload/init"
payload = {
"fileName": "my-podcast.mp4",
"fileSize": 524288000,
"mimeType": "video/mp4",
"brandSlug": "acme-corp"
}
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({
fileName: 'my-podcast.mp4',
fileSize: 524288000,
mimeType: 'video/mp4',
brandSlug: 'acme-corp'
})
};
fetch('https://app.autoposting.ai/api-proxy/clips/upload/init', 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://app.autoposting.ai/api-proxy/clips/upload/init",
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([
'fileName' => 'my-podcast.mp4',
'fileSize' => 524288000,
'mimeType' => 'video/mp4',
'brandSlug' => 'acme-corp'
]),
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://app.autoposting.ai/api-proxy/clips/upload/init"
payload := strings.NewReader("{\n \"fileName\": \"my-podcast.mp4\",\n \"fileSize\": 524288000,\n \"mimeType\": \"video/mp4\",\n \"brandSlug\": \"acme-corp\"\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://app.autoposting.ai/api-proxy/clips/upload/init")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"my-podcast.mp4\",\n \"fileSize\": 524288000,\n \"mimeType\": \"video/mp4\",\n \"brandSlug\": \"acme-corp\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.autoposting.ai/api-proxy/clips/upload/init")
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 \"fileName\": \"my-podcast.mp4\",\n \"fileSize\": 524288000,\n \"mimeType\": \"video/mp4\",\n \"brandSlug\": \"acme-corp\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"clipId": "clip_01HXYZ",
"uploadId": "upload_abc123",
"partSize": 10485760
}
}{
"success": false,
"error": "unauthorized",
"message": "Missing or invalid API key."
}Clips
Initiate multipart upload
Initiate a 3-step multipart upload for a large video file.
POST
/
clips
/
upload
/
init
Initiate multipart upload
curl --request POST \
--url https://app.autoposting.ai/api-proxy/clips/upload/init \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "my-podcast.mp4",
"fileSize": 524288000,
"mimeType": "video/mp4",
"brandSlug": "acme-corp"
}
'import requests
url = "https://app.autoposting.ai/api-proxy/clips/upload/init"
payload = {
"fileName": "my-podcast.mp4",
"fileSize": 524288000,
"mimeType": "video/mp4",
"brandSlug": "acme-corp"
}
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({
fileName: 'my-podcast.mp4',
fileSize: 524288000,
mimeType: 'video/mp4',
brandSlug: 'acme-corp'
})
};
fetch('https://app.autoposting.ai/api-proxy/clips/upload/init', 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://app.autoposting.ai/api-proxy/clips/upload/init",
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([
'fileName' => 'my-podcast.mp4',
'fileSize' => 524288000,
'mimeType' => 'video/mp4',
'brandSlug' => 'acme-corp'
]),
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://app.autoposting.ai/api-proxy/clips/upload/init"
payload := strings.NewReader("{\n \"fileName\": \"my-podcast.mp4\",\n \"fileSize\": 524288000,\n \"mimeType\": \"video/mp4\",\n \"brandSlug\": \"acme-corp\"\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://app.autoposting.ai/api-proxy/clips/upload/init")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"my-podcast.mp4\",\n \"fileSize\": 524288000,\n \"mimeType\": \"video/mp4\",\n \"brandSlug\": \"acme-corp\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.autoposting.ai/api-proxy/clips/upload/init")
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 \"fileName\": \"my-podcast.mp4\",\n \"fileSize\": 524288000,\n \"mimeType\": \"video/mp4\",\n \"brandSlug\": \"acme-corp\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"clipId": "clip_01HXYZ",
"uploadId": "upload_abc123",
"partSize": 10485760
}
}{
"success": false,
"error": "unauthorized",
"message": "Missing or invalid API key."
}Authorizations
bearerAuthapiKeyHeader
API key as Authorization: Bearer sk-social-...
Body
application/json
Original filename of the video.
Example:
"my-podcast.mp4"
File size in bytes.
Example:
524288000
MIME type of the video (e.g., video/mp4).
Example:
"video/mp4"
Slug of the brand this clip belongs to.
Example:
"acme-corp"
Was this page helpful?
⌘I

