Foodbe API

The Foodbe API gives your application access to AI-powered food intelligence across three expert personas — Neuro (nutrition science), Oracle (food history and culture), and Chefy (culinary technique). Responses are generated by a fine-tuned model trained on 3,000+ hand-curated, citation-verified food intelligence seeds.

All API requests are made over HTTPS. The API accepts JSON request bodies and returns JSON responses.

Authentication

All requests except sandbox registration require an API key passed in the request header.

X-Foodbe-KeyrequiredYour API key. Passed as a request header.
curl -X POST https://www.foodbe.ai/api/v1/query \
  -H "Content-Type: application/json" \
  -H "X-Foodbe-Key: YOUR_API_KEY" \
  -d '{"question": "Is olive oil anti-inflammatory?"}'

Get your free sandbox key at foodbe.ai/developers/register.

Base URL

https://www.foodbe.ai/api

All endpoints are relative to this base URL.

Errors

All errors return a JSON object with an error field containing a code and message.

{
  "error": {
    "code": 401,
    "message": "Missing API key."
  }
}
CodeMeaning
400Bad request — missing or invalid parameter.
401Unauthorized — missing or invalid API key.
402Payment required — insufficient tokens. Top up at foodbe.ai/developers/dashboard.
403Forbidden — endpoint not available on your current tier.
429Rate limit exceeded — slow down requests.
500Server error — something went wrong on our end.
Usage object

Every successful response includes a usage object showing your remaining token balance.

"usage": {
  "tokensRemaining": 4998,
  "bundleSize": 5000,
  "tier": "sandbox"
}
POST/v1/query1 token

Ask any food question and receive a response from all three expert personas — Neuro, Oracle, and Chefy — plus citations and a summary answer.

Request body

ParameterTypeRequiredDescription
questionstringYesThe food question to answer.
dietarrayNoDietary restrictions. e.g. ["vegan", "gluten-free"].
allergiesarrayNoAllergies to avoid. e.g. ["peanuts", "shellfish"].

Example request

curl -X POST https://www.foodbe.ai/api/v1/query \
  -H "Content-Type: application/json" \
  -H "X-Foodbe-Key: YOUR_API_KEY" \
  -d '{"question": "Why is salmon good for brain health?"}'

Example response

{
  "mainAnswer": {
    "text": "DHA makes up 12-15% of brain fat. Salmon provides a direct source.",
    "spoken": true
  },
  "tones": {
    "neuro": "EPA from salmon suppresses inflammatory cytokines IL-1β and IL-6 in brain tissue. Astaxanthin crosses the blood-brain barrier neutralizing free radicals before they damage neurons.",
    "oracle": "Japanese research links traditional fish-heavy diet to lower dementia rates across cohorts from 1990s to 2010s. Salmon's omega-3s entered Western consciousness in the 1970s through Greenland Inuit studies documenting low heart disease despite high fat intake.",
    "chefy": "Cook salmon to 125-130°F for optimal DHA retention — higher heat degrades omega-3s. Marinate 30+ minutes in white miso, ginger, mirin for bioactive peptides that may influence gut-brain signaling."
  },
  "neuro_citations": [
    {
      "text": "DHA enriched in neuronal membranes; maintains membrane fluidity and supports LTP underlying learning and memory",
      "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4404917/"
    },
    {
      "text": "Astaxanthin crosses the blood-brain barrier and is associated with reduced markers of oxidative stress and neuroinflammatory signaling",
      "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC6117702/"
    }
  ],
  "oracle_citations": [
    {
      "text": "Adherence to Japanese dietary pattern including miso and fish associated with significantly reduced dementia risk",
      "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC9146082/"
    }
  ],
  "usage": {
    "tokensRemaining": 4999,
    "bundleSize": 5000,
    "tier": "sandbox"
  }
}
POST/v1/queryAll3 tokens

Ask a food question and receive responses from all three personas — Neuro, Oracle, and Chefy — in a single call with full citations.

Request body

ParameterTypeRequiredDescription
questionstringYesThe food question to answer.
dietarrayNoDietary restrictions.
allergiesarrayNoAllergies to avoid.

Example request

curl -X POST https://www.foodbe.ai/api/v1/queryAll \
  -H "Content-Type: application/json" \
  -H "X-Foodbe-Key: YOUR_API_KEY" \
  -d '{"question": "What makes salmon so good for the brain?"}'

Example response

{
  "mainAnswer": {
    "text": "DHA makes up 12-15% of brain fat. Salmon provides a direct source.",
    "spoken": true
  },
  "tones": {
    "neuro": "EPA from salmon suppresses inflammatory cytokines IL-1β and IL-6 in brain tissue...",
    "oracle": "Japanese research links traditional fish-heavy diet to lower dementia rates...",
    "chefy": "Cook salmon to 125-130°F for optimal DHA retention — higher heat degrades omega-3s."
  },
  "neuro_citations": [
    {
      "text": "DHA enriched in neuronal membranes; maintains membrane fluidity and supports LTP",
      "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC4404917/"
    }
  ],
  "oracle_citations": [
    {
      "text": "Adherence to Japanese dietary pattern associated with significantly reduced dementia risk",
      "url": "https://pmc.ncbi.nlm.nih.gov/articles/PMC9146082/"
    }
  ],
  "usage": {
    "tokensRemaining": 4997,
    "bundleSize": 5000,
    "tier": "sandbox"
  }
}
GET/v1/ingredient/:name1 token

Get a deep ingredient breakdown across all three personas for any food ingredient.

URL parameters

ParameterTypeRequiredDescription
namestringYesThe ingredient name. e.g. "turmeric".
citationsbooleanNoPass ?citations=true to include citation sources in the response.

Example request

curl https://www.foodbe.ai/api/v1/ingredient/turmeric?citations=true \
  -H "X-Foodbe-Key: YOUR_API_KEY"

Example response

{
  "mainAnswer": {
    "text": "Curcumin in turmeric inhibits NF-kB and COX-2 — two key drivers of chronic inflammation.",
    "spoken": true
  },
  "tones": {
    "neuro": "Curcumin in turmeric inhibits NF-kB signaling and suppresses COX-2 enzyme activity linked to chronic inflammation. Bioavailability increases 2000% when paired with piperine from black pepper.",
    "oracle": "Turmeric has been central to Ayurvedic medicine for over 4,000 years. Ancient Sanskrit texts reference it as a treatment for respiratory conditions and liver disorders.",
    "chefy": "To maximize curcumin absorption, always combine turmeric with black pepper and a fat source. Bloom turmeric in warm oil for 60 seconds before adding other ingredients."
  },
  "neuro_citations": [
    {
      "text": "Curcumin inhibits NF-kB activation and suppresses pro-inflammatory cytokine expression",
      "url": "https://pubmed.ncbi.nlm.nih.gov/17569207/"
    }
  ],
  "usage": {
    "tokensRemaining": 4998,
    "bundleSize": 5000,
    "tier": "sandbox"
  }
}
POST/v1/compare2 tokens

Compare two foods side by side across key dimensions with a clear winner for each and an overall verdict.

Request body

ParameterTypeRequiredDescription
item_astringYesFirst food to compare.
item_bstringYesSecond food to compare.

Example request

curl -X POST https://www.foodbe.ai/api/v1/compare \
  -H "Content-Type: application/json" \
  -H "X-Foodbe-Key: YOUR_API_KEY" \
  -d '{"item_a": "salmon", "item_b": "chicken"}'

Example response

{
  "mainAnswer": {
    "text": "Chicken delivers more protein per dollar. Salmon wins on omega-3 and brain health.",
    "spoken": true
  },
  "tones": {
    "neuro": "Chicken delivers more protein per dollar — 27g at $1.85/lb vs 20g at $9.99/lb for salmon. The fat and calorie difference is small enough that cost becomes the dominant factor for most meals.",
    "oracle": "Salmon has been a sacred food in Pacific Northwest cultures for thousands of years. Chicken became the dominant protein in the Western diet only in the 20th century after industrialized farming.",
    "chefy": "Chicken needs 165°F internal temp for safety. Salmon peaks at 125-130°F for texture and nutrient retention. They require completely different cooking approaches."
  },
  "usage": {
    "tokensRemaining": 4997,
    "bundleSize": 5000,
    "tier": "sandbox"
  }
}
POST/v1/mealplan5 tokens

Generate a full multi-day meal plan with macro targets, estimated costs, grocery list, and batch cook tips.

Request body

ParameterTypeRequiredDescription
daysnumberYesNumber of days to plan. e.g. 7.
goalstringYesHealth or nutrition goal. e.g. "high protein", "weight loss", "gut health".
budgetnumberNoWeekly budget in USD. Defaults to 75.
servingsnumberNoServings per meal. Defaults to 2.
dietarrayNoDietary restrictions.
allergiesarrayNoAllergies to avoid.

Example request

curl -X POST https://www.foodbe.ai/api/v1/mealplan \
  -H "Content-Type: application/json" \
  -H "X-Foodbe-Key: YOUR_API_KEY" \
  -d '{
    "days": 3,
    "goal": "high protein",
    "budget": 75,
    "servings": 2
  }'

Example response

{
  "mainAnswer": {
    "text": "3-day high protein plan. Total cost $15.55. No need to rush it.",
    "spoken": true
  },
  "tones": {
    "neuro": "Coffee kicks off cortisol naturally — no need to rush it. The chicken salad runs on protein and acid to keep you sharp. Tacos close the day with fiber and complex carbs that slow-burn through the night.",
    "chefy": "Batch-cook the chicken breast Sunday — slice half for the salad, cube the rest for tacos. Both meals done in one cook session."
  },
  "mealPlan": {
    "days": [
      {
        "day": 1,
        "breakfast": { "name": "Coffee", "cost": 5.00, "time": "5 min" },
        "lunch": { "name": "Crisp Herb-Crusted Chicken Salad", "cost": 6.05, "time": "15 min" },
        "dinner": { "name": "Sweet Potato Black Bean Tacos", "cost": 4.50, "time": "25 min" }
      }
    ],
    "totalCost": 15.55
  },
  "usage": {
    "tokensRemaining": 4995,
    "bundleSize": 5000,
    "tier": "sandbox"
  }
}
POST/v1/recipe3 tokens

Generate a detailed recipe with ingredients, step-by-step instructions, prep and cook times, nutrition info, and a food science note.

Request body

ParameterTypeRequiredDescription
questionstringYesThe recipe to generate. e.g. "lemon butter salmon".
servingsnumberNoNumber of servings. Defaults to 2.
max_timenumberNoMax cook time in minutes. Defaults to 30.
dietarrayNoDietary restrictions.
allergiesarrayNoAllergies to avoid.

Example request

curl -X POST https://www.foodbe.ai/api/v1/recipe \
  -H "Content-Type: application/json" \
  -H "X-Foodbe-Key: YOUR_API_KEY" \
  -d '{"question": "lemon butter salmon", "servings": 2, "max_time": 25}'

Example response

{
  "mainAnswer": {
    "text": "Lemon Butter Salmon — Prep: 5 min | Cook: 15 min. Serves 2.",
    "spoken": true
  },
  "tones": {
    "chefy": "Pat salmon dry before searing — moisture is the enemy of a good crust. Cook to 125-130°F internal temp, not 145°F. The USDA recommendation overcooks salmon.",
    "neuro": "Cooking to 125°F preserves more DHA than higher temperatures. Butter adds fat-soluble vitamin absorption."
  },
  "recipe": {
    "name": "Lemon Butter Salmon",
    "prepTime": "5 min",
    "cookTime": "15 min",
    "servings": 2,
    "ingredients": [
      "2 salmon fillets (6 oz each)",
      "2 tbsp unsalted butter",
      "1 lemon, sliced",
      "2 garlic cloves, minced",
      "Salt and pepper to taste"
    ],
    "steps": [
      "Pat salmon fillets completely dry with paper towels.",
      "Season generously with salt and pepper on both sides.",
      "Heat a cast iron skillet over medium-high heat until smoking.",
      "Add butter and swirl to coat. Place salmon skin-side up.",
      "Sear 4 minutes without moving. Flip and cook 3-4 more minutes.",
      "Add garlic and lemon slices in the last minute. Baste with pan butter.",
      "Rest 2 minutes before serving."
    ]
  },
  "usage": {
    "tokensRemaining": 4996,
    "bundleSize": 5000,
    "tier": "sandbox"
  }
}
POST/v1/leftover2 tokens

Pass a list of leftover ingredients and get 2-3 recipes you can make right now.

Request body

ParameterTypeRequiredDescription
ingredientsarrayYesList of leftover ingredients. e.g. ["chicken", "rice", "spinach"].
max_timenumberNoMax cook time in minutes. Defaults to 20.
dietarrayNoDietary restrictions.
allergiesarrayNoAllergies to avoid.

Example request

curl -X POST https://www.foodbe.ai/api/v1/leftover \
  -H "Content-Type: application/json" \
  -H "X-Foodbe-Key: YOUR_API_KEY" \
  -d '{"ingredients": ["chicken", "rice", "spinach", "lemon"], "max_time": 20}'

Example response

{
  "mainAnswer": {
    "text": "3 recipes from what you have. All under 20 minutes.",
    "spoken": true
  },
  "tones": {
    "chefy": "The lemon is your secret weapon here. Acid brightens every one of these dishes. Add it at the end, not during cooking, to keep it sharp.",
    "neuro": "Spinach wilts fast and retains more folate when added off-heat. Don't overcook it."
  },
  "leftovers": [
    {
      "name": "Lemon Chicken Rice Bowl",
      "time": "15 min",
      "difficulty": "Easy",
      "steps": [
        "Warm rice in pan with a splash of water.",
        "Slice leftover chicken and add to pan.",
        "Wilt spinach directly in the pan.",
        "Finish with lemon juice and salt."
      ]
    },
    {
      "name": "Chicken Spinach Soup",
      "time": "20 min",
      "difficulty": "Easy",
      "steps": [
        "Bring 2 cups water to a boil.",
        "Add chicken, rice, and spinach.",
        "Season with salt, pepper, and lemon.",
        "Simmer 10 minutes and serve."
      ]
    }
  ],
  "usage": {
    "tokensRemaining": 4998,
    "bundleSize": 5000,
    "tier": "sandbox"
  }
}
POST/v1/grocery3 tokens

Generate food intelligence for a grocery item — science, context, and technique — ready to display inline in any grocery or shopping experience.

Request body

ParameterTypeRequiredDescription
itemstringYesThe grocery item. e.g. "organic wild salmon fillet".
contextstringNoOptional context. e.g. "for a high protein meal plan".

Example request

curl -X POST https://www.foodbe.ai/api/v1/grocery \
  -H "Content-Type: application/json" \
  -H "X-Foodbe-Key: YOUR_API_KEY" \
  -d '{"item": "organic wild salmon fillet", "context": "for a high protein meal plan"}'

Example response

{
  "mainAnswer": {
    "text": "Wild-caught salmon. High in DHA omega-3s. Best cooked to 125-130°F.",
    "spoken": true
  },
  "tones": {
    "neuro": "Wild salmon delivers 2,260mg of DHA and EPA per 3oz serving — among the highest of any whole food. DHA directly supports neuronal membrane integrity and reduces inflammatory signaling.",
    "oracle": "Wild Pacific salmon has sustained Indigenous communities of the Pacific Northwest for over 5,000 years. It entered mainstream Western nutrition consciousness through 1970s Greenland Inuit research.",
    "chefy": "Pat completely dry before cooking — moisture prevents proper searing. Cook skin-side down first at high heat. Pull at 125-130°F internal temp for silky texture and maximum omega-3 retention."
  },
  "usage": {
    "tokensRemaining": 4997,
    "bundleSize": 5000,
    "tier": "sandbox"
  }
}