Sume STT: omit duration_seconds and it reserves 1 minute, not 9

A 9-minute file is $0.09 of Sume STT, but without duration_seconds the reserve is 1 minute, $0.01. Send 540. The field takes 1 to 600 seconds.

5 min readSume
All posts

For a 9-minute recording, pass duration_seconds: 540 to Sume STT. The transcription is $0.01 per audio minute, so a 9-minute file is $0.09. If you omit the field, the OpenAPI reference says the usage reservation is for 1 minute, which is $0.01, and the catalog lists a 10-minute maximum. A reserve of one cent for a nine-minute file is the wrong number to plan with.

What the documents say

The request schema describes duration_seconds as an optional integer from 1 to 600 used for the usage reservation, and says to omit it to reserve for 1 minute. The catalog entry for sume/stt-1.0 shows a price of $0.01 per audio minute, a minimum estimate of 1 cent and a maximum of 10 cents, which matches the 600-second ceiling. Neither source says how the final charge is settled when the supplied duration is wrong, so do not rely on a reserve being corrected afterwards; supply an accurate figure.

STT reserve by file length at the catalog price of $0.01 per audio minute; the field range and omit behavior are from the Sume OpenAPI reference, read 2026-10-09.
File lengthduration_seconds to sendReserve at $0.01 per minuteIf omitted
90 seconds90$0.0151 minute, $0.01
5 minutes300$0.051 minute, $0.01
9 minutes540$0.091 minute, $0.01
10 minutes600$0.101 minute, $0.01

Get the duration cheaply

If the audio came from a Sume video, audio detach returns duration_seconds in its result, so you already have the number. For a file you hold, read its length from the container header before you submit. Round up to a whole second since the field is an integer. A 541.3 second file is sent as 542.

Over 600 seconds, the field is rejected, so cut the file first. The detach and Timeline audio docs show how to split by range with a $0.01 job.

Why it matters for spend caps

A spend cap or a balance check works from the reserve. A batch of 200 nine-minute files submitted without durations would look like $2.00 of exposure while the work is $18.00. With durations the figures agree: 200 x $0.09 = $18.00. Tell your batch runner to refuse a file with no measured duration instead of defaulting, and keep Idempotency-Key values stable per file so a retry cannot pay twice. For the polling pattern use the jobs and results docs.

A small guard in code

In a batch script, compute the duration first and raise if it is missing or above 600: if not 1 <= secs <= 600, split the file. Pass math.ceil(secs) as duration_seconds. This single check removes the two mistakes in this post, an omitted field and an out-of-range one, and it costs nothing because the check happens before any job is accepted.

Mixed batches

A batch of mixed lengths shows the effect clearly. Take 40 files of 3 minutes and 10 files of 9 minutes: with durations, the reserve is 40 x $0.03 + 10 x $0.09 = $2.10. Without durations it would read 50 x $0.01 = $0.50, a quarter of the real figure. Report the larger number to whoever approves the budget.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume