---
title: "Generate a personalized meal plan"
method: GET
path: "/mealplans/generate"
tags: ["Meal Plans"]
---

# Generate a personalized meal plan

`GET /mealplans/generate`

## Request

- Base URL: `https://exercise-api.ymove.app/api/v2`
- URL: `https://exercise-api.ymove.app/api/v2/mealplans/generate`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in query parameter `api_key`

## Query parameters

- `calories` integer, required
- `diet` 'balanced' | 'high_protein' | 'low_carb' | 'keto' | 'vegan' | 'vegetarian' | 'mediterranean' | 'paleo'
- `meals` integer
- `days` integer
- `macroSplit` 'balanced' | 'high_protein' | 'low_carb' | 'high_fat'

## Response `200`

Generated meal plan with nutrition breakdown

- object
  - `data` MealPlan
    - `calories` integer: Daily calorie target
    - `diet` string
    - `macroSplit` string
    - `mealsPerDay` integer: Number of meals per day
    - `daysCount` integer: Number of days in this plan (1-7)
    - `averageDailyTotals` object: Average per-day macros across all days in the plan.
      - `calories` number
      - `protein` number
      - `carbs` number
      - `fat` number
    - `days` object[]: Per-day breakdown of the plan. Always populated, even for daysCount=1.
      - `dayIndex` integer: 1-based day number
      - `totals` object
        - `calories` number
        - `protein` number
        - `carbs` number
        - `fat` number
      - `meals` MealPlanMeal[]
        - `type` string: breakfast | lunch | dinner | snack
        - `name` string: Recipe title (same as recipe.title)
        - `recipeId` string: Recipe.id - use to look up the full recipe or fetch its image
        - `recipeSlug` string
        - `imageUrl` string, nullable
        - `portionMultiplier` number: Multiplier applied to the recipe (0.5-2.0). Macros + ingredient quantities are already scaled.
        - `calories` number: Already scaled by portionMultiplier
        - `protein` number
        - `carbs` number
        - `fat` number
        - `recipe` object: Full recipe metadata so clients can render title + prep time + servings + image without a second API call.
          - `id` string
          - `title` string
          - `slug` string
          - `description` string, nullable
          - `mealType` string
          - `cuisineType` string, nullable
          - `difficulty` string, nullable
          - `prepTimeMin` integer
          - `cookTimeMin` integer
          - `servings` integer
          - `dietTags` string[]
          - `instructions` string[]: Ordered cooking steps, so clients can render the full recipe without a second call.
          - `imageUrl` string, nullable
        - `foods` object[]: Recipe ingredients with quantities + macros already scaled by portionMultiplier.
          - `name` string
          - `portion` string: e.g. "200 g", "1.5 tbsp"
          - `calories` number
          - `protein` number
          - `carbs` number
          - `fat` number
    - `totals` object: Backward-compatible alias for days[0].totals (day 1 only). For multi-day plans use averageDailyTotals or per-day totals in days[].
      - `calories` number
      - `protein` number
      - `carbs` number
      - `fat` number
    - `meals` MealPlanMeal[]: Backward-compatible alias for days[0].meals (day 1 only).
      - `type` string: breakfast | lunch | dinner | snack
      - `name` string: Recipe title (same as recipe.title)
      - `recipeId` string: Recipe.id - use to look up the full recipe or fetch its image
      - `recipeSlug` string
      - `imageUrl` string, nullable
      - `portionMultiplier` number: Multiplier applied to the recipe (0.5-2.0). Macros + ingredient quantities are already scaled.
      - `calories` number: Already scaled by portionMultiplier
      - `protein` number
      - `carbs` number
      - `fat` number
      - `recipe` object: Full recipe metadata so clients can render title + prep time + servings + image without a second API call.
        - `id` string
        - `title` string
        - `slug` string
        - `description` string, nullable
        - `mealType` string
        - `cuisineType` string, nullable
        - `difficulty` string, nullable
        - `prepTimeMin` integer
        - `cookTimeMin` integer
        - `servings` integer
        - `dietTags` string[]
        - `instructions` string[]: Ordered cooking steps, so clients can render the full recipe without a second call.
        - `imageUrl` string, nullable
      - `foods` object[]: Recipe ingredients with quantities + macros already scaled by portionMultiplier.
        - `name` string
        - `portion` string: e.g. "200 g", "1.5 tbsp"
        - `calories` number
        - `protein` number
        - `carbs` number
        - `fat` number

## Other responses

- `400`: Missing required parameter

---

[API](https://skmtc.dev/ymove/apis/ymove-fitness-api.md) · [All operations](https://skmtc.dev/ymove/apis/ymove-fitness-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ymove/apis/ymove-fitness-api/revisions/6636f2b4a343?raw)
