Trim a long video then caption the clip: two Sume jobs in order
Cut a moment from a long recording with video-trim, then burn captions on the new MP4. Why the order matters, what each job costs, and which URL goes where.

To caption a short moment from a long recording, trim first and caption second. Video trim returns a new MP4 holding only [start, end), and video captions takes that new file as its video_url. Together the two jobs cost $0.22 at today's documented rates: $0.02 for the trim and $0.20 for a caption job on a video up to 60 seconds.
The order matters for money and for timing: the caption price in the docs covers videos up to 60 seconds, so caption the clip, not the long file. Rates below are the figures in Sume's docs; confirm them in GET /v1/catalog.
Why trim before captioning?
A caption job reserves and captures $0.20 for videos up to 60 seconds under the current fixed estimate. The docs state that rate for videos up to 60 seconds and do not give one for longer files, so the safe assumption is that a long source is not covered by that price. Trimming first keeps the caption job inside the stated band.
Timing is the other reason. Caption timings are relative to the file you send. If you caption the original and then cut, you must shift every cue by the in-point; if you cut and then caption, the clip's first word is at zero and nothing needs shifting.
How does the trim job work?
Video trim takes a media.sume.com clip in your workspace, a start, and exactly one of end or duration. The default precision is exact, a frame-accurate re-encode; keyframe copies the stream and can start up to a GOP early, which you can read back from actual_start_seconds. For a clip you are about to caption, use exact so the first spoken word is not preceded by someone else's sentence.
The default mode is async. The result carries a new artf_ video_url, duration_seconds, actual_start_seconds and optional warnings. A range past the end of the source clamps and warns trim_clamped_to_source. Output length is limited to 900 seconds and at least 0.2 seconds.
Two jobs, two curl calls
Poll the trim job with GET /v1/jobs/:id/status and read GET /v1/jobs/:id/result for the new URL, or use a webhook. Then send the trimmed URL to captions. The placeholder below stands for the real artifact path from your trim result.
# 1) Cut 12 s out of a long recording (async job; poll /v1/jobs/:id/status)
curl -X POST https://api.sume.com/v1/video-trim \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: clip-trim-001" \
-d '{"video_url": "https://media.sume.com/artifacts/artf_demo/webinar.mp4",
"start": 754, "duration": 12}'
# 2) Caption the trimmed MP4 (use the video_url from the trim result)
curl -X POST https://api.sume.com/v1/video-captions \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: clip-caption-001" \
-d '{"video_url": "https://media.sume.com/artifacts/TRIMMED_ID/clip.mp4",
"style": "slam"}'
Which URL rules apply at each step?
The captions docs list the constraint as a public HTTPS URL and show a media.sume.com/artifacts/... URL in their example.
| Job | video_url must be | If it is somewhere else |
|---|---|---|
| video-trim | A media.sume.com artifact or asset in your workspace | Import first with POST /v1/media-imports |
| video-captions | A fetchable public HTTPS video URL | Private, signed or localhost URLs are rejected |
| video-captions source from trim | The trim result URL, as the docs' own example uses a media.sume.com artifact | Store the Sume URL, not provider URLs |
What can go wrong?
video_trim_range_conflict means you sent both end and duration; send one. video_trim_range_empty means end is not after start, or the range is over 900 seconds. A silent clip fails the caption step as caption_no_speech; pass cues instead. If the transcript wording is off, script_text aligns your wording to the speech timings, and source_caption_id lets you restyle the same caption without a second transcription.
Use a distinct Idempotency-Key per job and per intent. Reusing one key on a changed request returns a conflict rather than a new job, so name keys after the clip and the step.
Sources
Related posts
More in Use cases
- Upload 15 YouTube Shorts at a time: prepare the batch with Sume
YouTube's upload page lets you pick up to 15 Shorts at once. Prepare 15 correctly sized clips with Sume trim jobs, one idempotency key each.
- Walmart Sponsored Videos run 5 to 45 seconds: cut yours to length
Walmart Connect says Sponsored Videos run between five and 45 seconds. How to trim a finished product video to that window with Sume's video-trim endpoint.
- Wan 3.0 30-second drafts at 480p, then the 1080p final: cost on Sume
Alibaba lists Wan 3.0 at $0.05, $0.10 and $0.20 a second. A 30-second shot is $1.50, $3.00 or $6.00 at list; Sume's list x 1.25 makes it $1.875, $3.75 or $7.50.
- Webinar recording to shorts: an API pipeline with Sume
Turn a webinar recording into short clips with four calls: inspect and transcribe by sentence, pick moments, trim, caption. Limits and costs included.
Written by Sume