curl --request POST \
--url https://gai.spikeapi.com/v2/nutrition/analyse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"userUuid": "yourUserUid",
"imageLink": "https://i.ibb.co/pvnpHHhT/IMG-0600.jpg",
"config": {
"language": "en",
"microNutrients": true,
"score": true
}
}'
{
"name": "Mixed Topping Pizza",
"description": "A pizza with various toppings including ham, mushrooms, pepperoni, olives, and cheese.",
"score": "D",
"ingredients": [
"ham",
"mushrooms",
"pepperoni",
"olives",
"cheese",
"tomato sauce",
"pizza dough"
],
"servingSize": 450,
"calories": 1200,
"macroNutrients": {
"carbohydrates": 120,
"proteins": 50,
"fats": 60
},
"microNutrients": {
"saturatedFat": 25,
"polyunsaturatedFat": 5,
"monounsaturatedFat": 20,
"transFat": 1,
"fibre": 8,
"sugar": 10,
"cholesterol": 100,
"sodium": 2500,
"potassium": 600,
"vitaminA": 300,
"vitaminC": 10,
"calcium": 400,
"iron": 5
}
}
Successful analysis
The response is of type any
.
curl --request POST \
--url https://gai.spikeapi.com/v2/nutrition/analyse \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"userUuid": "yourUserUid",
"imageLink": "https://i.ibb.co/pvnpHHhT/IMG-0600.jpg",
"config": {
"language": "en",
"microNutrients": true,
"score": true
}
}'
{
"name": "Mixed Topping Pizza",
"description": "A pizza with various toppings including ham, mushrooms, pepperoni, olives, and cheese.",
"score": "D",
"ingredients": [
"ham",
"mushrooms",
"pepperoni",
"olives",
"cheese",
"tomato sauce",
"pizza dough"
],
"servingSize": 450,
"calories": 1200,
"macroNutrients": {
"carbohydrates": 120,
"proteins": 50,
"fats": 60
},
"microNutrients": {
"saturatedFat": 25,
"polyunsaturatedFat": 5,
"monounsaturatedFat": 20,
"transFat": 1,
"fibre": 8,
"sugar": 10,
"cholesterol": 100,
"sodium": 2500,
"potassium": 600,
"vitaminA": 300,
"vitaminC": 10,
"calcium": 400,
"iron": 5
}
}