Read the motion clip length with video inspect before Kling duration

Kling motion control on Sume reserves money from the duration_seconds you declare. Probe the reference clip with video inspect first, so the number is measured.

4 min readSume
All posts

Measure the motion clip before you declare duration_seconds on a Kling 3.0 Motion Control job. Sume reserves ceil(duration_seconds) times $0.1575, and the real output length follows the motion video, not the field. A guessed 20 when the clip is 14.2 seconds reserves $3.15 where $2.36 would do; a guessed 10 when the clip is 14.2 under-reserves.

POST /v1/video-inspect returns the probe of a clip with frames: false, so the check costs a few seconds and a small compute charge, not a generation.

Why the declared number matters

The Kling route takes duration_seconds between 1 and 30 and uses it only to price the reservation at admit. Sume does not send it to the provider, because the provider has no duration setting: the length of the motion video decides the output. Kling's guide says action videos run 3 to 30 seconds (read 2026-10-07).

Two kinds of mistakes follow. Declare too high and you tie up balance you did not need. Declare too low and the reservation does not match the work, and the docs do not say how Sume settles the difference, so avoid the situation.

Cost of a wrong duration_seconds on a 14.2-second reference clip
DeclaredBilled secondsReservationProblem
1010$1.575Below the real length; settlement is undocumented
14.215$2.3625Correct: ceil of the measured length
2020$3.15Over-reserves by $0.7875
3030$4.725Ties up the cap for a short clip

Probe the clip first

Video inspect reads one clip that your workspace already holds on media.sume.com. It rejects off-host URLs, so import the clip first with POST /v1/media-imports. Then call inspect with frames: false for the probe alone. Inspect defaults to sync mode and waits up to 30 seconds, then returns 202 and a job to poll.

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

Read the result

The completed resource has a probe object. Read the clip length from it, round up to the next whole second for your own budget, and pass the exact measured value as duration_seconds. The same probe also tells you whether the clip has audio, which matters because Kling motion control keeps the reference audio by default (keep_original_sound).

Check three more things while you have the numbers: the length is not over 30 seconds, it is not under Kling's 3-second floor, and the clip is one continuous take if you want one continuous motion.

What it adds up to

Inspect is billed at its own compute, and the public docs give no flat price for the probe, so check GET /v1/catalog for the live rate. Against a motion-control job that starts at $0.1575 per second, a measured number is a cheap safeguard. For the full set of reference rules, see the reference video requirements.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume