Runs
A run is the record of one upload request or one realtime session. Each measured upload request and each realtime session is recorded as a run. The run endpoints return its status, the configuration it ran under, and the problems it reported, both while a session is in progress and after it closes. Measurements come only from the upload response or the session, so store the results you need. Recording never delays a measurement, so on rare occasions a run, or part of one, is not recorded.
Run IDs
A run’s run_id is the identifier it was given when it started:
- For an upload request, the
run_idin the response from Audio upload or Image upload. - For a realtime session, the
session_idinsession.created. See Sessions.
A run can take a moment to appear after the response or session.created message that carries its ID.
An audio upload is recorded as a run once its audio reaches measurement, and an image upload once its images reach the checks. A request that fails after that point, including an image upload whose first image fails its check, is recorded with status errored. One rejected earlier has no run. Error bodies carry a request_id but no run_id; quote the request_id when contacting support.
Runs are scoped to your organization. A run in another organization returns 404, the same as a run that does not exist.
Run status
Listing runs
GET /v1/expression/run returns your organization’s runs, newest first. The filters combine, so the request below returns the audio upload requests that started on October 9, 2024.
To send these requests from this page, open a panel and enter your API key.
How many runs to return, from 1 to 200.
The next_cursor of the previous page. See Pagination.
Only runs made by this user.
Only runs with this status: live, ended, or errored.
Only runs that reached the API this way: file for upload requests, realtime for sessions.
Only runs measured by this endpoint: audio or video.
Only runs that started at or after this time, in RFC 3339 format.
Only runs that started before this time, in RFC 3339 format.
started_after includes its boundary and started_before excludes it, so consecutive time windows that share a boundary neither skip a run nor return one twice.
The run’s ID. See Run IDs.
The Hume user who made the run.
See Run status.
audio or video.
file for an upload request, realtime for a session.
When the run started and ended. ended_at is null while the run is in progress. For a run reported errored because the server stopped hearing from it, ended_at is the last time the server heard from it.
Bytes of media the server took in. A realtime video frame counts once it passes the send-rate check, even if it is then rejected as invalid. null until the run ends, and for a run whose end was never recorded.
How far the server got in storing the run’s media, in bytes. Media that could not be stored is included, so this can exceed what was kept. null when the run’s media was not being stored, or when the server has not yet reported how much it stored, as early in a live run.
Billable seconds for the run. For audio, the duration of the audio the server took in. For video, one third of a second for each frame or image the server took in, regardless of frame rate, including a realtime frame rejected as invalid after it passed the send-rate check. A run that took in any media is billed at least 10 seconds, applied when the run ends. Updated while a realtime session is in progress. A failed upload request is not billed, and its run reports 0. See Billing.
Pagination
The list endpoint and the events endpoint return one page at a time. Every page but the last carries a next_cursor; on the last page the field is absent. Pass it back unchanged as cursor to fetch the next page. A cursor the endpoint did not issue is rejected with invalid_request.
Getting a run
GET /v1/expression/run/{run_id} returns the fields of the list, plus the configuration the run ran under and, for a realtime session, how the connection ended.
The WebSocket close code the session ended with, or 1011 if the connection was lost without a close frame. null for upload requests, for sessions still in progress, and for sessions whose close was not recorded, such as when the client’s close frame carried no code.
Why the session ended. When the server closed it: client_request, server_shutdown, idle_timeout, or error. When the connection was lost without a close frame: error. When the client closed the WebSocket: the reason text from its close frame. null for upload requests, for sessions still in progress, and for sessions whose close was not recorded, such as when the client’s close frame carried no code.
The configuration the run ran under, with every default filled in. An audio run has audio and measurement_timer_ms. A video run has image and face, with face.threshold and face.min_size.
The layout of the configuration document, v4. If you store configurations, branch on it so a later layout is recognized rather than misread.
Getting events
GET /v1/expression/run/{run_id}/events returns the problems a realtime session reported, in order: the frames it rejected and the failures it hit. A run with no problems has an empty log. The only event an upload request can record is video_recording_abandoned, on the image upload endpoint; any other upload problem fails the whole request and appears in its error response. Two kinds of problem are left out of the log: errors that answered a text message, such as config_invalid, and an internal_error on the audio endpoint, which shows as the run’s errored status.
The endpoint takes page_size (default 50, from 1 to 200) and cursor, and pages as described in Pagination.
The entry’s position in the log.
When the event was recorded.
What happened. See the table below.
Details that depend on kind: the reason a frame was rejected (detail), the size limit a message exceeded (limit_bytes), whether a measurement failure was temporary and how many failed in a row (retryable, consecutive), or why recording stopped (reason). Absent for rate_limited.
true when at least one kind of event reached its logging limit for the run. Events of that kind after the limit were not logged, so the log may undercount them. capped_kinds names the kinds. When gaps is true, at_cap can be false even though a limit was reached.
The kinds that reached their limit. Empty when none did.
true when entries are missing from the log: events that were numbered but never stored.
Errors
The run endpoints return the error body described in HTTP errors. A 401 carries only a message, and a request_id when an API key was rejected.

