Cookbook

AI-format raw recipe text into structured recipe

post/api/cookbook/format

Request

  • Base URL
    https://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.rewritelifestyle.ai/api/cookbook/format
  • Auth
    HTTP bearer

Request body

recipeTextstring
titlestring
descriptionstring
mealTypestring
servingsnumber

Example request

{
  "recipeText": "Take 2 chicken breasts, season with salt...",
  "title": "Easy Chicken Stir Fry",
  "description": "A quick stir fry with chicken and veggies",
  "mealType": "dinner",
  "servings": 2
}

Response

unknown required

Example response

{
  "success": true,
  "recipe": {
    "title": "Simple Egg White Omelette",
    "meal_type": "breakfast",
    "servings": 1,
    "calories": 120,
    "protein": 24,
    "carbs": 2,
    "fat": 2,
    "ingredients": [
      "4 egg whites",
      "spinach",
      "mushrooms",
      "salt",
      "pepper"
    ],
    "instructions": [
      "Whisk egg whites...",
      "Pour into pan...",
      "Add fillings and fold..."
    ]
  }
}

Changes

No recorded changes to this operation across all 34 revisions of this API.