Nutrition AI API
1. Obtain an API key from the Spike Team. 2. Make HTTP requests to the API endpoint, including the necessary parameters. 3. Parse the JSON responses to extract and utilize the nutritional data within your application.
JSON file provides an example to help you get started quickly. You can test it easily by importing it into Postman and running it with the sample image already set up:
For Optimal Results:
- Capture a photo of the food you plan to eat, centering on the contents of your plate.
- Ensure the meal occupies the majority of the image for better recognition.
- Take off any packaging or utensils before snapping the photo.
- Keep the background clutter-free; include only your plate or glass without additional items.
- Use natural or bright lighting to clearly capture details of the food.
- Adjust the angle to minimize items obscuring each other and at a slight angle for the best perspective.
- Avoid using filters or enhancements that might alter the food’s appearance.
Minimum image size required: 512x512 pixel.
Computer vision has not detected any food or drink in the provided image.
Bad Request, userUuid must be provided in String format. It is a unique identifier for your end-user that you use internally within your application.
No or wrong API key provided.
The imageLink must be an absolute URL that includes the full protocol (e.g., https://)
Response times can vary because the AI doesn’t always process images at the same speed. Even with the same photo, the system might take longer due to internal factors in how it analyzes the image and provides nutritional information. This means you might experience different wait times even when scanning the same meal.