Trim and conform a clip to 1080x1920 at 30 fps in one call

video-trim takes an optional output {width, height, fps} that conforms on the way out, exact precision only. Width and height 256-2160, fps 24, 25, 30 or 60.

4 min readSume
All posts

Add output: { width, height, fps } to POST /v1/video-trim and the cut is conformed on the way out in the same job. It only works with precision: "exact"; with keyframe the request fails video_trim_output_requires_exact.

This is from the Video trim docs, read 2026-09-30.

What values are allowed?

width and height are 256 to 2160; fps is 24, 25, 30 or 60. Omit output to inherit the source. The cut itself takes start and exactly one of end or duration (0.2 to 900 s). The job costs $0.02.

curl -X POST https://api.sume.com/v1/video-trim \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: trim-conform-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/source.mp4",
    "start": 5,
    "duration": 10,
    "precision": "exact",
    "output": { "width": 1080, "height": 1920, "fps": 30 }
  }'

Why conform before a Timeline?

Timeline 1.0 renders 1080x1920 by default and, without output.fps, follows the source frame rate. A rate that differs from a source's is met by repeating or dropping frames, reported as output_fps_resamples_sources. Conforming clips first to the rate you will render at avoids that resample.

What does the result confirm?

GET /v1/jobs/:id/result is kind: video_trim with video_url (a new artf_, never the source), duration_seconds, actual_start_seconds, precision, audio, output and optional warnings[]. A range past the source clamps and warns trim_clamped_to_source.

video-trim output options (https://docs.sume.com/models/video-trim, read 2026-09-30)
FieldValuesNeeds exact
output.width / height256 to 2160Yes
output.fps24, 25, 30, 60Yes
audiokeep, dropNo
precisionexact, keyframe-

Sources

Related posts

More in Developers

All Developers posts

Written by Sume