---
title: "Glycemic analysis of an ingredient list"
method: POST
path: "/foods/glycemic/ingredients"
tags: ["Nutrition"]
---

# Glycemic analysis of an ingredient list

`POST /foods/glycemic/ingredients`

## Request

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

Send the ingredients of one meal, with weights where you know them, and get a glycemic index per ingredient, a glycemic load computed from the matched catalog carbohydrate and fiber figures, meal-level totals, and advice for lowering the load. Same response shape as the photo endpoint, without the identification step. Max 30 items. Pro plan and above, and the key must have accepted the glycemic data waiver (POST /foods/glycemic/waiver) or the endpoint returns 403 glycemic_waiver_required. Uses your nutrition analysis quota.

## Request body

- object
  - `items` object[], required
    - `name` string, required: Ingredient name, USDA-style naming matches best
    - `grams` number: Portion in grams. Omit and the API estimates a typical portion.

## Response `200`

Ingredients with glycemic index and load, meal totals, and advice

- GlycemicAnalysisResult
  - `data` object
    - `items` object[]
      - `name` string: AI-identified ingredient name
      - `estimatedGrams` number: Estimated portion in grams
      - `confidence` 'high' | 'medium' | 'low'
      - `matchedFood` object, nullable: Matched food from the database (null if no match)
        - `id` string
        - `name` string
        - `servingSizeG` number
      - `nutrition` object, nullable
        - `calories` number
        - `protein` number
        - `fat` number
        - `carbs` number
      - `glycemicIndex` number, nullable: Glucose-referenced GI (0-110). Null for foods with no meaningful available carbohydrate.
      - `giBasis` 'published' | 'estimated' | 'not_applicable': Whether the GI is a published value, inferred from a similar food, or not applicable
      - `matchQuality` 'ok' | 'state_mismatch' | 'unrelated', nullable: Quality of the catalog match. 'state_mismatch' means the right food in the wrong preparation (carbohydrate per gram can be several-fold off); an 'unrelated' match is dropped, so it never appears with a matchedFood attached.
      - `fiberG` number, nullable
      - `availableCarbsG` number, nullable: Carbohydrate minus fiber, from the matched catalog food
      - `glycemicLoad` number, nullable: glycemicIndex x availableCarbsG / 100. Null when the ingredient could not be matched.
      - `glycemicLoadCategory` 'low' | 'medium' | 'high', nullable
    - `totals` object
      - `calories` number
      - `protein` number
      - `fat` number
      - `carbs` number
      - `fiber` number
      - `availableCarbs` number
    - `meal` object
      - `glycemicLoad` number: Sum of the matched ingredients glycemic loads
      - `glycemicLoadCategory` 'low' | 'medium' | 'high'
      - `estimatedGlycemicIndex` number, nullable: Available-carbohydrate weighted mean GI of the meal
      - `unmatchedItems` string[]: Ingredients with no catalog match, and therefore no load contribution
      - `flaggedItems` string[]: Ingredients counted in the total whose match was flagged state_mismatch
      - `scale` object: The cut-offs used for the category fields
        - `item` string
        - `meal` string
    - `advice` object[]: Concrete changes to this meal that lower its glycemic impact
      - `suggestion` string
      - `rationale` string
      - `swap` object: Present when the advice is an ingredient swap. Numbers are recomputed for the same gram weight when the replacement matches the catalog.
        - `from` string
        - `to` string
        - `glycemicIndex` number, nullable
        - `matchedFood` object
          - `id` string
          - `name` string
        - `glycemicLoad` number, nullable
        - `glycemicLoadDelta` number, nullable: Negative means the swap lowers the load
        - `projectedMealGlycemicLoad` number, nullable
    - `disclaimer` string
  - `usage` object
    - `analyses_used` integer
    - `analyses_included` integer
    - `is_overage` boolean
    - `overage_charge` number

## Other responses

- `403`: Requires Pro plan or higher, or the glycemic waiver has not been accepted

---

[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)
