Media tools

Get a video's duration, resolution, and fps with the Sume API

Send frames: false to POST /v1/video-inspect for a free probe of a Sume-hosted clip: duration_seconds, width, height, fps, has_audio, codecs, and HDR.

5 min readSume
All posts

To get a video's duration, resolution, and frame rate with the Sume API, send the Sume-hosted clip to POST /v1/video-inspect with frames: false. The unbilled probe returns duration_seconds, width, height, fps, has_audio, and the rest of the container facts, and the default sync mode answers 200 with the result when it finishes within 30 seconds.

The request rules come from the Video inspect docs and the probe's field list from the Sume API reference, both read on 2026-09-26.

How do I request only the metadata?

Send video_url, your workspace's media.sume.com artifact or asset of up to 1,800 seconds, with frames: false, which means probe only, with no stills. Leave transcribe off and nothing is billed.

The Idempotency-Key header, the 202 answer for a probe that runs past 30 seconds, and polling GET /v1/video-inspect/:id work as for any inspect; the video inspect overview covers them.

curl -X POST https://api.sume.com/v1/video-inspect \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: probe-talk-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
    "frames": false
  }'

Which fields does the probe return?

The API reference describes probe as the container facts the worker probed, read-only. Every field except has_audio, is_still, and hdr can be null.

Probe fields from the Sume API reference for Video inspect, read 2026-09-26.
FieldTypeWhat it tells you
duration_secondsnumberLength of the file in seconds
width, heightintegerStored frame size in pixels
rotationnumberRotation metadata, reported apart from width and height
fpsnumberFrame rate
container, video_codec, pix_fmt, color_transferstringFormat and video stream details
has_audiobooleanWhether there is an audio track
audio_codec, audio_channels, audio_sample_ratestring, integer, integerDetails of the source's audio track
size_bytesintegerFile size
is_stillbooleanWhether the source is a still image
hdrbooleanTrue for PQ or HLG transfers

What should I check before calling another media tool?

The probe answers most of the questions the other media tools would otherwise refuse a job over:

  • has_audio: audio detach fails detach_source_has_no_audio and an inspect transcript fails inspect_source_has_no_audio on a clip without an audio track. The docs say to check probe.has_audio first.
  • duration_seconds: every video frames at value must be under the duration, or the job fails frame_time_out_of_range. Video filter and video frames take sources up to 300 seconds; trim, detach, and inspect up to 1,800.
  • fps: Timeline 1.0 renders at the sources' rate when output.fps is omitted, and a different rate repeats or drops frames. See Change a video's frame rate or resolution.
  • hdr: video filter refuses PQ and HLG sources with hdr_source_unsupported, and the probe surfaces this before you submit a program. Today an exact trim refuses them too and points to keyframe precision.

Why do width and height look swapped on some clips?

width and height are the stored size of the video stream, and rotation is reported beside them rather than applied. Today inspect's own stills come out upright: they are rotated before scaling, and a quarter-turn rotation (90, −90, or 270) swaps width and height for them. Swap the probe's two values the same way when you need the upright size of a clip filmed in portrait.

Which duration should I trust when I cut on a transcript?

If you also ask for a transcript (transcribe: true), it reports its own audio facts. transcript.audio_duration_seconds is the length of the 16 kHz mono wav the transcript was made from, and the API reference says it can trail probe.duration_seconds by the decoder's priming, so trust it when cutting on that audio. The transcript's audio_sample_rate and audio_channels describe that speech-to-text copy (16000 and 1 today), not the source; read the source's from the probe.

For every media tool's length and size caps on one page, see Video editing API limits.

Sources

Related posts

Written by Sume