Food Recognition
The /vision/
endpoint is used to detect food items in images. To analyze your images post them to the API using JSON with source_url
, base64
or id
keys, or as a multi-part form with a file name file
.
id | id of a previously posted image |
---|---|
source_url | url of an image that should be downloaded |
base64 | base64 encoded image bytes |
file | image file passed using multi part form |
The response includes a ranked list of most likely recognized items and their scores.
{"id": "0299622f-b708-4ccd-91ed-3272c42bb34c","image": "6e17eb33-1e50-456c-8184-111e89c4e19d","model": "698ce742-7a49-472c-b00d-eb9b54c9a8fb","items": [{"score": 0.16014,"item": {"id": "9ab62c33-9b8c-4e02-83d2-ecbb16fa115e","name": "Sandwich","details": null,"description": null,"brand": null,"type": null,"text_ingredients": null,"ingredients": [],"parents": [],"children": [{"id": "3a17acfc-d346-4d31-8eae-da4b9500f4e6","name": "Bacon Egg And Cheese Sandwich","brand": null,"details": null,"categorizations": {},"is_generic": true},{"id": "505e8a36-b2d2-430f-a47a-3a47b2b34cef","name": "Club Sandwich","brand": null,"details": null,"categorizations": {},"is_generic": true}],"nutrition_facts": [],"is_generic": true,"categorizations": {}}}]}