extract_clip
Cut and assemble a clip from any prior video job (find_clips, summarize, or video transcribe). Operates on a parent job — possessing the parent source_job_id is the capability, no upload step. Pass one segment for a simple cut, or multiple non-contiguous segments to compose a single mp4 highlight reel — same flat $0.50 either way. Two-call flow: (1) call with source_job_id + segments (ordered array of {start, end, label?} in source seconds, total duration capped at 30 minutes) to receive {job_id, payment_challenge}; (2) pay via MPP and call with job_id + payment_credential to start processing. No upload step. Poll get_job_status(job_id) for completion; outputs are role clip-video (the assembled .mp4, frame-accurate boundaries with 15ms audio fades at segment joins; audio loudness-normalized to -14 LUFS / -1.5 dBTP for clean, consistent playback) and — when include_transcript: true (default) — roles clip-srt + clip-words (transcripts stitched and time-shifted to match the assembled video). Set include_transcript: false to skip transcript outputs. Payment: pay by credit card via the Stripe Checkout link (open the returned payment_url in any browser) or Tempo USDC via mppx; the challenge's WWW-Authenticate header and /.well-known/mpp.json are authoritative for which methods are offered. Source must still be in storage (72h TTL for find_clips parents, 24h elsewhere — check expires_at from get_job_status on the parent). Multiple extract_clip calls against one parent are independent paid jobs. Failed jobs auto-refund.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional title for the assembled clip. Surfaces in get_job_status and download filenames; doesn't affect the cut itself. | |
| job_id | No | Job ID returned from a previous extract_clip call. Include along with payment_credential to confirm payment and trigger processing. Also include alone to recover the current state. | |
| segments | No | Ordered array of source-relative segments to cut and concatenate into the output. Single segment for a simple cut; multiple segments compose a single mp4 from non-contiguous moments — same flat $0.50 either way. Total summed duration capped at 30 minutes per call. Required on the first call. | |
| source_job_id | No | Job ID of any prior video job (find_clips, summarize, or video transcribe). Possessing this id is the capability — extract_clip is not session-bound, so a user can come back from a different session within the parent's TTL and still extract. Required on the first call. | |
| include_transcript | No | Default true. When true, the pipeline writes clip-srt + clip-words outputs stitched to match the assembled video. Set false to skip and just receive the .mp4. | |
| payment_credential | No | MPP payment credential (full Authorization header value, e.g. "Payment eyJ..."). extract_clip accepts Tempo USDC and Stripe SPT — see the challenge's WWW-Authenticate header or /.well-known/mpp.json for the supported methods. Include with job_id after paying the challenge to start processing. |