v1

latestOpenAPI 3.1.02026-07-136587849.3 KB
Nutrition AI

Analyze Nutrition Text

Analyze a text description of a meal and return nutritional information.

Submit a plain-text description of what was eaten (e.g., "grilled chicken breast with rice and steamed broccoli") and the API will return a detailed nutritional breakdown including calories, macronutrients, and optionally micronutrients and ingredients.

This endpoint works identically to the image-based nutrition analysis but accepts text instead of an image. All the same options are available: include_ingredients, include_nutri_score, include_dish_description, etc.

Request

FieldTypeRequiredDescription
meal_descriptionstringYesText description of the meal (3–2000 characters)
consumed_atstringNoUTC timestamp when food was consumed. Defaults to upload time
wait_on_processbooleanNoIf true, waits for completion. Otherwise returns immediately with pending status
analysis_modestringNofast or precise (default: precise)
country_codestringNoISO 3166-1 alpha-2 country code (default: us)
language_codestringNoISO 639-1 language code (default: en)
include_ingredientsbooleanNoInclude ingredient breakdown (default: false)
include_nutri_scorebooleanNoInclude Nutri-Score rating (default: false)
include_dish_descriptionbooleanNoInclude dish description (default: false)
include_nutrition_fieldsarrayNoNutrition fields to include (default: energy_kcal, protein_g, fat_total_g, carbohydrate_g)
post/nutrition_records/text

Request body

analysis_mode'fast' | 'precise'

A preferred mode for the analysis

consumedboolean

Whether to save the record (true) or only analyze (false)

consumed_atstring date-time

The UTC time when food was consumed. By default, it is set to the upload time

country_code'af' | 'al' | 'dz' | 'ad' | 'ao' | 'ag' | 'ar' | 'am' | 'au' | 'at' | 'az' | 'bs' | 'bh' | 'bd' | 'bb' | 'by' | 'be' | 'bz' | 'bj' | 'bt' | 'bo' | 'ba' | 'bw' | 'br' | 'bn' | 'bg' | 'bf' | 'bi' | 'cv' | 'kh' | 'cm' | 'ca' | 'cf' | 'td' | 'cl' | 'cn' | 'co' | 'km' | 'cg' | 'cd' | 'cr' | 'ci' | 'hr' | 'cu' | 'cy' | 'cz' | 'dk' | 'dj' | 'dm' | 'do' | 'ec' | 'eg' | 'sv' | 'gq' | 'er' | 'ee' | 'sz' | 'et' | 'fj' | 'fi' | 'fr' | 'ga' | 'gm' | 'ge' | 'de' | 'gh' | 'gr' | 'gd' | 'gt' | 'gn' | 'gw' | 'gy' | 'ht' | 'hn' | 'hu' | 'is' | 'in' | 'id' | 'ir' | 'iq' | 'ie' | 'il' | 'it' | 'jm' | 'jp' | 'jo' | 'kz' | 'ke' | 'ki' | 'kp' | 'kr' | 'kw' | 'kg' | 'la' | 'lv' | 'lb' | 'ls' | 'lr' | 'ly' | 'li' | 'lt' | 'lu' | 'mg' | 'mw' | 'my' | 'mv' | 'ml' | 'mt' | 'mh' | 'mr' | 'mu' | 'mx' | 'fm' | 'md' | 'mc' | 'mn' | 'me' | 'ma' | 'mz' | 'mm' | 'na' | 'nr' | 'np' | 'nl' | 'nz' | 'ni' | 'ne' | 'ng' | 'mk' | 'no' | 'om' | 'pk' | 'pw' | 'pa' | 'pg' | 'py' | 'pe' | 'ph' | 'pl' | 'pt' | 'qa' | 'ro' | 'ru' | 'rw' | 'kn' | 'lc' | 'vc' | 'ws' | 'sm' | 'st' | 'sa' | 'sn' | 'rs' | 'sc' | 'sl' | 'sg' | 'sk' | 'si' | 'sb' | 'so' | 'za' | 'ss' | 'es' | 'lk' | 'sd' | 'sr' | 'se' | 'ch' | 'sy' | 'tj' | 'tz' | 'th' | 'tl' | 'tg' | 'to' | 'tt' | 'tn' | 'tr' | 'tm' | 'tv' | 'ug' | 'ua' | 'ae' | 'gb' | 'us' | 'uy' | 'uz' | 'vu' | 've' | 'vn' | 'ye' | 'zm' | 'zw'

Country ISO 3166-1 alpha-2 code in lowercase

include_dish_descriptionboolean

Include dish description of the food

include_ingredientsboolean

Include ingredients of the food

include_nutri_scoreboolean

Include nutri-score label of the food

include_nutrition_fieldsstring[]

Include specific nutrition fields in the analysis report. By default, carbohydrate_g, energy_kcal, fat_total_g and protein_g will be included

language_code'aa' | 'ab' | 'ae' | 'af' | 'ak' | 'am' | 'an' | 'ar' | 'as' | 'av' | 'ay' | 'az' | 'ba' | 'be' | 'bg' | 'bh' | 'bi' | 'bm' | 'bn' | 'bo' | 'br' | 'bs' | 'ca' | 'ce' | 'ch' | 'co' | 'cr' | 'cs' | 'cu' | 'cv' | 'cy' | 'da' | 'de' | 'dv' | 'dz' | 'ee' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'ff' | 'fi' | 'fj' | 'fo' | 'fr' | 'fy' | 'ga' | 'gd' | 'gl' | 'gn' | 'gu' | 'gv' | 'ha' | 'he' | 'hi' | 'ho' | 'hr' | 'ht' | 'hu' | 'hy' | 'hz' | 'ia' | 'id' | 'ie' | 'ig' | 'ii' | 'ik' | 'io' | 'is' | 'it' | 'iu' | 'ja' | 'jv' | 'ka' | 'kg' | 'ki' | 'kj' | 'kk' | 'kl' | 'km' | 'kn' | 'ko' | 'kr' | 'ks' | 'ku' | 'kv' | 'kw' | 'ky' | 'la' | 'lb' | 'lg' | 'li' | 'ln' | 'lo' | 'lt' | 'lu' | 'lv' | 'mg' | 'mh' | 'mi' | 'mk' | 'ml' | 'mn' | 'mr' | 'ms' | 'mt' | 'my' | 'na' | 'nb' | 'nd' | 'ne' | 'ng' | 'nl' | 'nn' | 'no' | 'nr' | 'nv' | 'ny' | 'oc' | 'oj' | 'om' | 'or' | 'os' | 'pa' | 'pi' | 'pl' | 'ps' | 'pt' | 'qu' | 'rm' | 'rn' | 'ro' | 'ru' | 'rw' | 'sa' | 'sc' | 'sd' | 'se' | 'sg' | 'si' | 'sk' | 'sl' | 'sm' | 'sn' | 'so' | 'sq' | 'sr' | 'ss' | 'st' | 'su' | 'sv' | 'sw' | 'ta' | 'te' | 'tg' | 'th' | 'ti' | 'tk' | 'tl' | 'tn' | 'to' | 'tr' | 'ts' | 'tt' | 'tw' | 'ty' | 'ug' | 'uk' | 'ur' | 'uz' | 've' | 'vi' | 'vo' | 'wa' | 'wo' | 'xh' | 'yi' | 'yo' | 'za' | 'zh' | 'zu'

Language ISO 639-1 code in lowercase

meal_descriptionstring required

Text description of the meal to analyze

user_time_offset_minutesinteger

User's local timezone offset in minutes

wait_on_processboolean

If true, waits for the process to complete. If false, returns immediate response and sends notification with analysis report to webhook URL when finished

Example request

{
  "consumed_at": "2006-01-02T15:04:05",
  "include_dish_description": true,
  "include_ingredients": true,
  "language_code": "de",
  "meal_description": "grilled chicken breast with rice and steamed broccoli",
  "user_time_offset_minutes": -540
}

Response

OK

consumed_atstring date-time

The UTC time when food was consumed. By default, it is set to the record update time

dish_descriptionstring

Detected dish description

dish_description_translatedstring

Dish description translated to target language

dish_namestring required

Detected dish name

dish_name_translatedstring

Dish name translated to target language

failure_reasonstring

Reason for processing failure

input_type'image' | 'manual' | 'push' | 'text'

Nutrition record input type

modified_atstring date-time

Update timestamp in UTC

nutri_scorestring

Nutri-Score known as the 5-Colour Nutrition label (A-E)

record_idstring uuid

Report record ID

serving_sizenumber double required

Serving size in metric units

status'pending' | 'processing' | 'completed' | 'failed' | 'updated'

Processing status

unit'g' | 'mg' | 'mcg' | 'ml' | 'kcal' required

Metric unit (g for solids, ml for liquids)

uploaded_atstring date-time

Upload timestamp in UTC

user_time_offset_minutesinteger

User's local timezone offset in minutes

Example response

{
  "consumed_at": "2006-01-02T15:04:05",
  "dish_description": "beef, ground, lean, cooked with broccoli, raw and rice, brown, cooked",
  "dish_description_translated": "Rindfleisch, Hackfleisch, mager, gekocht mit Brokkoli, roh und Reis, braun, gekocht",
  "dish_name": "beef and broccoli stir-fry",
  "dish_name_translated": "Rindfleisch und Brokkoli Pfanne",
  "failure_reason": "Unable to identify food items",
  "ingredients": [
    {
      "name": "beef, ground, lean, cooked",
      "name_translated": "Rindfleisch, Hackfleisch, mager, gekocht",
      "nutritional_fields": {
        "calcium_mg": 1000,
        "carbohydrate_g": 250,
        "cholesterol_mg": 300,
        "energy_kcal": 800,
        "fat_monounsaturated_g": 20,
        "fat_polyunsaturated_g": 15,
        "fat_saturated_g": 20,
        "fat_total_g": 65,
        "fat_trans_g": 0.5,
        "fiber_total_dietary_g": 25,
        "folate_mcg": 400,
        "iron_mg": 18,
        "magnesium_mg": 400,
        "manganese_mcg": 400,
        "niacin_mg": 16,
        "phosphorus_mg": 700,
        "potassium_mg": 3500,
        "protein_g": 50,
        "riboflavin_mg": 1.3,
        "salt_g": 12,
        "salt_mg": 25,
        "sodium_g": 56,
        "sodium_mg": 2300,
        "sugars_total_g": 50,
        "thiamin_mg": 1.2,
        "vitamin_a_rae_mcg": 900,
        "vitamin_b12_mcg": 2.4,
        "vitamin_b6_mg": 1.7,
        "vitamin_c_mg": 90,
        "vitamin_d_mcg": 20,
        "vitamin_e_mg": 15,
        "vitamin_k_mcg": 120,
        "zinc_mg": 11
      },
      "serving_size": 120,
      "unit": "g"
    }
  ],
  "input_type": "image",
  "modified_at": "2025-09-15T10:30:12.132Z",
  "nutri_score": "B",
  "nutritional_fields": {
    "calcium_mg": 1000,
    "carbohydrate_g": 250,
    "cholesterol_mg": 300,
    "energy_kcal": 800,
    "fat_monounsaturated_g": 20,
    "fat_polyunsaturated_g": 15,
    "fat_saturated_g": 20,
    "fat_total_g": 65,
    "fat_trans_g": 0.5,
    "fiber_total_dietary_g": 25,
    "folate_mcg": 400,
    "iron_mg": 18,
    "magnesium_mg": 400,
    "manganese_mcg": 400,
    "niacin_mg": 16,
    "phosphorus_mg": 700,
    "potassium_mg": 3500,
    "protein_g": 50,
    "riboflavin_mg": 1.3,
    "salt_g": 12,
    "salt_mg": 25,
    "sodium_g": 56,
    "sodium_mg": 2300,
    "sugars_total_g": 50,
    "thiamin_mg": 1.2,
    "vitamin_a_rae_mcg": 900,
    "vitamin_b12_mcg": 2.4,
    "vitamin_b6_mg": 1.7,
    "vitamin_c_mg": 90,
    "vitamin_d_mcg": 20,
    "vitamin_e_mg": 15,
    "vitamin_k_mcg": 120,
    "zinc_mg": 11
  },
  "record_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
  "serving_size": 120,
  "status": "completed",
  "unit": "g",
  "uploaded_at": "2025-09-15T10:30:04.521Z",
  "user_time_offset_minutes": -540
}