Skip to navigation

Limits and errors

The limits on audio, questions, context, and request rate, and the error format and codes of the Hume Audio Decisions endpoints.

A request to Hume Audio Decisions takes one audio file of 1 second to 5 minutes and up to 25,000,000 bytes, up to 20 noul, choice, and score questions, and up to 5 span questions. Each organization can send 600 requests per minute. Each limit table names the error a request outside that limit returns, and Codes says what each code means.

Audio

LimitValueOutside the limit
Duration1 second to 5 minutesaudio_too_short or audio_too_long
Request size25,000,000 bytes, the request and file parts togetherpayload_too_large
FormatMP3 or WAVaudio_format_unsupported
Files1 per requestmessage_invalid

To evaluate a recording longer than 5 minutes, split it into files of 5 minutes or less and send one request per file. Keep every part at least 1 second long, and at least 5 seconds for most questions.

Which limit a file reaches first

Uncompressed WAV usually reaches the size limit before 5 minutes. The request part adds little, so the size of the audio file decides which limit applies:

AudioSize of 5 minutesLongest file that fits
WAV, 16-bit, 48 kHz stereo57.6 MBAbout 2 min 10 s
WAV, 16-bit, 44.1 kHz stereo52.9 MBAbout 2 min 20 s
WAV, 16-bit, 48 kHz mono28.8 MBAbout 4 min 20 s
WAV, 16-bit, 44.1 kHz mono26.5 MBAbout 4 min 40 s
WAV, 16-bit, 24 kHz mono14.4 MB5 minutes
WAV, 16-bit, 16 kHz mono9.6 MB5 minutes
MP3, 128 kbps4.8 MB5 minutes

To fit a longer WAV file under the size limit, convert it to 16 kHz mono. The model hears audio as one channel at 16 kHz, so a higher sample rate or a second channel does not improve answers, and 5 minutes of 16 kHz mono WAV fits in 9.6 MB:

Shell
ffmpeg -i call.wav -ac 1 -ar 16000 -sample_fmt s16 call_mono.wav

Questions and context

LimitValueOutside the limit
Questions1 to 25 per request: up to 20 noul, choice and score questions together, and up to 5 span questionsmessage_invalid
Question ID1 to 256 charactersmessage_invalid
instructions1 to 500 charactersquestion_invalid
noul criteriatrue and false of 1 to 300 characters eachquestion_invalid
choice options2 to 20 per question, each with a unique name of 1 to 50 characters and an optional description of 1 to 100 charactersquestion_invalid
score levels2 to 10 per question, each unique and 1 to 150 charactersquestion_invalid
contextUp to 1,000 charactersmessage_invalid

Rate limits

LimitValueOutside the limit
Requests600 per minute per organization429 Too Many Requests

The limit counts requests to every Hume Audio Decisions endpoint over a sliding 60-second window, and every API key in an organization shares it. A 429 carries a Retry-After header with the number of seconds to wait before retrying. See Handling errors.

Response format

Every Hume Audio Decisions endpoint returns an error as a JSON body with a 4xx or 5xx status. The status says how the request failed, and code says why. Branch on code in your application, and use message for logs and debugging.

400 Bad Request
{
"type": "error",
"code": "question_invalid",
"message": "score criteria must define at least 2 levels",
"param": "/questions/clarity/criteria",
"request_id": "req_01JB8XA3C5RD"
}
type

Always error.

code

A stable string to branch on. See Codes.

message

A description for logs and debugging. The wording may change without notice.

param

Where the error was found: a JSON Pointer into the request part or the input tokens body, or the name of a part or header. For a field that is missing, unknown or of the wrong type, it can name an enclosing object, such as the question, instead of the field. Absent when the error has no narrower location than the whole request.

request_id

Identifies the request in Hume’s records. Quote it when contacting support.

Gateway errors

Hume’s API gateway answers three errors before the request reaches the service: a 401 for a missing or invalid credential, a 429 for a rate limit and a 404 for a path or HTTP method the API does not serve. Their body has a message but no type or code, so branch on the status for these.

429 Too Many Requests
{
"message": "API rate limit exceeded"
}

Of these, a 404 always carries a request_id, a 401 carries one only when an API key was rejected, and a 429 never does.

Codes

StatusCodeDescription
400message_invalidThe request body is malformed or does not match the schema outside a question. Examples are a decisions request with no request part or with no file part or more than one, an input tokens request with no audio_duration_ms and a request with more questions than the limits allow, a question ID longer than 256 characters or a context longer than 1,000 characters. See Questions and context.
400question_invalidA question is invalid, including when it does not match the schema, for example because it has duplicate option names, fewer than two options or instructions longer than 500 characters. See Questions and context.
400audio_decode_failedThe audio file could not be decoded.
400audio_format_unsupportedThe audio file is not MP3 or WAV.
400audio_too_shortThe audio is shorter than 1 second, or audio_duration_ms is under 1000.
400audio_too_longThe audio is longer than 5 minutes, or audio_duration_ms is over 300000.
400invalid_requestA query parameter has a value the endpoint does not accept, or cursor is not one the endpoint issued. List runs only.
401No codeThe request carried no valid API key. See Authentication.
402payment_requiredThe organization has no payment method on file, or has an unpaid invoice. An admin can update its payment method in the Hume Platform.
403forbiddenThe credential does not grant access to this API, or the organization is not permitted to use it. Request access on the Decisions API page.
404not_foundNo run with this ID exists in your organization. Get run only.
404No codeNo endpoint exists at this path, or the endpoint does not accept this HTTP method.
413payload_too_largeThe request body is larger than 25,000,000 bytes: for a decisions request, its request and file parts together. See which limit a file reaches first.
415unsupported_media_typeThe request body is not multipart/form-data for a decisions request, or not application/json for an input tokens request.
429No codeThe organization sent more than 600 requests in a minute. See Rate limits.
500internal_errorThe server failed while serving the request.
503server_busyThe service is at capacity.

Handling errors

StatusWhat to do
400, 413, 415 and 404 with no codeCorrect what code and param name, or the path or HTTP method, then resend. The same request fails again if sent unchanged.
401, 402, 403Correct the credential or the organization’s account: see Authentication for a 401, update the payment method for a 402, and request access on the Decisions API page for a 403. The request itself needs no change.
404 with not_foundIf the run_id came from a decisions response moments ago, wait a few seconds and retry, since a run can take a moment to appear. If it still returns 404, the run was not recorded or the ID is wrong. See Runs.
429, 503Wait the number of seconds in the Retry-After header, then retry.
500Retry. If it keeps failing, contact support with the request_id.

Reporting a problem

When contacting support, include the request ID. Every response from the service, including a success, carries it in the X-Request-Id header, and every error body from the service carries it as request_id.