Interested in joining a scientific study?Learn more

Utility API

Get Decode Food ID API

Available

Get Decode Food ID turns structured food items or unstructured food input into a reusable decode_food_id that can be stored, resolved and reused across workflows.

POST/functions/v1/get_decode_food_id

Inputs

  • Structured items[] with food names and optional quantities
  • Or unstructured foodText, foodImage or foodVoice

Returns

  • Async job_id and status_url
  • Final decode_food_id result after polling
  • Retry and completion metadata

Request JSON

{
  "foodText": "Greek yogurt with blueberries, walnuts and honey"
}

Response JSON

{
  "job_id": "9a2f41...",
  "status": "queued",
  "status_url": "https://tirqjzahcinadeulfylj.supabase.co/functions/v1/get_decode_food_id?job_id=9a2f41...",
  "meta": {
    "retry_count": 0,
    "completed_at": null
  }
}
curl -X POST 'https://tirqjzahcinadeulfylj.supabase.co/functions/v1/get_decode_food_id' \
  -H 'x-api-key: $MYMOLECULES_API_KEY' \
  -H 'Content-Type: application/json' \
  --data '{  "foodText": "Greek yogurt with blueberries, walnuts and honey"}'