API Reference
Output Format
Complete result schema — core parameters, confidence, prediction, and memory.
The response is the original input JSON with a result object added, plus an updated memory if fitting was performed.
Core result fields
| Field | Type | Description |
|---|---|---|
E | float | Endurance (0–1). Higher = greater aerobic capacity |
Vmax | float | Maximum speed (m/s). The absolute top speed this person can achieve |
V5 | float | Internal speed parameter (m/s). Use Vmax for display and interpretation |
P | float | HRmax (bpm). Model-predicted maximum heart rate |
confidence | float | Overall confidence (0–1). Product of criteria below |
dataQualityCriterion | float | Data quality score (0–1) |
fitQualityCriterion | float | Model fit quality (0–1) |
intensityCriterion | float | Exercise intensity appropriateness (0.9–1.0) |
Bayesian estimates (from memory — use these, not the raw values above):
| Field | Type | Description |
|---|---|---|
trueE | float | Bayesian-refined endurance |
trueVmax | float | Bayesian-refined maximum speed (m/s) |
trueV5 | float | Bayesian-refined internal speed parameter |
trueP | float | Bayesian-refined HRmax |
trueConfidence | float | Accumulated confidence (0–10) |
Conditional fields
| Field | Condition | Type | Description |
|---|---|---|---|
prediction | returnPrediction: true | float[] | Predicted HR array, one per data sample |
V | fixedSpeed: true | float | V-scale intensity at the test speed |
propOfMax | fixedSpeed: true | float | Recovery start / max tolerable duration |
stats | returnStats: true | object | Full derived metrics (see Derived Metrics) |
errors | returnErrors: true | object | Memory error surface for Bayesian updates |
Example response (fit mode)
{
"result": {
"E": 0.65,
"Vmax": 4.71,
"V5": 4.2,
"P": 185.0,
"confidence": 0.82,
"trueE": 0.64,
"trueVmax": 4.68,
"trueV5": 4.18,
"trueP": 184.0,
"trueConfidence": 3.5,
"prediction": [80.0, 82.3, 85.1, ...]
},
"memory": {
"secsSinceEpoch": 1712000000,
"confidence": 0.82,
"minKey": "18504265",
"minValue": 12.5,
"cutoffValue": 15.0,
"keys": [18504265, 18504266, ...],
"errorsX1000": [12500, 13200, ...]
}
}
Bayesian memory fields
The memory object is returned when fit: true. Pass it back as input for the next session to enable multi-session parameter refinement.
| Field | Type | Description |
|---|---|---|
secsSinceEpoch | int | Timestamp of this analysis |
confidence | float | Accumulated confidence (0–10 scale) |
minKey | string | Best parameter combination key |
minValue | float | Lowest error value |
cutoffValue | float | Error cutoff for pruning |
keys | int[] | Parameter combination keys |
errorsX1000 | int[] | Errors × 1000 (integer-encoded) |
See Bayesian Memory for key encoding and decay mechanics.
Speed unit note
Vmax is returned in m/s. To convert:
- km/h: multiply by 3.6
- mph: multiply by 2.237