Skip to main content
POST
Create an AI clipping job

Authorizations

Authorization
string
header
required

An Unsora API key (uns_…). A Clerk session token also works.

Headers

Idempotency-Key
string

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.

Maximum string length: 128

Body

application/json
videoUrl
string<uri>
required

Public video URL, such as a YouTube link.

targetDuration
enum<string>
default:auto

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.

Available options:
auto,
lt30,
30-60,
60-90,
90-3min,
gt3min
ratio
enum<string>
default:original

Clip aspect ratio. RATIO_9_16, RATIO_1_1, RATIO_4_5 and RATIO_16_9 also work.

Available options:
9:16,
1:1,
4:5,
16:9,
original
limit
integer

Maximum number of clips.

Required range: 1 <= x <= 20
query
string

Describe the moments to find, e.g. funny reactions. When set, clip length follows the moments and targetDuration is ignored.

Maximum string length: 500
enableCaption
boolean
default:false

Burn captions into the clips. Must be the JSON boolean true; the string "true" counts as off.

captionStyle
enum<string>
default:classic-yellow

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.

Available options:
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
sourceLang
string

Language spoken in the video, e.g. en. Passed to the clipping provider as is.

targetLang
string

Language for the captions, to translate them. Passed to the clipping provider as is.

Response

Job queued

success
boolean
required
data
object
required
creditsDeducted
integer
creditsRemaining
integer