Meals

Create custom food item with image

Creates a private custom food owned by the caller (created_by_user_id = current user, visibility = 'private'), so it only surfaces in the owner's searches. This endpoint is the seam for the future custom-foods/recipes and sharing feature (visibility 'private' | 'shared' | 'public').

post/api/meals/foods

Request

  • Base URL
    https://api.hiyd.ai
  • Auth
    HTTP bearer

Request body multipart/form-data

namestring required
brandstring
category'breakfast' | 'lunch' | 'dinner' | 'snack' | 'beverage' required
food_typestring
serving_size_gnumber
serving_size_unitstring
caloriesnumber required
protein_gnumber
carbs_gnumber
fat_gnumber
saturated_fat_gnumber nullable
fiber_gnumber
sugar_gnumber
ingredientsstring[]

List of ingredients in this food item

prep_time_minutesnumber

Food preparation time in minutes

imagestring binary

Food image file (max 5MB)

Example request

{
  "ingredients": [
    "Chicken breast",
    "Olive oil",
    "Salt",
    "Pepper"
  ],
  "prep_time_minutes": 15
}

Response

Food item created

Changes

No recorded changes to this operation across all 1 revision of this API.