Errors
Every Audio Decisions endpoint returns errors 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.
Response format
Always error.
A stable string to branch on. See Codes.
A description for logs and debugging. The wording may change without notice.
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.
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.
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
Handling errors
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.