v3

latestOpenAPI 3.0.0raw.githubusercontent.com2026-03-0936575.8 KB
Predict

Predict categories for a product

Predictions are performed using a neural model. As input, you can either provide:

  • the barcode of a product: Robotoff will fetch the product from Product Opener and will use this data as inputs to predict categories.
  • expected inputs under a product key. The neural category model accepts the following fields as input: product_name, ingredients_tags, ocr, nutriments, image_embeddings. All fields are optional (but you should at least provide one).
post/predict/category

Request body

OR

Example request

{
  "barcode": "0748162621021"
}

Response

the category predictions

Example response

{
  "neural": [
    {
      "value_tag": "en:roast-chicken",
      "confidence": 0.6
    }
  ]
}