ClipSDKDOCS
Architecture Guide

Building Automated Short-Form Video Clipping Into a SaaS Product

Ship automated AI video clipping, active-speaker 9:16 reframing, burned-in captions, and customer clip editing inside your SaaS app without running GPU clusters or FFmpeg render fleets.

1h Video Cost
$1.80 -> $1.20
$0.03/min standard, $0.02/min past 2,000 min/mo
Failed Jobs
$0.00
Zero GPU burn on corrupt uploads or silent files
Max Source
5 GB / 48h
Direct presigned upload bypasses app servers
Edit Loop
20 / clip
Word-level trim, captions, hook, bleep API

End-to-End SaaS Clipping Flow

Connect your frontend directly to ClipSDK presigned uploads, queue async POST /v1/clips jobs with webhooks, and expose word-level clip edits inside your tenant dashboard.

  1. Direct Browser Upload (POST /v1/uploads): Your backend checks tenant quota and requests a 1-hour presigned upload_url for files up to 5 GB. The browser PUTs raw MP4/MOV/WebM/MKV bytes directly to storage with exact Content-Length and zero API key exposure.
  2. Async Job Dispatch (POST /v1/clips): Submit the returned video_url (or a customer's YouTube/Zoom/Loom/Drive link) with Prefer: respond-async, Idempotency-Key: tenant-<id>-<uploadId>, and your signed webhook_url.
  3. Verified Webhook Ingest: Your webhook endpoint checks Clipsdk-Signature (HMAC-SHA256 with 300s replay window), records job.result.clips sorted by score (0-100), replies 200 within 15s, and copies MP4/JPG/SRT/VTT files to your own CDN bucket.
  4. Customer Edit Loop (/words + /edit): Let users inspect word timestamps via GET /v1/jobs/{id}/clips/{rank}/words, adjust trim bounds, fix proper nouns, swap caption presets, edit hook text, or toggle bleep via POST /v1/jobs/{id}/clips/{rank}/edit.
  5. Clean Retention (DELETE /v1/jobs/{id}): Once mirrored to your storage, delete finished jobs immediately or let temporary /f/{key} files expire after 7 days.
Tenant job dispatcher with per-upload idempotencytypescript
export async function startTenantClipJob(input: {
  tenantId: string;
  assetId: string;
  videoUrl: string;
  brandColor: string;
}) {
  const res = await fetch("https://api.clipsdk.com/v1/clips", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.CLIPSDK_KEY}`,
      "Content-Type": "application/json",
      Prefer: "respond-async",
      "Idempotency-Key": `${input.tenantId}:${input.assetId}:v1`,
    },
    body: JSON.stringify({
      video_url: input.videoUrl,
      clips: 10,
      min_seconds: 20,
      max_seconds: 60,
      aspect: "9:16",
      reframe: "auto",
      captions: {
        preset: "karaoke",
        font: "Montserrat",
        highlight_color: input.brandColor,
        pop_in: true,
      },
      hook: { template: "pill", seconds: 4 },
      webhook_url: "https://api.yoursaas.com/webhooks/clipsdk",
    }),
  });
  if (!res.ok) throw new Error(`ClipSDK error ${res.status}: ${await res.text()}`);
  return (await res.json()).job;
}

Unit Economics: ClipSDK vs DIY GPU

ClipSDK bills $0.03 per source minute ($0.02 past 2,000 min/month) with $0 idle cost and $0 failed jobs, beating self-hosted FFmpeg + Whisper + face-tracking GPU infrastructure.

Running your own clipping pipeline requires GPU instances for Whisper transcription and speaker tracking, CPU encode nodes for multi-aspect FFmpeg caption burn-in, LLM moment-scoring calls, object-storage egress, retry queues, and ongoing engineering maintenance. Even a modest redundant 2-GPU cluster plus encode workers burns $1,800-$3,500/month before a single customer uploads a video.

Monthly SaaS VolumeClipSDK Total CostEffective RateDIY GPU + FFmpeg Cluster
500 source min (~8h)$15.00 / mo$0.030 / min$1,800+ fixed GPU + engineer ops
2,000 source min (~33h)$60.00 / mo$0.030 / min$2,000+ fixed GPU + storage + ops
5,000 source min (~83h)$120.00 / mo ($60 + $60)$0.024 / min$2,500+ autoscaling GPU + Whisper + FFmpeg
25,000 source min (~417h)$520.00 / mo ($60 + $460)$0.0208 / min$4,500+ multi-node GPU + on-call maintenance

At 25,000 source minutes per month (417 hours of customer video), ClipSDK costs $520 total. If you price your SaaS video add-on at $29/month for 300 minutes per customer, gross COGS on ClipSDK is $6.00-$9.00 per heavy user, delivering 70%-80%+ gross margins on Day 1.

ClipSDK vs OpusClip, Vizard, Shotstack & Klap

Compare ClipSDK against OpusClip API, Vizard API, Shotstack, and Klap API on per-hour cost, subscription lock-in, single-call AI clipping, captions, and word-level edits.

CapabilityClipSDKOpusClip APIVizard APIKlap APIShotstack
1-Hour Video -> 10 Clips$1.80 ($1.20 at volume; first 60m video $0)$5.82 ($0.097/min Pro credits; 15h/mo cap)Monthly Creator/Business plan credits required$8.44 ($0.44 input + 10x$0.32 + 10x$0.48)$0.20/min render only ($39-$499/mo plans); DIY AI
Billing ModelPure pay-as-you-go per second; $0 failed jobsMonthly workspace plan credits; API gated in betaRecurring monthly subscription + credit bucketsStacked per-input + per-short + per-export feesRender minutes + separate AI model credits
Single-Call AI ClippingYes: transcribe, rank (0-100), reframe, caption, titleYes (workspace project workflow)Yes (workspace project API)Two-step (generate shorts, then export each)No (timeline JSON renderer; build Whisper + LLM yourself)
Active-Speaker ReframeBuilt-in auto, center, none (9:16, 1:1, 4:5, 16:9)Built-inBuilt-inBuilt-inManual crop coordinates
Captions & Hooks8 presets + style object + 5 hook templates + SRT/VTT + bleepPreset styles + SRTPreset templates + SRTPreset stylesManual subtitle tracks
Post-Render Word EditsBuilt-in GET /words + POST /edit (20/clip)Web studio editorWorkspace editorRe-export per shortFull timeline re-submit
Webhooks & IdempotencyHMAC-SHA256 Clipsdk-Signature, 5 retries, 24h Idempotency-KeyWebhooks (30 req/min workspace cap)WebhooksWebhooksWebhooks

ClipSDK delivers a complete single-call video clipping backend at 3.2x to 4.7x lower cost than OpusClip Pro credits and Klap API on a 1-hour video yielding 10 captioned clips, with zero seat subscriptions and zero charges when customer uploads fail.

Multi-Tenant Quotas & Queueing

Place a lightweight Redis or Postgres worker queue in front of POST /v1/clips to pace jobs cleanly across ClipSDK's 3 concurrent jobs and 200 jobs per UTC day limits.

  • Respect 429 RATE_LIMITED + Retry-After: When 3 jobs are already running on your account, requeue the next tenant job with the integer delay from Retry-After rather than failing the user.
  • Cap Test Runs with first_seconds: Offer instant preview clips on your free tier by setting first_seconds: 600 (first 10 minutes billed at $0.30) before unlocking full 3-hour episode runs.
  • Pass quality: "high" Only for Pro Exports: Standard encoding renders crisp 1080x1920 MP4s at 1x price; reserve quality: "high" (1.5x) for paid pro-tier downloads.
  • Enforce Exact Pre-Flight Checks: Validate filename extensions (MP4, MOV, WebM, MKV) and 5 GB max size before calling POST /v1/uploads so you avoid counted client input errors. Review all quotas in Pricing & Limits.