Skip to main content

Input Data

Current session

The POST /predict endpoint accepts a JSON payload with the following structure:

{
"current_session": {
"HR_day_1h": [/* array of heart rate samples */],
"RR_day_1h": [/* array of respiratory rate samples */],
"HR_night_imputed": [/* array of imputed night heart rate samples */],
"RR_night_imputed": [/* array of imputed night respiratory rate samples */],
"sleepTimeSeconds": 28800,
"deepSleepSeconds": 7200,
"remSleepSeconds": 5400,
"lightSleepSeconds": 14400,
"awakeSleepSeconds": 900,
"age": 30,
"height_cm": 175,
"weight_kg": 70.5,
"sex": "M" /* or "F" or null */
},

Historical data (optional)

To provide historical data, include the following arrays:

  • past_sessions: Up to 5 previous sessions, formatted exactly like current_session.
  • past_target: Previous model response scores corresponding to those sessions.

Note: Both arrays must strictly match in length and sequence. Specifically, the score at past_target[i] must correspond directly to the session at past_sessions[i].

"current_session": { /* current session data */ },
"past_target": [
{
/* scores for past session 1 */
"C_SCORE": 85.0,
"attention": 80.0,
"memory": 90.0,
"reasoning": 88.0,
"stress": 20.0,
"valence": "High",
"arousal": "High"
},
{
/* scores for past session 2 */
}
/* up to 5 past target score objects */
]
"past_sessions": [
{
/* session data for past session 1 */
},
{
/* session data for past session 2 */
}
/* up to 5 past sessions */
],
}

Full payload example

{
"current_session": {
"HR_day_1h": [
68, 72, 75, 71, 69, 74, 78, 80, 76, 73, 70, 72, 75, 74, 71, 69, 73, 77,
79, 74, 72, 70, 68, 71, 73, 76, 74, 71, 69, 72
],
"RR_day_1h": [
920, 900, 870, 910, 930, 885, 850, 840, 870, 895, 920, 900, 875, 880, 910,
930, 890, 860, 845, 880, 900, 920, 940, 915, 895, 870, 885, 910, 930, 905
],
"HR_night_imputed": [
62, 61, 60, 59, 60, 58, 57, 56, 57, 58, 59, 60, 61, 60, 59, 58, 57, 58,
59, 60, 61, 62, 63, 62, 61, 60, 59, 58, 57, 58, 59, 60, 61, 60, 59, 58,
57, 56, 57, 58, 59, 60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58, 57, 56,
55, 56, 57, 58, 59, 60, 61, 62, 63, 62, 61, 60, 59, 58, 57, 58, 59, 60,
61, 62, 63, 64, 63, 62, 61, 60, 59, 58, 59, 60, 61, 62, 63, 64, 65, 64,
63, 62, 61, 60, 59, 58, 57, 58, 59, 60, 61, 62, 63, 64, 65, 64, 63, 62,
61, 60, 59, 58, 57, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 65, 64,
63, 62, 61, 60, 59, 58, 57, 58, 59, 60, 61, 62, 63, 64, 65, 64, 63, 62,
61, 60, 59, 58, 57, 56, 57, 58, 59, 60, 61, 62, 63, 62, 61, 60, 59, 58,
57, 56, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58,
57, 58, 59, 60, 61, 62, 63, 64, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 66, 65, 64, 63, 62, 61, 60,
59, 58, 57, 58, 59, 60, 61, 62, 63, 64, 65, 64, 63, 62, 61, 60, 59, 58,
57, 56, 57, 58, 59, 60
],
"RR_night_imputed": [
950, 960, 970, 980, 975, 990, 1000, 1010, 1005, 995, 985, 975, 970, 980,
990, 1000, 1010, 1005, 995, 985, 975, 965, 960, 970, 980, 990, 1000, 1010,
1005, 995, 985, 975, 970, 980, 990, 1000, 1010, 1020, 1015, 1005, 995,
985, 975, 965, 960, 955, 960, 970, 980, 990, 1000, 1010, 1020, 1030, 1025,
1015, 1005, 995, 985, 975, 965, 960, 955, 960, 970, 980, 990, 1000, 1010,
1005, 995, 985, 975, 965, 960, 955, 950, 960, 970, 980, 990, 985, 975,
965, 960, 955, 950, 960, 970, 980, 990, 1000, 1010, 1005, 995, 985, 975,
970, 980, 990, 1000, 1010, 1020, 1015, 1005, 995, 985, 975, 970, 965, 960,
955, 950, 960, 970, 980, 990, 1000, 1010, 1005, 995, 985, 975, 970, 980,
990, 1000, 1010, 1020, 1015, 1005, 995, 985, 975, 965, 960, 955, 950, 960,
970, 980, 990, 1000, 1010, 1005, 995, 985, 975, 970, 980, 990, 1000, 1010,
1020, 1030, 1025, 1015, 1005, 995, 985, 975, 965, 960, 955, 950, 960, 970,
980, 990, 1000, 1010, 1005, 995, 985, 975, 970, 980, 990, 1000, 1010,
1005, 995, 985, 975, 970, 980, 990, 1000, 1010, 1020, 1015, 1005, 995,
985, 975, 965, 960, 955, 950, 960, 970, 980, 990, 1000, 1010, 1005, 995,
985, 975, 970, 975, 985, 995, 1005, 1000, 990, 980, 970, 965, 960, 955,
960, 970, 975, 980, 985
],
"sleepTimeSeconds": 25200,
"deepPercentage": 18.5,
"remPercentage": 22.3,
"lightPercentage": 54.2,
"awakeSleepSeconds": 900,
"deepSleepSeconds": 4662,
"lightSleepSeconds": 13658,
"remSleepSeconds": 5620,
"age": 28,
"height_cm": 175,
"weight_kg": 72,
"sex": "M"
},
"past_targets": [
{
"C_SCORE": 85.0,
"attention": 80.0,
"memory": 90.0,
"reasoning": 88.0,
"stress": 20.0,
"valence": "High",
"arousal": "High"
},
{
"C_SCORE": 78.5,
"attention": 75.0,
"memory": 38.5,
"reasoning": 47.0,
"stress": 45.0,
"valence": "Low",
"arousal": "High"
}
],
"past_sessions": [
{
"HR_day_1h": [
70, 74, 76, 72, 68, 75, 79, 81, 77, 74, 71, 73, 76, 75, 72, 70, 74, 78,
80, 75, 73, 71, 69, 72, 74, 77, 75, 72, 70, 73
],
"RR_day_1h": [
910, 890, 860, 900, 920, 875, 840, 830, 860, 885, 910, 890, 865, 870,
900, 920, 880, 850, 835, 870, 890, 910, 930, 905, 885, 860, 875, 900,
920, 895
],
"HR_night_imputed": [
63, 62, 61, 60, 61, 59, 58, 57, 58, 59, 60, 61, 62, 61, 60, 59, 58, 59,
60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58, 59, 60, 61, 62, 61, 60, 59,
58, 57, 58, 59, 60, 61, 62, 63, 64, 65, 64, 63, 62, 61, 60, 59, 58, 57,
56, 57, 58, 59, 60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58, 59, 60, 61,
62, 63, 64, 65, 64, 63, 62, 61, 60, 59, 60, 61, 62, 63, 64, 65, 66, 65,
64, 63, 62, 61, 60, 59, 58, 59, 60, 61, 62, 63, 64, 65, 66, 65, 64, 63,
62, 61, 60, 59, 58, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 66, 65,
64, 63, 62, 61, 60, 59, 58, 59, 60, 61, 62, 63, 64, 65, 66, 65, 64, 63,
62, 61, 60, 59, 58, 57, 58, 59, 60, 61, 62, 63, 64, 63, 62, 61, 60, 59,
58, 57, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 64, 63, 62, 61, 60, 59,
58, 59, 60, 61, 62, 63, 64, 65, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 67, 66, 65, 64, 63, 62, 61,
60, 59, 58, 59, 60, 61, 62, 63, 64, 65, 66, 65, 64, 63, 62, 61, 60, 59,
58, 57, 58, 59, 60, 61
],
"RR_night_imputed": [
940, 950, 960, 970, 965, 980, 990, 1000, 995, 985, 975, 965, 960, 970,
980, 990, 1000, 995, 985, 975, 965, 955, 950, 960, 970, 980, 990, 1000,
995, 985, 975, 965, 960, 970, 980, 990, 1000, 1010, 1005, 995, 985, 975,
965, 955, 950, 945, 950, 960, 970, 980, 990, 1000, 1010, 1020, 1015,
1005, 995, 985, 975, 965, 955, 950, 945, 950, 960, 970, 980, 990, 1000,
995, 985, 975, 965, 955, 950, 945, 940, 950, 960, 970, 980, 975, 965,
955, 950, 945, 940, 950, 960, 970, 980, 990, 1000, 995, 985, 975, 965,
960, 970, 980, 990, 1000, 1010, 1005, 995, 985, 975, 965, 960, 955, 950,
945, 940, 950, 960, 970, 980, 990, 1000, 995, 985, 975, 965, 960, 970,
980, 990, 1000, 1010, 1005, 995, 985, 975, 965, 955, 950, 945, 940, 950,
960, 970, 980, 990, 1000, 995, 985, 975, 965, 960, 970, 980, 990, 1000,
1010, 1020, 1015, 1005, 995, 985, 975, 965, 955, 950, 945, 940, 950,
960, 970, 980, 990, 1000, 995, 985, 975, 965, 960, 970, 980, 990, 1000,
1010, 1005, 995, 985, 975, 965, 960, 970, 980, 990, 1000, 1005, 1000,
990, 980, 970, 965, 960, 955, 950, 960, 970, 980, 990, 1000, 1005, 1000,
990, 980, 970, 965, 960, 975, 980, 990, 995, 990, 980, 970, 960, 955,
950, 945, 950, 960, 965, 970, 975
],
"sleepTimeSeconds": 26100,
"deepPercentage": 19.2,
"remPercentage": 21.8,
"lightPercentage": 54.0,
"awakeSleepSeconds": 800,
"deepSleepSeconds": 5011,
"lightSleepSeconds": 14095,
"remSleepSeconds": 5690,
"age": 28,
"height_cm": 175,
"weight_kg": 72,
"sex": "M"
},
{
"HR_day_1h": [
66, 70, 73, 69, 67, 72, 76, 78, 74, 71, 68, 70, 73, 72, 69, 67, 71, 75,
77, 72, 70, 68, 66, 69, 71, 74, 72, 69, 67, 70
],
"RR_day_1h": [
930, 910, 880, 920, 940, 895, 860, 850, 880, 905, 930, 910, 885, 890,
920, 940, 900, 870, 855, 890, 910, 930, 950, 925, 905, 880, 895, 920,
940, 915
],
"HR_night_imputed": [
61, 60, 59, 58, 59, 57, 56, 55, 56, 57, 58, 59, 60, 59, 58, 57, 56, 57,
58, 59, 60, 61, 62, 61, 60, 59, 58, 57, 56, 57, 58, 59, 60, 59, 58, 57,
56, 55, 56, 57, 58, 59, 60, 61, 62, 63, 62, 61, 60, 59, 58, 57, 56, 55,
54, 55, 56, 57, 58, 59, 60, 61, 62, 61, 60, 59, 58, 57, 56, 57, 58, 59,
60, 61, 62, 63, 62, 61, 60, 59, 58, 57, 58, 59, 60, 61, 62, 63, 64, 63,
62, 61, 60, 59, 58, 57, 56, 57, 58, 59, 60, 61, 62, 63, 64, 63, 62, 61,
60, 59, 58, 57, 56, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 64, 63,
62, 61, 60, 59, 58, 57, 56, 57, 58, 59, 60, 61, 62, 63, 64, 63, 62, 61,
60, 59, 58, 57, 56, 55, 56, 57, 58, 59, 60, 61, 62, 61, 60, 59, 58, 57,
56, 55, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 62, 61, 60, 59, 58, 57,
56, 57, 58, 59, 60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 65, 64, 63, 62, 61, 60, 59,
58, 57, 56, 57, 58, 59, 60, 61, 62, 63, 64, 63, 62, 61, 60, 59, 58, 57,
56, 55, 56, 57, 58, 59
],
"RR_night_imputed": [
960, 970, 980, 990, 985, 1000, 1010, 1020, 1015, 1005, 995, 985, 980,
990, 1000, 1010, 1020, 1015, 1005, 995, 985, 975, 970, 980, 990, 1000,
1010, 1020, 1015, 1005, 995, 985, 980, 990, 1000, 1010, 1020, 1030,
1025, 1015, 1005, 995, 985, 975, 970, 965, 970, 980, 990, 1000, 1010,
1020, 1030, 1040, 1035, 1025, 1015, 1005, 995, 985, 975, 970, 965, 970,
980, 990, 1000, 1010, 1020, 1015, 1005, 995, 985, 975, 970, 965, 960,
970, 980, 990, 1000, 995, 985, 975, 970, 965, 960, 970, 980, 990, 1000,
1010, 1020, 1015, 1005, 995, 985, 980, 990, 1000, 1010, 1020, 1030,
1025, 1015, 1005, 995, 985, 980, 975, 970, 965, 960, 970, 980, 990,
1000, 1010, 1020, 1015, 1005, 995, 985, 980, 990, 1000, 1010, 1020,
1030, 1025, 1015, 1005, 995, 985, 975, 970, 965, 960, 970, 980, 990,
1000, 1010, 1020, 1015, 1005, 995, 985, 980, 990, 1000, 1010, 1020,
1030, 1040, 1035, 1025, 1015, 1005, 995, 985, 975, 970, 965, 960, 970,
980, 990, 1000, 1010, 1020, 1015, 1005, 995, 985, 980, 990, 1000, 1010,
1020, 1025, 1020, 1010, 1000, 990, 985, 980, 975, 970, 980, 990, 1000,
1010, 1020, 1025, 1020, 1010, 1000, 990, 985, 980, 990, 1000, 1010,
1015, 1010, 1000, 990, 980, 975, 970, 965, 975, 980, 990, 995
],
"sleepTimeSeconds": 27000,
"deepPercentage": 17.8,
"remPercentage": 23.1,
"lightPercentage": 54.1,
"awakeSleepSeconds": 1050,
"deepSleepSeconds": 4806,
"lightSleepSeconds": 14607,
"remSleepSeconds": 6237,
"age": 28,
"height_cm": 175,
"weight_kg": 72,
"sex": "M"
}
]
}