curl --request POST \
--url https://mvp.tryunsora.com/api/v1/clippings/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUrl": "<string>",
"targetDuration": "auto",
"ratio": "original",
"limit": 10,
"query": "<string>",
"enableCaption": false,
"captionStyle": "classic-yellow",
"sourceLang": "<string>",
"targetLang": "<string>"
}
'import requests
url = "https://mvp.tryunsora.com/api/v1/clippings/create"
payload = {
"videoUrl": "<string>",
"targetDuration": "auto",
"ratio": "original",
"limit": 10,
"query": "<string>",
"enableCaption": False,
"captionStyle": "classic-yellow",
"sourceLang": "<string>",
"targetLang": "<string>"
}
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({
videoUrl: '<string>',
targetDuration: 'auto',
ratio: 'original',
limit: 10,
query: '<string>',
enableCaption: false,
captionStyle: 'classic-yellow',
sourceLang: '<string>',
targetLang: '<string>'
})
};
fetch('https://mvp.tryunsora.com/api/v1/clippings/create', 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://mvp.tryunsora.com/api/v1/clippings/create",
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([
'videoUrl' => '<string>',
'targetDuration' => 'auto',
'ratio' => 'original',
'limit' => 10,
'query' => '<string>',
'enableCaption' => false,
'captionStyle' => 'classic-yellow',
'sourceLang' => '<string>',
'targetLang' => '<string>'
]),
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://mvp.tryunsora.com/api/v1/clippings/create"
payload := strings.NewReader("{\n \"videoUrl\": \"<string>\",\n \"targetDuration\": \"auto\",\n \"ratio\": \"original\",\n \"limit\": 10,\n \"query\": \"<string>\",\n \"enableCaption\": false,\n \"captionStyle\": \"classic-yellow\",\n \"sourceLang\": \"<string>\",\n \"targetLang\": \"<string>\"\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://mvp.tryunsora.com/api/v1/clippings/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoUrl\": \"<string>\",\n \"targetDuration\": \"auto\",\n \"ratio\": \"original\",\n \"limit\": 10,\n \"query\": \"<string>\",\n \"enableCaption\": false,\n \"captionStyle\": \"classic-yellow\",\n \"sourceLang\": \"<string>\",\n \"targetLang\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mvp.tryunsora.com/api/v1/clippings/create")
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 \"videoUrl\": \"<string>\",\n \"targetDuration\": \"auto\",\n \"ratio\": \"original\",\n \"limit\": 10,\n \"query\": \"<string>\",\n \"enableCaption\": false,\n \"captionStyle\": \"classic-yellow\",\n \"sourceLang\": \"<string>\",\n \"targetLang\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"status": "<string>",
"videoUrl": "<string>",
"config": {},
"createdAt": "2023-11-07T05:31:56Z",
"clips": [
{}
],
"creditsUsed": 123
},
"creditsDeducted": 123,
"creditsRemaining": 123
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}Create clipping
Start an AI clipping job that finds the best moments in a long video and turns them into short, ready-to-post vertical clips with captions.
curl --request POST \
--url https://mvp.tryunsora.com/api/v1/clippings/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUrl": "<string>",
"targetDuration": "auto",
"ratio": "original",
"limit": 10,
"query": "<string>",
"enableCaption": false,
"captionStyle": "classic-yellow",
"sourceLang": "<string>",
"targetLang": "<string>"
}
'import requests
url = "https://mvp.tryunsora.com/api/v1/clippings/create"
payload = {
"videoUrl": "<string>",
"targetDuration": "auto",
"ratio": "original",
"limit": 10,
"query": "<string>",
"enableCaption": False,
"captionStyle": "classic-yellow",
"sourceLang": "<string>",
"targetLang": "<string>"
}
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({
videoUrl: '<string>',
targetDuration: 'auto',
ratio: 'original',
limit: 10,
query: '<string>',
enableCaption: false,
captionStyle: 'classic-yellow',
sourceLang: '<string>',
targetLang: '<string>'
})
};
fetch('https://mvp.tryunsora.com/api/v1/clippings/create', 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://mvp.tryunsora.com/api/v1/clippings/create",
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([
'videoUrl' => '<string>',
'targetDuration' => 'auto',
'ratio' => 'original',
'limit' => 10,
'query' => '<string>',
'enableCaption' => false,
'captionStyle' => 'classic-yellow',
'sourceLang' => '<string>',
'targetLang' => '<string>'
]),
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://mvp.tryunsora.com/api/v1/clippings/create"
payload := strings.NewReader("{\n \"videoUrl\": \"<string>\",\n \"targetDuration\": \"auto\",\n \"ratio\": \"original\",\n \"limit\": 10,\n \"query\": \"<string>\",\n \"enableCaption\": false,\n \"captionStyle\": \"classic-yellow\",\n \"sourceLang\": \"<string>\",\n \"targetLang\": \"<string>\"\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://mvp.tryunsora.com/api/v1/clippings/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoUrl\": \"<string>\",\n \"targetDuration\": \"auto\",\n \"ratio\": \"original\",\n \"limit\": 10,\n \"query\": \"<string>\",\n \"enableCaption\": false,\n \"captionStyle\": \"classic-yellow\",\n \"sourceLang\": \"<string>\",\n \"targetLang\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mvp.tryunsora.com/api/v1/clippings/create")
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 \"videoUrl\": \"<string>\",\n \"targetDuration\": \"auto\",\n \"ratio\": \"original\",\n \"limit\": 10,\n \"query\": \"<string>\",\n \"enableCaption\": false,\n \"captionStyle\": \"classic-yellow\",\n \"sourceLang\": \"<string>\",\n \"targetLang\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"status": "<string>",
"videoUrl": "<string>",
"config": {},
"createdAt": "2023-11-07T05:31:56Z",
"clips": [
{}
],
"creditsUsed": 123
},
"creditsDeducted": 123,
"creditsRemaining": 123
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}Authorizations
Headers
API key requests only. Retrying with the same key within 24 hours replays the first response (with the Idempotent-Replayed: true header) instead of charging again. The body isn't compared; reusing the key on a different endpoint returns 409 IDEMPOTENCY_CONFLICT. Keys over 128 characters are ignored.
128Body
Clip length: auto (up to 90s), under 30s, 30–60s, 60–90s, 90s–3min, or 3–5min. The raw values DURATION_0_30, DURATION_0_90, DURATION_30_60, DURATION_60_90, DURATION_90_180 and DURATION_180_300 also work. Ignored when query is set.
auto, lt30, 30-60, 60-90, 90-3min, gt3min Caption preset, used only when enableCaption is true. Raw style ids (temp-0 to temp-17, temp-static-1 to temp-static-6, game-streamer-1 to game-streamer-7, smart-bg-focus, box-highlight, word-focus, underline-focus) also work.
classic-yellow, white-card, black-box, bold-white, white-underline, playful-green, sketch-blue, bubble-blue, bubble-green, glow-yellow, duo-green, duo-purple, elegant-purple, neon-cyan, glow-pink, bold-yellow, soft-orange, glow-green, glow-orange, retro-outline, mint-bubble, comic-duo, static-outline, static-comic, static-minimal, static-green, static-yellow, static-orange, gaming-magenta, gaming-green, gaming-yellow, gaming-white, gaming-purple-box, gaming-cyan, gaming-orange-box 
