Migration Notice: We’re excited to announce that this service will soon transition to a new, improved platform: the youSleep Portal.

The youSleep Portal offers several new features, including faster processing, support for scoring multiple studies simultaneously, more comprehensive visualization tools for signal and analysis outputs, and the ability to run pipelines of sleep analysis algorithms like U-Sleep on your data.

The research version of U-Sleep, available here, will also be accessible on the youSleep Portal.

Thank you using U-Sleep in your research! We look forward to bringing you this upgraded service.

U-Sleep API

Overview

It is possible to access the U-Sleep services programmatically using the U-Sleep Web API. The API exposes a set of endpoints for controlling the Sleep Stager, such as setting a model, uploading files, fetching logs and downloading the predicted hypnogram.

The U-Sleep Web API allows for automated scoring of large collections of files without having to repeatedly step through the Sleep Stager. It is also possible to queue multiple prediction sessions concurrently.

Getting Access to the API
To request access to the API, please fill the API Access Request Form.

Terms
Any use of the U-Sleep Web API or Python bindings is subject to the Privacy Policy and Terms of Service .

Python Bindings
A preliminary set of Python bindings to the API are available here. The repository also contains an annotated example of how to use the Python bindings.

Sessions

When using the U-Sleep Web API it is possible to queue multiple prediction sessions concurrently (currently limited to 5 maximum concurrent sessions per user).

All /api/v1/sleep_stager/* endpoints accept the path parameter {session_name}, e.g., /api/v1/sleep_stager/default/set_model. Each session stores information on which model to use, what file to predict on and handles to output log- and hypnogram files. Note that the default session is used by the browser when accessing U-Sleep via the Sleep Stager.