AI transforms
AI transforms
Once you have a recipe, pipe it through the transform endpoints to reshape it. These run on the RecipeAI FastAPI microservice at https://ai.dishora.app/api/v1/* and share its rate budget.
Transforms are stateless: pass the recipe, not an id
GET /v1/recipes/{uuid} on the REST API, then pass that recipe object into the transform below.Endpoints
/api/v1/rewrite-toneRewrite a recipe’s steps in a new tone/api/v1/enrich-ingredientsEnrich ingredients with cooking context/api/v1/budgetify-recipeMake a recipe cheaper (Pro+)/api/v1/healthifyMake a recipe healthier (Pro+)/api/v1/adapt-methodAdapt a recipe to a new cooking method (Pro+)/api/v1/suggest-substituteAI substitution suggestionsRewrite tone
POST /api/v1/rewrite-tone
Rewrites the recipe's steps in the requested to_tone without changing the actual dish. The ingredients are untouched. Valid tones: normal, funny,romantic, motivational, minimal.
{
"steps": ["Boil pasta in salted water.", "Toss with sauce and serve."],
"from_tone": "normal",
"to_tone": "funny"
}Budgetify (Pro+)
POST /api/v1/budgetify-recipe
Swaps in cheaper ingredients and simplifies the steps to hit the budget_focus tier (frugal | standard | splurge). Pass the full recipe as a JSON object and your dietary constraints.
{
"recipe": {
"title": "Steak Dinner",
"ingredients": [
{ "name": "ribeye steak", "quantity": "2", "householdMeasurement": "2 steaks" }
],
"instructions": ["Sear the steak 3 min per side..."]
},
"budget_focus": "frugal",
"dietary_restrictions": [],
"allergies": [],
"tone": "normal",
"callback_url": "",
"request_id": ""
}Healthify (Pro+)
POST /api/v1/healthify
Reduces fat/sodium, raises fiber and protein, and rebalances macros while keeping the dish recognizable. health_focus is one of general, highProtein, gutHealth, heartHealthy, diabeticFriendly.
{
"recipe": {
"title": "Butter Chicken",
"ingredients": [
{ "name": "heavy cream", "quantity": "200", "householdMeasurement": "200ml" }
],
"instructions": ["Simmer chicken in cream and spices..."]
},
"health_focus": "highProtein",
"dietary_restrictions": ["gluten-free"],
"allergies": [],
"tone": "normal",
"callback_url": "",
"request_id": ""
}Adapt method (Pro+)
POST /api/v1/adapt-method
Rewrites a recipe for a different cooking method while keeping the dish and its flavor intact. Timings, temperatures, and step wording are reworked for the target appliance. Valid target_method values: stovetop, oven, pressure_cooker, slow_cooker, air_fryer, grill.
{
"recipe": {
"title": "One-Pan Indian Chicken & Rice",
"ingredients": [
{ "name": "chicken thigh", "quantity": "400", "householdMeasurement": "400g" }
],
"instructions": ["Brown the chicken...", "Add rice and simmer 18 min."]
},
"target_method": "slow_cooker",
"dietary_restrictions": [],
"allergies": [],
"tone": "normal"
}Enrich ingredients
Enrich ingredients
POST /api/v1/enrich-ingredients
Adds cooking context to a list of ingredients (why each matters in the dish). Takes a recipe_name and an ingredients list (1-30 items), not a recipe object. Optionally pass cuisine for sharper context.
{
"recipe_name": "One-Pan Indian Chicken & Rice",
"ingredients": ["chicken thigh", "basmati rice", "garam masala"],
"cuisine": "indian"
}Suggest substitute
POST /api/v1/suggest-substitute
Returns up to 5 AI-generated substitutes for a single ingredient, respecting the user's dietary profile and allergies. This is the AI fallback you call when the rule-engine lookup at GET /v1/substitutions returns "has_rule_engine_match": false. It runs on the cheap model and shares the AI rate budget.
{
"ingredient": "eggs",
"dietary_restrictions": ["vegan"],
"allergies": ["nuts"],
"callback_url": "",
"request_id": ""
}Persist the result
/v1/substitutions on the REST API so the rule engine serves it next time, with no extra AI call needed.Shared rate budget