Trim a TikTok or Instagram clip on Sume: import first, then cut
Sume media tools only read files on media.sume.com. To trim a public TikTok or Instagram video, import it first, then send the artifact URL to video-trim.

Sume trim, filter, detach and timeline do not fetch from the open internet. Their video_url must be a media.sume.com file in your workspace. To cut a public TikTok or Instagram video, call POST /v1/media-imports first, wait for the mirrored artifact, then send that URL to POST /v1/video-trim.
What the import does
The route description in the API says it imports a public TikTok or Instagram video URL into Sume-owned storage. It creates a queued job and a mimp_ resource, mirrors the bytes to media.sume.com, and records a workspace asset with status mirrored. The estimate is a fixed $0.15 per accepted import. The practical size cap is about 2 GB.
YouTube and other hosts are rejected with unsupported_platform. The body takes a url (public HTTPS) and an optional get_transcript boolean, plus the usual communication options.
Step 1: import
Send the public post URL. Keep the Idempotency-Key stable for the post, so a retry replays the same import instead of creating a second one.
curl -sS -X POST "https://api.sume.com/v1/media-imports" \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: import-reel-001" \
-d '{ "url": "https://www.instagram.com/reel/EXAMPLE/" }'Step 2: read the durable URL
GET /v1/media-imports/{id} returns the public-safe status, the durable media.sume.com URL, the asset id and source metadata. Provider download URLs and internals are omitted. Use the durable URL as the input of every later step.
Step 3: trim
Send video_url, start, and only one of end or duration. The default precision is exact, a frame-accurate re-encode. Use keyframe for a stream copy when speed matters more than the first frame, and re-base your times against actual_start_seconds in the result.
The trim costs $0.02 per job. The result is a new artf_ MP4, never the source. Put it into timeline_create video[] with source_in 0.
curl -sS -X POST "https://api.sume.com/v1/video-trim" \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: trim-reel-001" \
-d '{
"video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
"start": 2,
"duration": 8
}'What fails if you skip the import
Pass the TikTok or Instagram page URL straight to video-trim and the API refuses it at admit. The trim, filter and detach pages list the same three source codes, and they apply to every Sume-hosted media tool.
Plan the budget as two lines: the import at a fixed $0.15 estimate, then the trim at $0.02, which is $0.17 before any later step. If you only need to know whether the clip has sound or how long it is, POST /v1/video-inspect with frames: false reads the probe first, and it is billed by Modal compute rather than at a flat rate.
| Code | Meaning |
|---|---|
unsupported_media_source | video_url is not on the Sume media host |
source_not_found | The media.sume.com URL is dead or belongs to another workspace |
unsupported_media_type | The HEAD result is not a video |
Rights stay with you
The import only moves a file that is already public. It does not give you the right to reuse it. Confirm that you may use the clip before you cut it into a new video.
Related posts
More in Media tools
- Media import allows about 2 GB, but trim and filter stop at 300 MiB
Sume media import has a practical size cap near 2 GB, while video trim and filter reject sources over 300 MiB with source_too_large. How to plan around the gap.
- invalid_segment_timing: the two causes in a 3-minute Short timeline
invalid_segment_timing means a slot start is not after the previous start, or a slot ends over 0.5 s past audio.duration_seconds. Check starts, then ends.
- Is a reference Short silent? Reference ingest audio gate at -60 LUFS
Reference ingest marks audio.silent when integrated loudness is -60 LUFS or lower. Silent means plan new music and skip STT; the manifest also reports beats.
- Is this video stereo or mono? Read probe audio_channels first
Sume video inspect returns audio_channels, audio_sample_rate and audio_codec. Use them to choose channels and sample_rate for audio detach before you submit.
Written by Sume