video_trim_range_conflict: send end or duration, not both
The video trim API returns video_trim_range_conflict when a body has both end and duration. Send start plus exactly one of them; other range errors explained.

video_trim_range_conflict means your POST /v1/video-trim body carried both end and duration. Send start plus exactly one of them: end for an out-point on the source's timeline, or duration for the length of the cut. Send neither and you get video_trim_range_required instead.
This page covers the three range errors of Sume's video trim, from the Video trim docs read 2026-09-29.
What do the three range errors mean?
Each code is a stable value, so you can branch on it in code rather than parsing a message.
| Code | When it fires |
|---|---|
video_trim_range_required | Neither end nor duration was sent. |
video_trim_range_conflict | Both end and duration were sent. |
video_trim_range_empty | end is at or before start, or the range is longer than 900 seconds. |
Should I send end or duration?
Use end when you know the out-point in the source, for example a cut from second 2 to second 10. Use duration when you know how long the piece should be, for example 8 seconds from second 2. Both describe the same cut; pick whichever your caller already has.
duration accepts 0.2 to 900 seconds. If end runs past the end of the source it is clamped, and the result carries a trim_clamped_to_source warning rather than an error.
curl -X POST https://api.sume.com/v1/video-trim \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: video-trim-001" \
-d '{ "video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4", "start": 2, "duration": 8 }'What else must the request contain?
video_url must be a media.sume.com artifact or asset in your workspace, and an Idempotency-Key header is required. Optional fields are precision (exact by default, or keyframe), audio (keep or drop) and output (exact only). The cut is a new MP4; the source is untouched.
The default mode is async, so you get a job and read GET /v1/jobs/:id/result when it is ready. With mode: "sync" the call waits up to 30 seconds.
What does a trim cost?
The docs list a public rate of $0.02 per job, and say to confirm it live in GET /v1/catalog. There is no model inference in a trim; it is one ffmpeg pass on the worker.
Sources
Related posts
More in Developers
- Wan 3.0 webhook: get notified when a 30-second clip finishes
Long Wan 3.0 clips take minutes. Pass callback_url on POST /v1/videos and Sume posts a signed webhook when the job ends, so you don't have to poll wan-3.0.
- Wan 3.0 Node.js example: generate a video with fetch
A short Node.js script that submits a Wan 3.0 job to POST /v1/videos, polls until it completes and saves the MP4, with no SDK. It uses the wan-3.0 model id.
- Wan 3.0 Python example: submit, poll and download a clip
A short async Python script that submits a Wan 3.0 job to POST /v1/videos, polls until it finishes, and saves the MP4. It uses httpx and the wan-3.0 model id.
- Wan 3.0 seed and size: why the API returns 400 unsupported_parameter
wan-3.0 on Sume rejects seed and size rather than ignoring them. Use resolution and aspect_ratio instead. Why the 400 happens and how to fix the request.
Written by Sume