Checkup API

FREEMIUM
By Checkup | Updated месяц назад | Health and Fitness
Health Check

N/A

README

Checkup API Documentation

image

Overview

We developed Babbage, our AI-powered suite of health-tracking APIs for great platforms. Babbage is a powerful health assessment tool designed to analyze vital signs and provide valuable insights into an individual’s well-being. Whether you need a quick check of key health metrics or a detailed analysis, this API has you covered. With support for both file uploads and video URLs, users can conveniently integrate health analysis into their applications.

Key Features:

  • Comprehensive Vital Signs Analysis: Assess a wide range of vital signs, including heart rate, blood pressure, body temperature, body fat, readiness index, and VO2 max.

  • Flexible Input Options: Users can submit either an uploaded file or a video URL for analysis, allowing for diverse use cases and user preferences.

  • Intelligent Metric Calculation: The API intelligently calculates metrics based on the provided input, offering a holistic view of an individual’s health.

Metrics Overview

The Checkup API supports a variety of health metrics aimed at providing a comprehensive analysis of an individual’s well-being. Here’s an overview of the supported metrics and a brief explanation of how each is calculated:

Heart Rate (HR)

  • Description: Heart rate is the number of heartbeats per minute.
    The API calculates heart rate based on facial video data, ensuring a minimum video duration of 5 to 10 seconds to capture an adequate sample of cardiac activity.

Blood Pressure (BP)

  • Description: Blood pressure is the force exerted by circulating blood against the walls of the arteries.
    Similar to heart rate, the API calculates blood pressure based on facial video data, with a recommended video duration of 5 to 10 seconds for accurate assessment.

Readiness Index (RI)

  • Description: Readiness index is a measure of an individual’s preparedness for physical or mental exertion.
    The API computes the readiness index by analyzing heart rate from facial video data and considering the user’s historical data. A minimum video duration of 30 seconds is recommended to ensure a comprehensive assessment.

VO2-max (VO2)

  • Description: VO2-max represents the maximum rate of oxygen consumption during exercise.
    The API estimates VO2-max based on factors like heart rate, age, and sex, providing insights into cardiovascular fitness.

Body Temperature (BT)

  • Description: Body temperature is the internal temperature of the body.
    The API measures body temperature using facial video data, with a recommended video duration of 1 to 2 seconds to capture relevant thermal information.

Body Fat (BF)

  • Description: Body fat percentage is the proportion of fat to total body weight.
    The API calculates body fat based on a full-body image of the user, ensuring a comprehensive analysis of body composition.

Input Guidelines

To ensure accurate and reliable health metric analysis, users are advised to follow specific guidelines when providing input data, whether it be in the form of facial videos or full-body images.

Facial Video Input

  • Description: For metrics such as Heart Rate, Blood Pressure, Readiness Index, and Body Temperature, facial videos are required. Check this example video.
  • Notes:
    • Duration: Maintain a video duration of at least 5 to 10 seconds for Heart Rate, Blood Pressure, and Body Temperature calculations. For Readiness Index, a minimum video duration of 30 seconds is highly recommended.
    • Stability: Ensure that the user’s face remains steady and visible throughout the video. Avoid extreme proximity or distance, as this may impact the accuracy of the analysis.
    • Lighting Conditions: Adequate lighting is crucial. The user’s face should be well-lit, avoiding excessively dark or overly bright conditions.

Full-Body Image Input (Body Fat Prediction)

  • Description: Body Fat Prediction requires a clear and comprehensive image of the user’s entire body. Check this example image.
  • Notes:
    • Image Clarity: The image must be sharp and clear to allow for accurate analysis.
    • Full Body: Ensure that the full body is visible in the image, capturing all relevant details for a thorough Body Fat Prediction.
    • Attire: Users are encouraged to wear attire that allows for a clear view of the body’s contours, aiding in precise body fat estimation.

Endpoints

POST /analysis

Description

This endpoint analyzes vital signs based on the provided input, which can be either an uploaded file or a video URL. For uploaded files, the maximum size is 10MB. For files larger than this, please use a video URL.

Request Parameters

File Upload (Multipart Form Data)

Parameter Description Values
file The uploaded file for analysis. (Optional, mutually exclusive with video_url) -
video_url The URL of the video for analysis. (Optional, mutually exclusive with file) -
filename The name of the file (if using file upload). -

Form Fields

Parameter Description Values Example Value
metrics A string representing the metrics to be analyzed. Use “*” for all available metrics. Options include: HR (Heart Rate), BP (Blood Pressure), RI (Readiness Index), VO2 (VO2-max), BT (Body Temperature), BF (Body Fat) HR, BP, RI, VO2, BT, BF, * HR,BP
sex Gender of the individual. (Optional, Accepted Values: male or female - case-insensitive) male, female male
height Height of the individual in meters. (Optional) numeric 1.75
age Age of the individual. (Optional) numeric 30
readiness_history A JSON dump string representing a list of historical user readiness indices. Each item must contain mandatory fields. See below for more details. JSON object See below

Additional Information on readiness_history

The readiness_history parameter is a critical component of the Checkup API, enabling users to incorporate a historical record of the user’s readiness indices for a more thorough health analysis. Users are required to store this history for use in subsequent API calls. Each item in the readiness_history list is presented as a dictionary with the following key-value pairs:

  • type: Type of assessment, always set to 'readiness'.
  • artefact: Artefact value from the assessment.
  • artefact_level: Artefact level from the assessment.
  • create_timestamp: Timestamp of the assessment creation.
  • mean_hr_bpm: Mean heart rate in beats per minute.
  • mean_rr_ms: Mean RR interval in milliseconds.
  • pns_index: PNS (Parasympathetic Nervous System) index.
  • readiness: Readiness index.
  • rmssd_ms: RMSSD (Root Mean Square of Successive Differences) in milliseconds.
  • sd1_ms: SD1 (Standard Deviation 1) in milliseconds.
  • sd2_ms: SD2 (Standard Deviation 2) in milliseconds.
  • sdnn_ms: SDNN (Standard Deviation of NN intervals) in milliseconds.
  • sns_index: SNS (Sympathetic Nervous System) index.
  • stress_index: Stress index.

The readiness_history parameter provides valuable context by incorporating past assessments into the current health analysis, contributing to a more nuanced understanding of an individual’s well-being.

# Example readiness history item
{
    "type": "readiness",
	"artefact":  0.0,
	"artefact_level":  "GOOD",
	"create_timestamp":  "2023-12-06T02:41:50.725535+00:00",
	"mean_hr_bpm":  83.52910467240929,
	"mean_rr_ms":  718.3125,
	"pns_index":  3.2919038482055702,
	"readiness":  62.5,
	"respiratory_rate":  null,
	"rmssd_ms":  193.74641380131075,
	"sd1_ms":  141.81213214984373,
	"sd2_ms":  185.3059222762331,
	"sdnn_ms":  162.37692855992265,
	"sns_index":  0.4832850685037345,
	"stress_index":  5.998611734126247
}

Response

Status Code Response Body Example Value Description
200 OK data: The analyzed results. See Example JSON Below
400 Bad Request message: Error message “Invalid request. Missing required parameter ‘metrics’.”
500 Internal Server Error message: Error message “Internal Server Error. Please try again later.”

Example JSON Response (Status Code: 200 OK)

{
  "status_code": 200,
  "data": {
    "body_temperature": 36.7,
    "heart_rate": 83.52910467240929,
    "systolic_blood_pressure": 118.33201599121094,
    "diastolic_blood_pressure": 83.448081970214844,
    "readiness_index": 62.5,
    "readiness_detail": {
      "artefact": 0.0,
      "artefact_level": "GOOD",
      "create_timestamp": "2023-12-06T02:41:50.725535+00:00",
      "mean_hr_bpm": 83.52910467240929,
      "mean_rr_ms": 718.3125,
      "pns_index": 3.2919038482055702,
      "readiness": 62.5,
      "respiratory_rate": null,
      "rmssd_ms": 193.74641380131075,
      "sd1_ms": 141.81213214984373,
      "sd2_ms": 185.3059222762331,
      "sdnn_ms": 162.37692855992265,
      "sns_index": 0.4832850685037345,
      "stress_index": 5.998611734126247
    },
    "vo2_max": 49.30697233098408
  }
}

Examples

Example 1: Predict Heart Rate

Ensuring a minimum video duration of 5 to 10 seconds to capture an adequate sample of cardiac activity.

# Video url
curl -X POST -F "video_url=https://example.com/video.mp4" -F "filename=video.mp4" -F "metrics=HR" https://checkup-api.p.rapidapi.com/analysis

# Uploaded file
curl -X POST -F "@file=/path/to/your/local/file.mp4" -F "metrics=HR" https://checkup-api.p.rapidapi.com/analysis

# Response
{"status_code": 200, "data": {"heart_rate":  76}}

Notes:

  • Replace https://example.com/video.mp4 with the actual URL of the video containing facial data.
  • Replace /path/to/your/local/file.mp4 with the actual local video file if you use uploaded file as input.
  • The -F "metrics=HR" specifies that the API should predict heart rate.

Example 2: Predict Blood Pressure

Ensuring a minimum video duration of 5 to 10 seconds to capture an adequate sample of cardiac activity.

# Video url
curl -X POST -F "video_url=https://example.com/video.mp4" \
	-F "filename=video.mp4" \
	-F "metrics=BP" \
	https://checkup-api.p.rapidapi.com/analysis

# Uploaded file
curl -X POST -F "@file=/path/to/your/local/file.mp4" \
	-F "metrics=BP" \
	https://checkup-api.p.rapidapi.com/analysis

# Response
{"status_code": 200, "data": {"systolic_blood_pressure":  118.33201599121094,"diastolic_blood_pressure":  83.448081970214844}}

Notes:

  • Replace https://example.com/video.mp4 with the actual URL of the video.
  • Replace /path/to/your/local/file.mp4 with the actual local video file if you use uploaded file as input.
  • The -F "metrics=BP" indicates that the API should predict blood pressure.

Example 3: Predict Readiness Index

A minimum video duration of 30 seconds is recommended to ensure a comprehensive assessment.

# Video url
curl -X POST -F "video_url=https://example.com/video.mp4" \
	-F "filename=video.mp4" \
	-F "metrics=RI" \
	-F 'readiness_history=[
	{
		"type": "readiness",
		"artefact":  0.0,
		"artefact_level":  "GOOD",
		"create_timestamp":  "2023-12-06T02:41:50.725535+00:00",
		"mean_hr_bpm":  83.52910467240929,
		"mean_rr_ms":  718.3125,
		"pns_index":  3.2919038482055702,
		"readiness":  62.5,
		"respiratory_rate":  null,
		"rmssd_ms":  193.74641380131075,
		"sd1_ms":  141.81213214984373,
		"sd2_ms":  185.3059222762331,
		"sdnn_ms":  162.37692855992265,
		"sns_index":  0.4832850685037345,
		"stress_index":  5.998611734126247
	},
	...
	]' \
	https://checkup-api.p.rapidapi.com/analysis

# Uploaded file
curl -X POST -F "@file=/path/to/your/local/file.mp4" \
	-F "metrics=RI" \
	-F 'readiness_history=[]' \
	https://checkup-api.p.rapidapi.com/analysis

# Response
{
	"status_code": 200,
	"data": {
		"readiness_index":  62.5,
		"readiness_detail":  {
			"artefact":  0.0,
			"artefact_level":  "GOOD",
			"create_timestamp":  "2023-12-06T02:41:50.725535+00:00",
			"mean_hr_bpm":  83.52910467240929,
			"mean_rr_ms":  718.3125,
			"pns_index":  3.2919038482055702,
			"readiness":  62.5,
			"respiratory_rate":  null,
			"rmssd_ms":  193.74641380131075,
			"sd1_ms":  141.81213214984373,
			"sd2_ms":  185.3059222762331,
			"sdnn_ms":  162.37692855992265,
			"sns_index":  0.4832850685037345,
			"stress_index":  5.998611734126247
		}
	}
}

Notes:

  • Replace https://example.com/video.mp4 with the actual URL of the video.
  • Replace /path/to/your/local/file.mp4 with the actual local video file if you use uploaded file as input.
  • The -F "metrics=RI" specifies that the API should predict the readiness index.

Example 4: Predict Body Temperature

# Video url
curl -X POST -F "video_url=https://example.com/video.mp4" \
	-F "filename=video.mp4" \
	-F "metrics=BT" \
	https://checkup-api.p.rapidapi.com/analysis

# Uploaded file
curl -X POST -F "@file=/path/to/your/local/file.mp4" \
	-F "metrics=BT" \
	https://checkup-api.p.rapidapi.com/analysis

# Response
{"status_code": 200, "data": {"body_temperature": 37.0"}}

Notes:

  • Replace https://example.com/video.mp4 with the actual URL of the video.
  • Replace /path/to/your/local/file.mp4 with the actual local video file if you use uploaded file as input.
  • The -F "metrics=BT" specifies that the API should predict the body temperature.

Example 5: Predict VO2-max

You will have to provide user’s sex and age to the API.

# Video url
curl -X POST -F "video_url=https://example.com/video.mp4" \
	-F "filename=video.mp4" \
	-F "metrics=VO2" \
	-F "sex=male" \
	-F "age=28" \
	https://checkup-api.p.rapidapi.com/analysis

# Uploaded file
curl -X POST -F "@file=/path/to/your/local/file.mp4" \
	-F "metrics=VO2" \
	-F "sex=male" \
	-F "age=28" \
	https://checkup-api.p.rapidapi.com/analysis

# Response
{"status_code": 200, "data": {"vo2_max": 40.1"}}

Notes:

  • Replace https://example.com/video.mp4 with the actual URL of the video.
  • Replace /path/to/your/local/file.mp4 with the actual local video file if you use uploaded file as input.
  • The -F "metrics=VO2" indicates that the API should predict VO2-max.

Example 6: Predict Body Fat

# Video url
curl -X POST -F "video_url=https://example.com/video.mp4" \
	-F "filename=video.mp4" \
	-F "metrics=BF" \
	-F "sex=male" \
	-F "age=28" \
	-F "height=1.8" \
	https://checkup-api.p.rapidapi.com/analysis

# Uploaded file
curl -X POST -F "@file=/path/to/your/local/file.mp4" \
	-F "metrics=BF" \
	-F "sex=male" \
	-F "age=28" \
	-F "height=1.8" \
	https://checkup-api.p.rapidapi.com/analysis

# Response
{"status_code": 200, "data": {"body_fat": 10.2"}}

Notes:

  • Replace https://example.com/body.jpg with the actual URL of the image.
  • Replace /path/to/your/local/file.mp4 with the actual local video file if you use uploaded file as input.
  • The -F "metrics=BF" indicates that the API should predict body fat.
Followers: 0
API Creator:
Rapid account: Checkup
Checkup
checkup
Log In to Rate API
Rating: 5 - Votes: 1