Skip to main content
Upload food images and receive detailed nutritional analysis powered by AI. The Nutrition API uses advanced computer vision and machine learning to identify ingredients, calculate nutritional values, and provide comprehensive food composition data.

Getting Started

  1. Get an access token using the authentication flow (see Authentication)
  2. Upload base64-encoded food images using the POST endpoint
  3. Retrieve results either synchronously or via webhook notifications

Key Features

AI-Powered Analysis

  • Advanced computer vision for food identification
  • LANGUAL standard terminology for precise ingredient classification
  • Machine learning models for accurate nutritional calculations

Flexible Processing

  • Asynchronous processing (recommended) — Returns immediately with background processing
  • Synchronous processing — Waits for complete analysis before returning results
  • Webhook notifications for real-time status updates

Comprehensive Data

  • 29 nutritional fields from basic macros to detailed micronutrients
  • Ingredient breakdown with per-item nutritional analysis
  • Nutri-Score rating (A-E European scale)
  • Localized results with country and language support

Technical Requirements

Image Specifications

  • Minimum size: 512×512 pixels
  • Maximum size: 10MB when base64-encoded
  • Supported formats: JPEG, PNG, WebP
  • Input format: base64-encoded string

Processing Workflow

  1. Image Upload & Validation — System validates format compatibility
  2. AI Model Processing — Multiple AI models are used for analysis
  3. Ingredient Identification — Foods identified using LANGUAL terminology
  4. Nutritional Analysis — Detailed breakdown calculated per 100 g/ml
  5. Translation (optional) — Results translated to specified language
  6. Storage — Results stored with a configurable retention policy

Analysis Report Data

Main Data

  • Dish name with optional translation
  • Dish description with optional translation
  • Nutri-Score level (A-E)
  • Serving size with unit (g/ml)

Basic Nutritional Fields

  • Energy (kcal)
  • Protein (g)
  • Total Fat (g)
  • Carbohydrates (g)

Extended Nutritional Data

  • Fats: saturated, polyunsaturated, monounsaturated, trans fats
  • Micronutrients: fiber, sugars, cholesterol
  • Minerals: sodium, potassium, calcium, iron, magnesium, phosphorus, zinc
  • Vitamins: A, C, D, E, K, B-complex vitamins
See the Reference for a complete list of nutritional fields.

Image Guidelines

For optimal analysis results, guide your users to:
  1. Center the food — Capture the contents of the plate as the main subject
  2. Fill the frame — Ensure the meal occupies the majority of the image
  3. Remove distractions — Take off packaging or utensils before photographing
  4. Clean background — Keep background clutter-free, include only the plate
  5. Use proper lighting — Natural or bright lighting to capture food details clearly
  6. Optimal angle — Slight angle to minimize items obscuring each other
  7. Avoid filters — Don’t use filters that might alter the food’s appearance

Implementation

For detailed implementation examples, request/response schemas, and code samples, see:

Language and Country Options

The API supports translation of results into multiple languages and region-specific analysis through country codes. By default, responses are in English (en) with the United States (US) as the default country. Providing a country code parameter improves analysis precision by considering regional ingredients, portion sizes, and food compositions specific to that location. Supported languages follow ISO 639-1 codes, while country codes adhere to ISO 3166-1 alpha-2 format.

Response Times

Response times typically range from 4 to 30 seconds depending on image complexity and the completeness of nutrition fields requested. Processing times may vary due to internal factors in AI analysis and nutritional information compilation. You may use the option for the preference of analysis speed over precision.
I