Sume SumeMediaFile duration_ms: the 10 percent check and null

In a Sume structured output, a duration_ms must agree with the artifact's recorded length within 10 percent, or the projection fails. A null means not measured.

4 min readSume
All posts

A duration_ms inside a SumeMediaFile in your structured output is checked against the artifact's recorded length. Where Sume recorded one, the value must agree within 10%, or the projection fails; where it recorded none, nothing is checked and null means "not measured", not zero.

The rules are on Sume's Structured output page under the URL gate. Here is what that means when you read a duration back.

What exactly is checked?

The page says the value comes off the same ledger that fills artifacts[]. A claim outside 10% is described as describing a different file, and it fails the projection rather than reaching you. The failure surfaces as output: null with output_error set; on a run over the API that makes the run failed.

The SumeMediaFile shape has duration_ms as an integer or null, meant for video and audio.

Duration behaviour from the Sume Structured output docs page, read 2026-10-02.
Ledger has a length?`duration_ms` in `output`Result
YesWithin 10% of itPasses
YesOutside 10%Projection fails
NoAnythingNot checked
NonullRead as not measured

Can I trust a duration_seconds field I declared myself?

Not in the same way. The page says a duration_seconds number you declared yourself is written by the projection; the duration_ms on the media file is the checked one. Every other value, such as ids, labels, captions and counts, is read out of media metadata and closing text, and is the run's own account of its work rather than a measurement.

How should my code read it?

Use duration_ms from the media object when you need a length to schedule or bill against, and treat null as unknown rather than zero. For a video you are about to publish, the page's own advice is to read the file, not the number beside it: ffprobe on primary_output_url takes about two seconds.

What do I put in the schema?

Reference the built-in shape with { "$ref": "SumeMediaFile#" } rather than writing your own duration_ms field. Sume-hosted media on media.sume.com has expires_at null, which is the normal case.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume