Interested in joining a scientific study?Learn more

Core API

Design API

Available

Design turns nutrition goals, restrictions, sensory preferences and molecular constraints into usable recipes or meal plans. It can work from structured fields or from a simple text request.

POST/functions/v1/design

Inputs

  • Recipe or meal-plan type
  • Unstructured request_text or structured preferences
  • Diet, taste, restriction, compound and energy constraints

Returns

  • Recipes with ingredients and steps
  • Meal plans with days and meals
  • Generation status and retry metadata

Request JSON

{
  "input_mode": "unstructured",
  "type": "recipe",
  "request_text": "High-protein Mediterranean breakfast, gentle on digestion",
  "recipe_count": 1,
  "language": "en"
}

Response JSON

{
  "job_id": "d72f91...",
  "status": "queued",
  "status_url": "https://tirqjzahcinadeulfylj.supabase.co/functions/v1/design?job_id=d72f91..."
}
curl -X POST 'https://tirqjzahcinadeulfylj.supabase.co/functions/v1/design' \
  -H 'x-api-key: $MYMOLECULES_API_KEY' \
  -H 'Content-Type: application/json' \
  --data '{  "input_mode": "unstructured",  "type": "recipe",  "request_text": "High-protein Mediterranean breakfast, gentle on digestion",  "recipe_count": 1,  "language": "en"}'