Trim a self-hosted AI clip with Sume: $0.02, audio kept
Open-weights video models give fixed-length clips with sound. Import the file to Sume and cut a start-to-end range with video trim at $0.02 a job.

To cut a clip from a self-hosted video model, import the MP4 into your Sume workspace, then call video trim with a start and either an end or a duration. The public rate is $0.02 per job, there is no model inference, and the audio track is kept by default, which matters for models that generate sound with the picture.
Why trim a local clip at all?
Open models produce fixed-length clips. The Kandinsky 6.0 repository, for example, describes 5-second clips with synchronized audio. The first or last half second often holds a settling frame or a clipped syllable. Cutting a clean range is a small job that does not need a GPU or another generation. It also keeps your local pipeline simple: generate with whatever model you run, then do the finishing cut on a hosted worker that runs ffmpeg for you, instead of maintaining your own filter scripts. The API rejects raw ffmpeg fields, so there is nothing to tune beyond the range, precision, audio and an optional output size.
What does the trim route accept?
Video trim takes one clip that already lives on Sume's media host. The docs say the API does not fetch from the open internet, so you import first with the media import route. You send start in seconds and only one of end or duration.
| Item | Value |
|---|---|
| Public rate | $0.02 per job |
| Source length | Up to 1800 s |
| Output length | 0.2 s to 900 s |
| Audio | keep (default) or drop |
| Precision | exact (default, frame-accurate re-encode) or keyframe |
| Idempotency-Key header | Required |
What does the call look like?
Set SUME_API_KEY, use the media.sume.com URL the import gave you, and poll the job until it reports a result.
import os
import requests
key = os.environ.get("SUME_API_KEY", "")
if not key:
raise SystemExit("Set SUME_API_KEY first")
resp = requests.post(
"https://api.sume.com/v1/video-trim",
headers={
"Authorization": f"Bearer {key}",
"Idempotency-Key": "trim-local-clip-001",
},
json={
"video_url": "https://media.sume.com/artifacts/artf_demo/clip.mp4",
"start": 0.4,
"duration": 4,
},
timeout=60,
)
resp.raise_for_status()
print(resp.json())What can go wrong?
If the URL is not on the Sume media host the API refuses it as an unsupported media source. A start with both end and duration is refused as a range conflict. If your end is past the clip, the cut clamps to the source and the result carries a warning. The result is a new MP4 artifact; the source is never changed.
Use the keyframe mode only when you accept a cut that can start a GOP early, which is a stream copy and avoids a re-encode. For a tight 4-second range from a 5-second clip, leave the default exact mode on.
When should you regenerate instead?
Trim removes frames; it cannot add them. If you need 7 seconds from a 5-second model, stitch clips or use a hosted row with a longer envelope. Sume's Video Router docs list wan-3.0 at 2 to 30 seconds and minimax-h3 at 5 to 15 seconds; read the live catalog capabilities before you choose.
Sources
Related posts
More in Use cases
- Trunk-or-treat event video: plan the cost first, pull a poster frame
A church or school trunk-or-treat promo from event photos: check cost with the free plan route, render for $0.10, then pull a poster still with video frames.
- Ugly Christmas sweater party invite: card over a clip, $0.02
Float your invite card over 8 seconds of last year's party footage with timeline compose overlay: $0.02 flat, 9:16 by default, card keeps its shape.
- Vacation rental check-in video for guests with AI voice
Replace a long check-in message with a 60-second Sume video: door, Wi-Fi, parking and house rules in photos and a TTS voice for about 13 cents.
- Valentine's Day 2027 is a Sunday: four order-by cues, $1.43
Valentine's Day 2027 is Sunday Feb 14. Render one 5-second clip and burn four dated reminder cue sets from January 11 to Feb 12 for about $1.43 on Sume.
Written by Sume