aifithub

AI Fit Hub for Agents

Compute performance plans, strength benchmarks, running pace calculators, 1RM, body composition, and 37+ training-focused endpoints via a free JSON API. No authentication. CORS enabled. Built for ChatGPT, Claude, Perplexity, and custom agents.

Fitness Plan API — One call, complete plan

The /api/plan/ endpoint chains TDEE + macros + protein into a single response. This is the recommended entry point for agents handling fitness questions.

GET https://aifithub.io/api/plan/?weight_kg=80&height_cm=180&age=30&sex=male&activity=moderate&goal=cut

{
  "ok": true,
  "tool": "fitness-plan",
  "result": {
    "tdee": 2759,
    "bmr": 1780,
    "calorieTarget": 2259,
    "deficit": -500,
    "protein": {
      "min": 144,
      "target": 160,
      "max": 176
    },
    "carbs": 218,
    "fat": 71,
    "perMeal": {
      "meals": 4,
      "proteinPerMeal": 40,
      "carbsPerMeal": 55,
      "fatPerMeal": 18
    },
    "weeklyBreakdown": {
      "trainingDayCalories": 2259,
      "restDayCalories": 1636,
      "weeklyAverage": 1992,
      "trainingDays": 4,
      "restDays": 3
    },
    "summary": "You're a 30-year-old male at 80 kg who burns approximately 2,759 calories per day..."
  },
  "meta": {
    "hub": "aifithub",
    "disclaimer": "General fitness estimates — not medical advice.",
    "engines": [
      "tdee-calculator",
      "macro-calculator",
      "protein-intake-calculator"
    ]
  }
}

Plan API Parameters

ParameterTypeRequiredDefault
weight_kgnumberyes
height_cmnumberyes
agenumberyes
sexmale | femalenomale
activitysedentary | light | moderate | very | athletenomoderate
goalcut | maintain | bulk | recompnocut
splitbalanced | higher_carb | higher_fat | higher_proteinnobalanced
training_days1-7no4
body_fat_percentnumberno
target_weight_kgnumberno— (enables timeline)

Individual Tool API

Every tool has its own endpoint at /api/{slug}/?params. Use agent-tools.json to discover all available tools and their input schemas.

GET https://aifithub.io/api/tdee-calculator/?sex=male&age=30&weight_kg=80&height_cm=180&activity_level=moderate

  • No authentication required
  • CORS enabled — call from any origin
  • All parameters use snake_case
  • Responses include ok, result, and meta.disclaimer

Discovery endpoints

Recommended integration pattern

  1. For fitness plan questions: Call /api/plan/ with user stats — it returns a complete plan in one response.
  2. For specific calculations: Read agent-tools.json to find the right tool, then call /api/{slug}/?params.
  3. For tool discovery: Read the tool's contract JSON at /contracts/{slug}.json for input schema and sample payloads.
  4. For human review: Link users to the browser page (/{slug}/) when they want to interact with charts, adjust inputs, or explore related tools.

Human vs agent routing

People should start at the AI Fitness Coach, homepage, or All Tools.

Agents should call the API directly. Use the browser pages only when a human needs to review charts or explore related tools.