v1

latestOpenAPI 3.1.02026-07-136587849.3 KB
Nutrition AI

Analyze Nutrition Facts Label

Upload an image of a nutritional facts label to analyze it.

The system uses OCR (Optical Character Recognition) powered by AI to extract nutrition details from nutritional facts label image. The results with nutritional fields like total fat, protein, etc. are structurized and presented as one ingredient in the JSON response.

Processing Flow

The processing of nutrition facts label analysis is synchronous. No webhooks will be sent.

Analysis Modes

  • precise (default) — uses advanced AI models for the highest accuracy and detail with good processing time
  • fast — uses optimized AI models for good accuracy and detail with the fastest processing time

Nutritional fields

A predefined list of nutritional fields is extracted. See Nutritional Fields for supported macronutrients and micronutrients.

Localization

For more documentation, including implementation examples, processing workflows, and integration guides, see Implementation Guide.

post/nutrition_records/ingredients/label

Request body

analysis_mode'fast' | 'precise'

A preferred mode for the analysis

bodystring

Base64-encoded binary data, this or 'body_url' is required

body_urlstring

URL to the image, this or 'body' is required

Response

OK

failure_reasonstring

Reason for processing failure

namestring required

Detected ingredient name

serving_sizenumber double required

Serving size in metric units

status'completed' | 'failed'

Processing status

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

Metric unit (g for solids, ml for liquids)

Example response

{
  "failure_reason": "Unable to identify label",
  "name": "beef and broccoli stir-fry",
  "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,
  "status": "completed",
  "unit": "g"
}