Skip to content

eAG API

Compute estimated average glucose (eAG) from HbA1c and classify glycemic status (normal, prediabetes, diabetes_range).

Endpoint

  • GET /api/v1/eag
  • POST /api/v1/eag/post

Parameters

Name Type Required In Description
hba1c number Yes Query/Body HbA1c value in percent.
lang string No Query Response language (en,es,de,fr,pt,ja,hi,ar).

Why Use This Endpoint

  • Translate HbA1c into user-friendly glucose terms.
  • Add risk-aware messaging to diabetes monitoring flows.
  • Standardize glucose conversion in clinical dashboards.

Get Started

Request Example

curl -X GET "https://api.hefitapi.com/api/v1/eag?hba1c=6.1&lang=en" \
  -H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://api.hefitapi.com/api/v1/eag/post?lang=en" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"hba1c":6.1}'

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.

{
  "eAG (mg/dL)": 128.37,
  "HbA1c (%)": 6.1,
  "estimated_avg_glucose_mg_dl": 128.37,
  "estimated_avg_glucose_mmol_l": 7.13,
  "hba1c_percent": 6.1,
  "glycemic_band": "prediabetes",
  "glycemic_band_label": "Prediabetes",
  "risk_signal": "Glycemic control is trending above ideal range.",
  "action_plan": ["Improve carbohydrate quality", "Increase movement consistency"],
  "monitoring_plan": "Track HbA1c trend with periodic labs.",
  "language": "en",
  "_enterprise": {
    "client": "Acme Health",
    "plan": "pro",
    "request_id": "1f13a2bf5ea4fa84",
    "quota": 120,
    "usage_tracking": true
  },
  "_api_metadata_": {
    "endpoint_name": "eag",
    "response_language": "en"
  }
}

Product Positioning

Ideal for glucose coaching, diabetes care apps, and preventive risk-monitoring systems.

Note

HbA1c values outside supported range trigger validation errors.