Skip to navigation

Create decision

Asks questions about one audio file and returns an answer to each, with the run_id of the model run that produced them. Each answer estimates how human raters would respond, so you choose the thresholds for acting on it.

All the questions in a request are answered in one model inference, so an answer can change when other questions are added, removed or reordered. To compare answers across recordings, send the same questions in the same order. To evaluate several files, send one request per file.

Authentication

X-Hume-Api-Keystring
API Key authentication via header

Request

This endpoint expects a multipart form containing a file.
requestobjectRequired

The request part: the questions to answer and optional context.

questionsmap from strings to objectsRequired

The questions to answer: at most 20 noul, choice and score questions together, and at most 5 span questions. Each key is a question ID you choose, such as agent_tone, and can be any non-empty string of up to 256 characters. The response returns each answer under the same ID.

contextstringOptional<=1000 characters
Background information the model considers alongside the audio, such as the setting or who is speaking.
filefileRequired

The audio file, MP3 or WAV, in a part named file.

Response

The answer to each question, keyed by question ID, and the run_id of the model run that produced the answers.

run_idstringformat: "uuid"
Identifies this request's run. Pass it to the run endpoints to look the run up. A run can take a moment to appear, and under heavy load may not be recorded.
answersmap from strings to objects
The answer to each question, keyed by question ID.
noulobject

The answer to a noul question.

OR
choiceobject

The answer to a choice question.

OR
scoreobject

The answer to a score question.

OR
spanobject

The answer to a span question.

receivedobject
What the model received for a decisions request, which is what the request is billed.
input_tokensinteger>=0

The input tokens this request is billed. POST /v0/decisions/file/input_tokens estimates them before a request is sent.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
413
Content Too Large Error
415
Unsupported Media Type Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error