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

FieldTypeDescription
EfloatEndurance (0–1). Higher = greater aerobic capacity
VmaxfloatMaximum speed (m/s). The absolute top speed this person can achieve
V5floatInternal speed parameter (m/s). Use Vmax for display and interpretation
PfloatHRmax (bpm). Model-predicted maximum heart rate
confidencefloatOverall confidence (0–1). Product of criteria below
dataQualityCriterionfloatData quality score (0–1)
fitQualityCriterionfloatModel fit quality (0–1)
intensityCriterionfloatExercise intensity appropriateness (0.9–1.0)

Bayesian estimates (from memory — use these, not the raw values above):

FieldTypeDescription
trueEfloatBayesian-refined endurance
trueVmaxfloatBayesian-refined maximum speed (m/s)
trueV5floatBayesian-refined internal speed parameter
truePfloatBayesian-refined HRmax
trueConfidencefloatAccumulated confidence (0–10)

Conditional fields

FieldConditionTypeDescription
predictionreturnPrediction: truefloat[]Predicted HR array, one per data sample
VfixedSpeed: truefloatV-scale intensity at the test speed
propOfMaxfixedSpeed: truefloatRecovery start / max tolerable duration
statsreturnStats: trueobjectFull derived metrics (see Derived Metrics)
errorsreturnErrors: trueobjectMemory 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.

FieldTypeDescription
secsSinceEpochintTimestamp of this analysis
confidencefloatAccumulated confidence (0–10 scale)
minKeystringBest parameter combination key
minValuefloatLowest error value
cutoffValuefloatError cutoff for pruning
keysint[]Parameter combination keys
errorsX1000int[]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