Skip to navigation

Billing

How Audio Decisions API usage is billed, how to estimate it before you send audio and where to check it.

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.

RequestBilled for
Create decision that succeedsIts input tokens
Create decision rejected with a 4xx status, such as audio_too_shortNot billed
Estimate input tokensNot billed
List runs and Get runNot billed

What adds input tokens

  1. 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.
  2. Each question, with its instructions and criteria, such as the options of a choice question. A question adds far fewer tokens than the audio, so ten questions about a minute of audio cost little more than one.
  3. 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.

curl https://api.cloud.hume.ai/v0/decisions/file/input_tokens \
-H "X-Hume-Api-Key: $HUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"audio_duration_ms": 300000,
"context": "A support call to an internet provider. The agent answers the call, and the caller reports an outage.",
"questions": {
"caller_frustration": {
"type": "score",
"instructions": "How frustrated does the caller sound?",
"criteria": ["Not at all", "2", "3", "4", "Extremely"]
}
}
}'
200 OK
{
"estimated_input_tokens": 25336
}
  1. audio_duration_ms accepts 5,000 to 300,000, the same 5 seconds to 5 minutes a decisions request accepts. A duration outside that range is rejected with audio_too_short or audio_too_long.
  2. 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.
  3. 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.
  4. The estimate can differ slightly from the billed count, since it counts the audio from its duration rather than the file.
  5. 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.

UseAudio sentEach requestTotal
Rate a text-to-speech clip on naturalness, glitches and mispronunciationOne 10 s clip1,0001,000
Review a support call with 6 questions, such as the caller’s frustration and the agent’s toneOne 5 min call26,40026,400
Follow a support call over time with the same 6 questions on each window10 windows of 30 s2,80028,000
Find each laugh in a recording with one noul question on each window20 overlapping 6 s windows per minute53010,600 per minute
Watch a live call for frustration and two people talking at once12 clips of 5 s per minute5306,400 per minute

Checking usage

  1. For one request, read received.input_tokens in its response.
  2. For past requests, List runs and Get run return each run’s billed input tokens as received.input_tokens. See Runs.
  3. For your organization, the Billing page of the Hume Platform shows usage and spend. Viewing it needs billing access to the organization.
Hume Platform pageWhat it shows
UsageUsage for each product by day
InvoicesPast invoices and the credits applied to them
PlanYour plan and the plans available
PaymentThe payment method

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.

Next steps