Predict

Extract nutritional information from an image

Predict nutritional information from a packaging image using the Nutri-Sight model.

The model takes an image and the OCR result (as a JSON file) obtained from Google Cloud Vision. For more information about the model, see the Nutri-Sight documentation.

GET
/predict/nutrition

Query Parameters

image_url?string

The URL of the input image

Formaturi
ocr_url?string

The URL of the OCR JSON to use. The OCR must have been extracted using Google Cloud Vision, and be in the JSON format.

Formaturi

Response Body

curl -X GET "https://robotoff.openfoodfacts.org/api/v1/predict/nutrition?image_url=https%3A%2F%2Fimages.openfoodfacts.org%2Fimages%2Fproducts%2F541%2F004%2F104%2F0807%2F3.jpg&ocr_url=https%3A%2F%2Fimages.openfoodfacts.org%2Fimages%2Fproducts%2F541%2F004%2F104%2F0807%2F3.json"
{
  "predictions": [
    {
      "nutrients": {},
      "entities": {
        "aggregated": [
          {}
        ],
        "postprocessed": [
          {}
        ],
        "raw": [
          {}
        ]
      }
    }
  ]
}
Empty