Health
Macronutrient split calculator API
Split total daily calories into carb/protein/fat grams using AMDR-based presets (balanced, lowCarb, keto, highProtein, endurance) or a custom percentage split, at 4/4/9 kcal per gram. Answers 'how many grams of protein in 2000 kcal', 'keto macros for 2000 calories', 'macro split calculator', 'carbs/protein/fat breakdown'.
Price$0.01per request
MethodPOST
Route/v1/health/macro-split
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
healthmacrosmacronutrientsamdrdietketonutritioncalculator
API URL
Integration docshttps://x402.hexl.dev/v1/health/macro-splitExample request
{
"calories": 2000,
"preset": "balanced"
}Example response
{
"calories": 2000,
"split": {
"carbPct": 50,
"proteinPct": 25,
"fatPct": 25
},
"grams": {
"carbsG": 250,
"proteinG": 125,
"fatG": 55.6
},
"kcal": {
"carbs": 1000,
"protein": 500,
"fat": 500
},
"formula": "grams = calories*pct / kcalPerGram (carbs/protein=4, fat=9)",
"preset": "balanced"
}Input schema
{
"type": "object",
"required": [
"calories"
],
"properties": {
"calories": {
"type": "number",
"examples": [
2000
]
},
"preset": {
"type": "string",
"enum": [
"balanced",
"lowCarb",
"keto",
"highProtein",
"endurance"
],
"default": "balanced"
},
"carbPct": {
"type": "number",
"description": "Custom split (must sum to 100 with proteinPct/fatPct)"
},
"proteinPct": {
"type": "number"
},
"fatPct": {
"type": "number"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}