Nutrition API

Glycemic Index API

A glycemic index per ingredient, and a glycemic load computed from that ingredient's real carbohydrate and fiber. Send a list of ingredients, or a photo of the plate and let the API work out what is on it. Meal totals and concrete advice for lowering the load come back in the same response.

Pro plan, $29/mo. Access requires signing the glycemic data waiver.

Per ingredient

POST /foods/glycemic/ingredients

Your app already knows the meal. Send the ingredients with weights and get one row per ingredient: glycemic index, available carbohydrate, glycemic load, and the catalog food it resolved against. Up to 30 ingredients per call.

From a photo

POST /foods/glycemic/photo

Your user photographs a plate. The API identifies the ingredients, estimates each portion in grams from plate size and utensils, then runs the same glycemic pipeline. Composite dishes are broken into components first.

One request, one row per ingredient

curl -X POST "https://exercise-api.ymove.app/api/v2/foods/glycemic/ingredients" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"items":[
        {"name":"rice, white, cooked","grams":200},
        {"name":"chicken breast, grilled","grams":150},
        {"name":"banana, raw","grams":120}
      ]}'

{
  "data": {
    "items": [
      {
        "name": "banana, raw",
        "estimatedGrams": 120,
        "matchedFood": { "id": "usda-1102653", "name": "Bananas (raw)" },
        "nutrition": { "calories": 106.8, "protein": 1.3, "fat": 0.4, "carbs": 27.4 },
        "glycemicIndex": 51,
        "giBasis": "published",
        "matchQuality": "ok",
        "fiberG": 3.1,
        "availableCarbsG": 24.3,
        "glycemicLoad": 12.4,
        "glycemicLoadCategory": "medium"
      }
    ],
    "meal": {
      "glycemicLoad": 12.4,
      "glycemicLoadCategory": "low",
      "estimatedGlycemicIndex": 51,
      "unmatchedItems": [],
      "flaggedItems": []
    },
    "advice": [
      {
        "suggestion": "Eat the chicken before the rice.",
        "rationale": "Protein first slows gastric emptying and blunts the glucose peak."
      }
    ],
    "disclaimer": "Glycemic index values are model estimates ..."
  }
}

Every row names the catalog food it matched, so a number can always be traced back to its inputs. An ingredient that matches nothing returns a null load rather than a guessed one.

Two different kinds of number, and we tell you which is which

Glycemic index is measured in human feeding studies. It cannot be derived from macros, and we do not license a measured GI dataset, so the index values in this API come from a language model recalling published figures. Each row says which it is: giBasis: "published" when it is reproducing a known value, "estimated" when it is inferring from a comparable food, and "not_applicable" for foods with no meaningful available carbohydrate, like meat, fish and oil.

Glycemic load is different. It is arithmetic we do on real data: the index multiplied by available carbohydrate, where the carbohydrate and fiber come from the USDA or Open Food Facts food the ingredient matched. That is why every row carries its matchedFood and a matchQuality. Where the match is the right food in the wrong preparation, cooked rice landing on a dry-weight entry, the row is flagged state_mismatch and named in meal.flaggedItems, because carbohydrate per gram between those two states can differ several-fold. Where nothing sensible matched, the load is null and the ingredient is listed under meal.unmatchedItems. An API that quietly returns a confident wrong number is worse than one that tells you it did not know.

Advice, re-costed against the catalog

Alongside the numbers, each response carries two to four concrete changes to that specific meal: swap a component, change a cooking method, add protein, fat, fibre or acid, or change the order things are eaten in. When the advice is a straight ingredient swap, the replacement is looked up in the catalog and re-costed at the same gram weight, so the response carries the swap's own glycemic load, the delta, and the projected meal load if it were taken. Advice about cooking or eating order arrives without numbers attached, because there is nothing to look up.

What it is not for

This is not a medical device. It is not certified under EU Regulation 2017/745 or any equivalent regime, it has not been cleared by any regulator, and it must not be used for diagnosis, disease management, or insulin or medication dosing. Carbohydrate figures from this API must never be presented to an end user as a basis for dosing. Because these endpoints put blood-glucose numbers in front of people, every key that wants them signs the glycemic data waiver first, and access stays closed until it does.

What it costs

The glycemic endpoints sit on the Pro plan at $29/mo and draw on the same AI nutrition quota as photo, text and voice food logging. The plan also includes food search, barcode lookup, the recipe API and the exercise API. One key, no per-call fees, no attribution requirement, and you may cache responses in your own database.

Frequently asked questions

Is there a glycemic index API?

Yes. POST a list of ingredients to /api/v2/foods/glycemic/ingredients, or a meal photo to /api/v2/foods/glycemic/photo, and the response carries a glycemic index per ingredient, a glycemic load per ingredient computed from that ingredient’s carbohydrate and fiber, meal-level totals, and suggested changes that lower the load. It is part of the Your Move nutrition API, on the Pro plan at $29/mo.

Does the API return the glycemic index per ingredient?

Per ingredient, yes. A plate of chicken, rice and broccoli comes back as three rows, each with its own glycemic index, available carbohydrate, and glycemic load, plus one meal-level total. Composite dishes are broken into their components first, so a burger returns the bun, the patty, the cheese and the sauce separately rather than one number for "burger".

Where do the glycemic index values come from?

From a language model recalling published GI values, flagged per ingredient as "published" when it is reproducing a known value and "estimated" when it is inferring from a comparable food. We do not measure glycemic index and we do not license a measured GI dataset, and the API says so in every response. The glycemic load, by contrast, is arithmetic on real catalog data: glycemic index multiplied by available carbohydrate, where the carbohydrate and fiber come from the matched USDA or Open Food Facts food.

How is glycemic load calculated?

Glycemic load is glycemic index multiplied by available carbohydrate divided by 100, where available carbohydrate is total carbohydrate minus fiber for the portion you sent. Every response returns the catalog food each ingredient matched to, so the number can be traced back to its inputs. An ingredient that matches nothing returns a null load rather than a guessed one.

Can I send a photo instead of a list of ingredients?

Yes. The photo endpoint identifies the ingredients and estimates each portion in grams from plate size and utensils, then runs the same glycemic pipeline. Use the ingredient endpoint when your app already knows what is in the meal, and the photo endpoint when a user is logging a plate they are looking at.

Is this suitable for a diabetes app?

Not for managing the condition. The API is not a medical device, is not certified under EU MDR or any equivalent regime, and must not be used for insulin or medication dosing or any other clinical decision. Every key that wants these endpoints signs a waiver saying so before they are enabled. Estimating the glycemic impact of a meal for general awareness is what it is built for.

What happens when an ingredient cannot be matched?

The row comes back with its glycemic index but a null glycemic load, and its name is listed under meal.unmatchedItems. Where the match is the right food in the wrong preparation, for example cooked rice matched to a dry-weight entry, the row is flagged as a state_mismatch and named under meal.flaggedItems, because carbohydrate per gram can be several times off between those two states.

What does it cost?

The glycemic endpoints are on the Pro plan at $29/mo, which includes the AI nutrition quota they draw from, alongside food search, barcode lookup, AI food logging by text, photo and voice, the recipe API, and the exercise API. One key, no per-call fees, and you can cache responses in your own database.

See also: the AI food analysis demo, the barcode API, and the full nutrition API.

Build glycemic awareness in

Per-ingredient glycemic index and load, from a list or from a photo, on the Pro plan at $29/mo.

Start Free Trial