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.

4 min readSume
All posts

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.

Video trim range refusals, from the Video trim docs, read 2026-09-29.
CodeWhen it fires
video_trim_range_requiredNeither end nor duration was sent.
video_trim_range_conflictBoth end and duration were sent.
video_trim_range_emptyend 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

All Developers posts

Written by Sume