Process Ai Food
Arguments
Argument
Type
Description
Available Fields
Example using Image Analysis
curl --location 'https://production.suggestic.com/graphql' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ8.eyJleHAiOjE3NTAzNzcxODQsInVpZCI5ImY1NDc2MjI2LThlNTQtNGUwNC1hY2IwLWExZjdiMmhMzBhMyIsInBpZCI6IjIyOWQ4OTc4LTRlYmItNGFmZi1hNTc0LTM4MDk3Y2UwM2YyZCIsImlzcyI6InNnOmFwcCIsImF1ZCI6InNnOnVzZXIiLCJpYXQiOjE3NDkxNjc1ODQsImNhdCI6IjIwMjUwNDI1MTkxNSIsImFwcCI6ImF0dGFuZS1oZWFsdGgiLCJ0eXBlIjoiYWNjZXNzIn0.ZINEA-A39crTB96rzBwc7ebahANNGVqe4Pn7PA4SbJw' \
--header 'X-APOLLO-OPERATION-NAME: processFoodImageAssistant' \
--form 'operations="{
\"operationName\": \"processAiFood\",
\"query\": \"mutation processAiFood(\$image: Upload, \$foodDescription: String) { processAiFood(input: { image: \$image, foodDescription: \$foodDescription }) { message success foodAnalysis { id status serviceResponse } } }\",
\"variables\": {
\"image\": null,
\"foodDescription\": \"\"
}
}"' \
--form 'map="{\"0\":[\"variables.image\"]}"' \
--form '0=@"/Users/user/Downloads/balanced-diet.jpg"'{
"data": {
"processAiFood": {
"message": "AI Food Log Processed",
"success": true,
"foodAnalysis": {
"id": "Rm9vZEFuYWx5c2lzOjY3ZWM0NWE3LTc3ZWQtNGY1My1iNjVkLTMyNzYwMGI2ZjgxNA==",
"status": "COMPLETED",
"serviceResponse": "{\"id\": \"67ec45a7-77ed-4f53-b65d-327600b6f814\", \"data\": {\"food_name\": \"Healthy Chicken & Chickpea Power Bowl\", \"nutritional_information\": {\"nutrients\": [{\"name\": \"calories\", \"value\": 572.0, \"unit\": \"kcal\"}, {\"name\": \"protein\", \"value\": 49.0, \"unit\": \"g\"}, {\"name\": \"fat\", \"value\": 19.0, \"unit\": \"g\"}, {\"name\": \"carbs\", \"value\": 55.0, \"unit\": \"g\"}]}, \"analysis_results\": {\"summary\": \"A vibrant and nutritious power bowl featuring lean cooked chicken breast, a variety of fresh and cooked vegetables, and protein-rich chickpeas. The bowl includes sliced avocado, halved cherry tomatoes, shredded carrots, mixed leafy greens (such as lettuce and arugula), steamed broccoli and cauliflower florets, and sliced red bell pepper. It is lightly seasoned with black sesame seeds.\", \"ingredients\": [{\"name\": \"chicken breast (cooked)\", \"quantity\": 110.0, \"unit\": \"g\"}, {\"name\": \"avocado\", \"quantity\": 75.0, \"unit\": \"g\"}, {\"name\": \"cherry tomatoes\", \"quantity\": 50.0, \"unit\": \"g\"}, {\"name\": \"mixed greens\", \"quantity\": 60.0, \"unit\": \"g\"}, {\"name\": \"carrots (shredded)\", \"quantity\": 60.0, \"unit\": \"g\"}, {\"name\": \"chickpeas (cooked)\", \"quantity\": 110.0, \"unit\": \"g\"}, {\"name\": \"broccoli (steamed)\", \"quantity\": 55.0, \"unit\": \"g\"}, {\"name\": \"cauliflower (steamed)\", \"quantity\": 55.0, \"unit\": \"g\"}, {\"name\": \"red bell pepper\", \"quantity\": 45.0, \"unit\": \"g\"}, {\"name\": \"black sesame seeds\", \"quantity\": 1.0, \"unit\": \"g\"}]}}}"
}
}
}
}Example with Text Analysis
Last updated
Was this helpful?