Media tools

Split a long video into short clips with the Sume API

Transcribe a Sume-hosted video with video inspect to find cut points, cut each range with video trim, then crop and caption each short clip.

5 min readSume
All posts

To split a long video into short clips with the Sume API, run POST /v1/video-inspect with transcribe: true to get timed words and sentences, pick your ranges, and send each one to POST /v1/video-trim, which returns a new MP4 per clip from a Sume-hosted source of up to 1,800 seconds. Then crop and caption each clip if the shorts need it.

The facts below come from the Video inspect, Video trim, Video filter, and Video captions docs and the Sume API reference, read on 2026-09-26.

Which calls does a long-to-shorts pipeline make?

Inspect, trim, and filter read only your workspace's media.sume.com artifacts or assets, such as the output of an earlier Sume job; there is no open-internet fetch, and each create needs an Idempotency-Key. Captions take a public HTTPS video URL.

From Video inspect, Video trim, Video filter, and Video captions, read 2026-09-26.
StepEndpointSendKeep
Find cut pointsPOST /v1/video-inspecttranscribe: true, segmentation.mode: "sentence"transcript.words[] and segments[]
Cut each clipPOST /v1/video-trimstart plus end or durationvideo_url, actual_start_seconds
ReframePOST /v1/video-filterA crop opvideo_url
CaptionPOST /v1/video-captionsThe clip's video_urlThe captioned video_url

How do I find where to cut?

Ask inspect for a transcript. words[] carries word-level timings in seconds from the start of the video, and segmentation.mode: "sentence" adds gapless sentence segments[], each with index, text, start, end, and duration_seconds. An optional silence_split_seconds (0.2–3) tunes where sentences break. frames: false skips the stills.

Only the transcript is billed, per audio minute, and duration_seconds is just its reservation hint, at most 600. Billing, polling, and refusals are covered in Video inspect API.

curl -X POST https://api.sume.com/v1/video-inspect \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: webinar-transcript-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/webinar.mp4",
    "frames": false,
    "transcribe": true,
    "segmentation": { "mode": "sentence" },
    "duration_seconds": 600
  }'

Should I trim with exact or keyframe precision?

Send one trim per clip, with start and end taken from the transcript; each clip can run 0.2–900 seconds. The full trim contract is in Trim, filter, or detach audio. For transcript-driven cuts, the choice that matters is precision:

  • "exact" (the default) re-encodes frame-accurately (libx264, yuv420p), so the clip starts where the transcript said. It is the only precision that takes the output conform.
  • "keyframe" is a stream copy: no re-encode and no quality loss, but the cut may start up to one GOP early. Re-base the transcript's times on actual_start_seconds, and do not send output with it (video_trim_output_requires_exact).
  • Today an exact trim refuses an HDR source with hdr_source_unsupported and points to keyframe.
curl -X POST https://api.sume.com/v1/video-trim \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: webinar-clip-03" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/webinar.mp4",
    "start": 312.4,
    "end": 356.9
  }'

How do I reframe each clip for vertical?

Run the video filter crop op on each clip. Filter sources are capped at 300 seconds, so keep a clip you plan to crop at that length or less. Convert a landscape video to vertical works through the 9:16 crop fractions. Trim's output conform scales but never crops: today, setting both width and height scales the clip to exactly that size, so a 16:9 clip conformed to 1080×1920 is distorted, not reframed.

How do I caption each clip?

Send the clip's video_url to POST /v1/video-captions, which takes a public HTTPS video URL. The trimmed clip comes back as a media.sume.com artifact, and the captions docs use that kind of URL in their own example. Each standalone caption job is priced as a fixed estimate for videos up to 60 seconds, and the current caption worker refuses a longer source with duration_out_of_range, so keep clips you plan to caption at 60 seconds or less. It also refuses a source with no audio stream (missing_audio_stream), so leave trim's audio at its default, keep.

To reuse the transcript you already have, pass its words as words: each item needs text, start, and end, and the API reference caps those times at 60 seconds, so re-base them on the clip's actual_start_seconds. The inspect transcript calls the field word; captions call it text. words skips speech-to-text and burns exactly those words at those times. Styles are covered in How to burn captions onto a video.

What are the limits?

These caps shape a long-to-shorts run:

  • Inspect and trim sources: ≤ 1,800 seconds. Trimmed clips: 0.2–900 seconds. Filter sources: ≤ 300 seconds. Caption sources: priced for up to 60 seconds, and refused past that today.
  • Captions made from speech need audible speech; a silent clip fails as caption_no_speech.
  • On the hosted MCP server, script_run can call video_trim for many same-shaped cuts in one program; paid creates inside it still need their own idempotency_key.

Sources

Related posts

Written by Sume