Longevity Score API¶
Turn daily biometric and lifestyle signals into a practical longevity score with structured improvement priorities.
Endpoint¶
GET /api/v1/fitness/longevity-scorePOST /api/v1/fitness/longevity-score/post
Parameters¶
| Name | Type | Required | In | Description |
|---|---|---|---|---|
resting_hr | number (30-120) | Yes | Query/Body | Resting heart rate (bpm). |
vo2max | number (10-90) | Yes | Query/Body | VO2 max estimate/value. |
body_fat_percentage | number (3-60) | Yes | Query/Body | Body fat percentage. |
sleep_hours | number (0-16) | Yes | Query/Body | Average sleep hours. |
weekly_activity_minutes | integer (0-2000) | Yes | Query/Body | Total weekly active minutes. |
lang | string | No | Query | Response language (en,es,de,fr,pt,ja,hi,ar). |
Why Use This Endpoint¶
- Bundle longevity and cardiometabolic risk into one model output.
- Return operational targets and compliance priorities.
- Enable coaching or preventive-care automation at scale.
Request Example¶
curl -X GET "https://api.hefitapi.com/api/v1/fitness/longevity-score?resting_hr=62&vo2max=42&body_fat_percentage=21&sleep_hours=7.4&weekly_activity_minutes=210&lang=en" \
-H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/fitness/longevity-score/post?lang=en" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"resting_hr":68,"vo2max":35,"body_fat_percentage":28,"sleep_hours":6.5,"weekly_activity_minutes":160}'
Response Example¶
Info
The response example below is for demonstration purposes only. Make a live request to this endpoint to receive the full, real-time, and potentially richer JSON structure.
{
"longevity_score": 71,
"cardiometabolic_risk": {
"level": "low",
"level_label": "Low",
"insight": "Current profile supports favorable long-term cardiometabolic outlook."
},
"lifestyle_improvement_priorities": [
"Progress aerobic capacity with consistent zone-2 work",
"Stabilize sleep timing for recovery quality"
],
"longevity_action_plan": ["Maintain weekly movement baseline and progression"],
"quarterly_targets": ["Improve VO2max trend", "Hold resting HR within target band"],
"compliance_priorities": ["Adhere to weekly training minimum"],
"medical_escalation_flags": [],
"component_scores": {
"resting_hr_score": 62,
"vo2max_score": 63,
"body_fat_score": 97,
"sleep_score": 90,
"activity_score": 85
},
"inputs": {
"resting_hr_bpm": 62.0,
"vo2max": 42.0,
"body_fat_percentage": 21.0,
"sleep_hours": 7.4,
"weekly_activity_minutes": 210
},
"summary": "Low-risk longevity profile with targeted optimization opportunities.",
"language": "en",
"_enterprise": {
"client": "Acme Health",
"plan": "pro",
"request_id": "fe6c1f1be07d4dd2",
"quota": 120,
"usage_tracking": true
},
"_api_metadata_": {
"endpoint_name": "fitness_longevity_score",
"response_language": "en"
}
}
Product Positioning¶
Built for enterprise wellness programs, insurer engagement platforms, and premium performance-health products.
Note
weekly_activity_minutes must be 0-2000; out-of-range values return HTTP 400.
Recommended Endpoints¶
GET /api/v1/fitness/recovery-score- Recovery Score APIGET /api/v1/fitness/sedentary-risk-score- Sedentary Risk Score APIGET /api/v1/bmi- Bmi APIGET /api/v1/tdee- Tdee APIGET /api/v1/bmr- Bmr APIGET /api/v1/protein-calculator- Protein Calculator API