🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

trackup food analyze

by @trackup

analyze a food image with AISpark TrackUp production APIs, using AnalyzeWholeFood for full analysis and dedicated endpoints for macros, ingredients, health i...

Versionv1.0.4
Downloads417
TERMINAL
clawhub install trackup-food-analyze

πŸ“– About This Skill


name: trackup-food-analyze description: analyze a food image with AISpark TrackUp production APIs, using AnalyzeWholeFood for full analysis and dedicated endpoints for macros, ingredients, health insight, and keyword-based food search.

TrackUp Food Analyze

Use this skill to analyze a food image with:

  • https://deepeat.ai/step.aispark.api.API/AnalyzeWholeFood
  • https://deepeat.ai/step.aispark.api.API/ExtractFoodMacros
  • https://deepeat.ai/step.aispark.api.API/AnalyzeIngredients
  • https://deepeat.ai/step.aispark.api.API/GetHealthInsight
  • https://deepeat.ai/step.aispark.api.API/SearchFood
  • Rules

  • Always use POST
  • Always send Content-Type: application/json
  • Image analysis requests must contain image_url or image_base64
  • If both exist, image_base64 wins
  • image_base64 must be raw base64 without data:image/...;base64,
  • For complete food image analysis, call AnalyzeWholeFood directly
  • Only call a specialized image-analysis API when the user explicitly asks for one specific analysis dimension
  • Use ExtractFoodMacros for basic macro extraction
  • Use AnalyzeIngredients for deep ingredient and metabolic analysis
  • Use GetHealthInsight for professional health insight
  • SearchFood request body must contain keyword
  • SearchFood returns at most the first 20 results
  • API Selection

    Choose the API based on the user's intent:

    1. Full food analysis: AnalyzeWholeFood 2. Basic macro extraction only: ExtractFoodMacros 3. Deep ingredient and metabolic analysis only: AnalyzeIngredients 4. Professional health insight only: GetHealthInsight 5. Keyword-based lookup without image analysis: SearchFood

    Food Search

    Use SearchFood when the user wants keyword-based food lookup instead of image analysis.

    Request example:

    curl --silent --show-error --location \
      'https://deepeat.ai/step.aispark.api.API/SearchFood' \
      --header 'Content-Type: application/json' \
      --data '{
        "keyword": "banana"
      }'
    

    Expected response shape:

    {
      "foods": [
        {
          "food_name": "Banana",
          "calories_cal": "89000",
          "weight_g": "100",
          "carbs_g": "22.8",
          "proteins_g": "1.1",
          "fats_g": "0.3",
          "display_gi": 51,
          "brand": ""
        }
      ],
      "pagination": {
        "size": 20,
        "page": 1,
        "total": 123
      }
    }
    

    Local Image Workflow

    Convert local image to base64:

    base64 < /absolute/path/to/image.jpg | tr -d '\n' > /tmp/food_image.b64
    

    Build payload:

    printf '{"image_base64":"' > /tmp/food_image.json
    cat /tmp/food_image.b64 >> /tmp/food_image.json
    printf '"}' >> /tmp/food_image.json
    

    Call full food analysis directly:

    curl --silent --show-error --location \
      'https://deepeat.ai/step.aispark.api.API/AnalyzeWholeFood' \
      --header 'Content-Type: application/json' \
      --data-binary @/tmp/food_image.json
    

    Proxy Fix

    If curl incorrectly tries a local proxy like 127.0.0.1:7890, retry with:

    env -u http_proxy -u https_proxy -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY curl ...
    

    Response Fields

    AnalyzeWholeFood:

  • food_name
  • total_weight_g
  • total_calories_kcal
  • carbs_g
  • proteins_g
  • fats_g
  • display_gi
  • dietary_fiber_g
  • sugar_g
  • ingredients[]
  • health_score
  • health_profile
  • ExtractFoodMacros:

  • food_name
  • total_weight_g
  • total_calories_kcal
  • carbs_g
  • proteins_g
  • fats_g
  • AnalyzeIngredients:

  • display_gi
  • dietary_fiber_g
  • sugar_g
  • ingredients[]
  • GetHealthInsight:

  • health_score
  • health_profile
  • SearchFood:

  • foods[]
  • pagination.page
  • pagination.size
  • pagination.total
  • health_score meaning:

  • 1-5 score generated by AI food evaluation
  • 5 is the highest score
  • Use it to help users make nutritionally informed choices
  • Output Rules

  • Keep numeric values exactly as returned
  • Do not invent missing fields
  • For complete image analysis, use AnalyzeWholeFood as the default API
  • For specialized analysis, use only the dedicated API that matches the user's request
  • For SearchFood, return the foods in API order and do not claim more than 20 items unless the response actually contains them
  • Common Errors

  • 400 invalid_request
  • 422 food_not_recognized
  • 422 barcode_only_result
  • 429 rate_limit_exceeded
  • 500 internal_error
  • 502 upstream_flow_error
  • πŸ”’ Constraints

  • Always use POST
  • Always send Content-Type: application/json
  • Image analysis requests must contain image_url or image_base64
  • If both exist, image_base64 wins
  • image_base64 must be raw base64 without data:image/...;base64,
  • For complete food image analysis, call AnalyzeWholeFood directly
  • Only call a specialized image-analysis API when the user explicitly asks for one specific analysis dimension
  • Use ExtractFoodMacros for basic macro extraction
  • Use AnalyzeIngredients for deep ingredient and metabolic analysis
  • Use GetHealthInsight for professional health insight
  • SearchFood request body must contain keyword
  • SearchFood returns at most the first 20 results