Python quickstart
from foodapi import FoodAPI client = FoodAPI(api_key="foodapi_your_key") # Health check print(client.ping()) # Normalize an ingredient line norm =…
PythonTypeScript
from foodapi import FoodAPI
client = FoodAPI(api_key="foodapi_your_key")
# Health check
print(client.ping())
# Normalize an ingredient line
norm = client.ingredients.normalize("2 lbs ground beef")
print(norm.canonical_name, norm.confidence)
# List recipes
page = client.recipes.list(search="pasta", limit=5)
for recipe in page.items:
print(recipe.title)
# Unified reasoning
result = client.reason(
recipe_id=page.items[0].id,
goal="FEASIBILITY",
include_trace=True,
)
print(result.feasibility_score)
client.close()