clip_video tool runs in a session.
Clipping is asynchronous: a submit is answered 202 with a media_job you poll (or receive by webhook), or wait on with the SDK’s media.clips.wait or the CLI’s --wait.
How clips are picked and framed
- Picked from what is said. The video is transcribed with its speaker turns and scored; a moment is a stretch of speech that stands on its own. A video with no speech (music, crowd noise, silent gameplay) gives no clips.
- Whole sentences, clean edges. Each clip starts and ends on a full sentence, and is cut on the pause between words with a short lead-in, so the first word is never clipped.
start_seconds/end_secondsin the result are that padded window of the source. 9:16is full-screen and framed shot by shot — 1080×1920, no letterbox bars:- Track: one person talking — the frame follows them with a smooth camera move.
- Split: two people talking in turn — they are stacked, one on top of the other.
- Fit: slides, screen shares, wide shots and cartoons — the whole picture is kept, on a blurred copy of itself. A slide’s own black borders are trimmed first, so it fills the width of the frame.
A moment that shows nobody on screen for most of it (a run of lecture slides) is skipped at
9:16, unless the whole video has nobody on screen. Subtitles already burned into the source are cropped out, so they never collide with new captions.
16:9is kept as shot. No reframing; the clip is the source’s own picture.- Captions burn in only when
caption_presetasks for them (the default here isnone). They sit in a safe zone at about 71% of the frame height, clear of the platforms’ buttons, at most two lines at a time, with filler words (um, uh) left out.clean,boldandkaraokeare the looks. remove_silencetightens the pauses inside each clip after it is cut, soduration_secondscan be shorter thanend_seconds − start_seconds. Captions and the9:16framing follow the tightened clip.
The media job object
{ clips: [...] } once completed, otherwise null. Each clip:file_id— the clip, a published file.title— the scorer’s title, else yourtitle.start_seconds,end_seconds— the window of the source the clip was cut from, lead-in included.duration_seconds— the finished clip’s length (shorter than the window whenremove_silencetrimmed it).virality—total,shareability,hook_strength,story_quality,emotional_impact, each an integer 0–100.hook,hook_text,tiktok_caption,instagram_caption,youtube_title— ready-to-post copy for the clip; eachnullwhen the scorer gave none.
What the job actually cost, settled on completion.
null until then and for a failed job — a failure is not billed.Submit a clipping job
POST /v1/media/clips — scope agents:write. An Idempotency-Key header is required — a submit without one is refused with validation_failed — so a retried submit replays the job instead of queueing (and billing) a second one; the same key with a different body is idempotency_conflict.
A public
http(s) link to the long video — a page (YouTube, Vimeo) or a direct file. At most 90 minutes. Private, loopback and link-local hosts are refused with validation_failed.none, clean, bold or karaoke. The default here is none — no captions. Send a look to burn them in. (The clip_video tool, unlike this route, picks a look per video when it isn’t given one.)402 insufficient_credits when the organization’s prepaid balance is empty. There is no per-tenant concurrency cap on this route — your balance bounds you, not a turn — unlike the clip_video tool, which keeps one active job per session.
Retrieve a job
GET /v1/media/clips/{id} — scope agents:read
GET /v1/files/{file_id}.
When a job fails
A failed job reads back withstatus: "failed", result: null, cost_micro_usd: null and error: { code, message }. A failure is not billed. The code says whether trying again can help:
The
message says what happened in words, for example Video is too long (95 min, limit 90 min), Video is private, age-restricted, or unavailable, video_url host is not allowed, The clip job ran out of time (60-minute limit)., Video exceeds the maximum allowed size or YouTube downloads are temporarily unavailable on our side. Branch on code, not on the message. A completed job with an empty clips list is not a failure: it found no moment worth keeping (or no speech) and is billed what it ran.
List jobs
GET /v1/media/clips — scope agents:read
Newest first, in the standard list envelope. GET /v1/media?kind=clip answers the same list. Only jobs submitted through this API are listed; the clips an agent’s clip_video tool cuts inside a session reach that session as files, not as jobs here.
Webhooks
Subscribe an endpoint tomedia.job.queued, media.job.completed (data.file_ids names the clips) or media.job.failed (data.code, one of the failure codes, and data.message; sent once, whether the job failed while running or ran out of time) to be told rather than poll. Every envelope carries data.job_id and data.kind: "clip".
Pricing
A job is billed once, when it finishes, andcost_micro_usd is that figure: what the outside services it used charged us, plus one flat fee for our own servers. A failed job costs nothing. What adds up, at today’s rates, in credits (5,000 credits = $1):
A 30-minute talk from a direct file link, cut to 8 vertical captioned clips, is typically about 1,450 credits: 550 of transcription, about 400 of scoring and the 500-credit fee. From YouTube, the same talk is the same price when our fixed addresses fetch it, or about 2,350 credits when it has to go through the residential proxy (about 47 MB at 18,750 credits a GB). That is small because a YouTube source is not downloaded whole: we fetch its audio track to find the moments, then only the parts of the video the clips use, at up to 1080p. See Pricing.