Billing
The Audio Decisions API bills each request by its input tokens: the audio you send, plus the text of your questions and context. Answers are not billed. Each decisions response gives the input tokens it is billed as received.input_tokens.
What adds input tokens
- The length of the audio, which makes up most of a request’s tokens. Every second is counted, including silence. The tokens come from the duration, so the sample rate, the number of channels and the file format do not change them.
- Each question, with its instructions and
criteria, such as the options of achoicequestion. A question adds far fewer tokens than the audio, so ten questions about a minute of audio cost little more than one. - The
context, if you send one.
How you cut the audio matters mostly through overlap. Windows that overlap send the same audio more than once, so windows that overlap by half about double the tokens. Windows that do not overlap cost only a little more than one request for the whole file, since each request repeats its questions and context. See Examples.
Estimate before you send
Estimate input tokens returns the input tokens a request would be billed, without sending any audio. It takes the same context and questions as the request part of a decisions request, plus audio_duration_ms, the duration of the audio in milliseconds.
audio_duration_msaccepts 5,000 to 300,000, the same 5 seconds to 5 minutes a decisions request accepts. A duration outside that range is rejected withaudio_too_shortoraudio_too_long.- Estimate a job before you run it. For many files with the same questions, estimate once for each typical duration and multiply by the number of files, or estimate each file from its duration.
- Compare plans for cutting the audio, such as one request for a whole call against overlapping windows, before you choose one. See Preparing your audio.
- The estimate can differ slightly from the billed count, since it counts the audio from its duration rather than the file.
- An estimate counts toward the rate limit like any other request.
Examples
The input tokens below are rounded estimates. They use short questions like those in Writing questions and a one-sentence context. Estimate your own requests for exact numbers.
Checking usage
- For one request, read
received.input_tokensin its response. - For past requests, List runs and Get run return each run’s billed input tokens as
received.input_tokens. See Runs. - For your organization, the Billing page of the Hume Platform shows usage and spend. Viewing it needs billing access to the organization.
A decisions request from an organization that has no payment method on file, or has an unpaid invoice, is rejected with 402 payment_required. An admin can update the payment method on the Payment page.
Pricing
For plans and prices, see the Plan page of the Hume Platform. To discuss volume or a custom plan, contact sales.