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.

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.
| Declared | Billed seconds | Reservation | Problem |
|---|---|---|---|
| 10 | 10 | $1.575 | Below the real length; settlement is undocumented |
| 14.2 | 15 | $2.3625 | Correct: ceil of the measured length |
| 20 | 20 | $3.15 | Over-reserves by $0.7875 |
| 30 | 30 | $4.725 | Ties 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
- Reconcile Sume jobs after a deploy or outage: poll what is open
After downtime, read status for every job your own table still shows as open, honor terminal and result_ready, and never resubmit. Python with sqlite.
- Redact faces and license plates: Pillow first, AI edit only to replace
For redaction use Pillow boxes you control; use an AI mask edit on openai/gpt-image-2.5 only to replace a plate or face, from $0.0094 per image on Sume.
- Redeliver a missed video webhook after a bad deploy: one Sume call
Receiver down when the video finished? POST /v1/jobs/{job_id}/webhook/redeliver re-sends job.completed with a fresh signature. Scope, statuses, pitfalls.
- Restyle avatar clip captions with source_caption_id, no re-transcribe
To try a second caption look on an avatar video, send source_caption_id instead of the video URL. Sume reuses the word timings. Cost, errors and a worked flow.
Written by Sume