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": [
/* array of night heart rate samples */
],
"RR_night": [
/* array of 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 likecurrent_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": [
14, 15, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 15, 14, 15, 16, 17,
16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16
],
"HR_night": [
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": [
16, 17, 18, 17, 16, 19, 22, 20, 19, 22, 22, 18, 19, 19, 21, 22, 20, 20,
22, 21, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17,
20, 19, 18, 17, 16, 15, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17,
17, 18, 19, 20, 21, 22, 21, 20, 19, 20, 18, 17, 17, 18, 19, 20, 21, 22,
20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 16, 17,
19, 20, 21, 22, 21, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22, 21, 20,
18, 17, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 16, 17, 18, 19,
21, 22, 21, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18,
16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21,
21, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22
],
"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": [
15, 16, 17, 16, 15, 16, 17, 18, 17, 16, 15, 16, 17, 16, 15, 16, 17, 18,
17, 16, 15, 16, 17, 18, 17, 16, 15, 16, 17
],
"HR_night": [
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": [
16, 17, 18, 17, 16, 19, 22, 20, 19, 22, 22, 20, 19, 18, 17, 16, 17, 18,
19, 20, 21, 22, 23, 22, 21, 20, 19, 18, 17, 18, 19, 20, 21, 22, 23, 22,
21, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22, 23, 22, 21, 20, 19, 18,
19, 20, 21, 22, 23, 22, 21, 20, 19, 20, 18, 17, 17, 18, 19, 20, 21, 22,
21, 20, 19, 18, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19, 20,
21, 22, 21, 20, 19, 18, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18,
19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18,
17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19, 20, 21, 22, 21, 20,
19, 18, 17, 18, 19, 20, 21, 22
],
"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": [
14, 15, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 15, 14, 15, 16, 17,
16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17,
16, 15, 14, 15, 16, 17, 16, 15, 14, 15, 16, 17, 16, 15, 14, 15
],
"HR_night": [
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": [
15, 16, 17, 16, 15, 18, 21, 19, 18, 21, 21, 19, 18, 17, 16, 15, 16, 17,
18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22, 21,
20, 19, 18, 17, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19,
20, 21, 22, 21, 20, 19, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19,
20, 21, 22, 21, 20, 19, 18, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17,
18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19, 20, 21, 22, 21, 20, 19,
18, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19, 20, 21, 22, 21,
20, 19, 18, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19, 20, 21,
22, 21, 20, 19, 18, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19,
16, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 18, 19, 20, 21, 22,
21, 20, 19, 18, 17, 18, 19, 20, 21, 22
],
"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"
}
]
}