Run the model on an existing recording

Create a new run of the Mental Wellness model for a specific user, with an existing file as input. Model runs require a recording of the user speaking, as well as some metadata about the user and the recording. The response contains: * An upload url which the contents of an existing recording can be uploaded to via a `PUT` call. * The id of the new model run which can be used to poll for results **after the recording has been uploaded**.

Authentication

x-api-keystring
Your API Activation Key

Request

This endpoint expects an object.
userobjectRequired
The user that this model run is being submitted for
languageenumRequired
The code of the language being spoken by the user in the recording to be uploaded
accentenumOptional
The accent of the user speaking, in addition to the language they are speaking
Allowed values:
sleepTimedatetimeOptional

When the user fell asleep for their last main sleep before the recording was made (as an ISO 8601 datetime). This should not include timezone information but it is assumed to be in the local timezone of the user in the recording so the time of day can be inferred.

wakeTimedatetimeOptional

When the user woke from their last main sleep before the recording was made (as an ISO 8601 datetime). This should not include timezone information but it is assumed to be in the local timezone of the user in the recording so the time of day can be inferred.

tagslist of objectsOptional
Name/Value pairs to tag a model run for later identification. Note: * Tag names must be unique * At most 20 tags are allowed per model run
deleteDatabooleanOptionalDefaults to false

Boolean flag indicating if user data is to be deleted after the completion of the model run. If True, the recordings, model inputs and model results will be deleted 12 hrs after the model run completes. Attempts to retrieve results after this time will receive a 404 error. If you wish to be more specific about which types of data are deleted, see the data_to_delete field below.

dataToDeletelist of enumsOptional
An array of data types to indicate which data inputs should be deleted after completion of the model run. To be used in combination with the `delete_data` boolean flag. Note: * If `delete_data` is set to `true` and `data_to_delete` value is omitted, all data will be deleted. * If `delete_data` is set to `true` and `data_to_delete` value is set to one or more data types, only the specified data will be deleted.
Allowed values:
recordingTimedatetimeOptional

When the recording was made (as an ISO 8601 datetime). This should not include timezone information but it is assumed to be in the local timezone of the user in the recording so the time of day can be inferred.

Response

Details of new model run created, including an upload link for the recording to input to the Mental Wellness model
idstringformat: "uuid"
The id of the newly created model run
recordingUploadUrlstring
The url to upload recording contents to via a `PUT` request. Note: * Recordings should contain at least 10 seconds of speech and be under 3 minutes long * Supported formats are FLAC, MP3, MP4, Ogg, WebM, WAV * The upload url is valid for 1 hour

Errors