BETTERMENU
Studio

Extract Ingredient Lines

Splits a raw pasted ingredient blob into individual ingredient lines. Stateless — no Version is committed and the recipe is not modified, and extraction itself is not billed. Each returned line is ready to send as an add_ingredient item text to startIngredientResolution. Use this when a user pastes a block of ingredients that may not be separated by line breaks.

POST
/studio/recipes/{recipe_id}/ingredient-extractions

Path Parameters

recipe_id*Recipe Id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.bettermenu.live/studio/recipes/string/ingredient-extractions" \  -H "Content-Type: application/json" \  -d '{    "raw_text": "1 cup flour 2 eggs 1 tsp salt, garlic minced"  }'
{
  "data": {
    "lines": [
      "string"
    ],
    "count": 0,
    "resolution_cost_preview": {
      "units": 0,
      "included_remaining": 0,
      "over_included": true,
      "estimated_overage_cents": "string",
      "is_trialing": true
    }
  },
  "meta": {
    "version": "string",
    "request_id": "string",
    "timestamp": "string"
  }
}
{
  "type": "https://api.bettermenu.live/errors/recipe_not_found",
  "title": "Recipe Not Found",
  "status": 400,
  "detail": "Recipe rcpe_abc123 does not exist",
  "code": "recipe_not_found",
  "retryable": true,
  "instance": "/api/v1/recipes/rcpe_abc123",
  "trace_id": "req_xyz789",
  "errors": [
    {}
  ],
  "invalid_ids": [
    "f_abc123",
    "f_xyz789"
  ]
}
{
  "type": "https://api.bettermenu.live/errors/recipe_not_found",
  "title": "Recipe Not Found",
  "status": 400,
  "detail": "Recipe rcpe_abc123 does not exist",
  "code": "recipe_not_found",
  "retryable": true,
  "instance": "/api/v1/recipes/rcpe_abc123",
  "trace_id": "req_xyz789",
  "errors": [
    {}
  ],
  "invalid_ids": [
    "f_abc123",
    "f_xyz789"
  ]
}
BETTERMENU

FDA-compliant nutrition labels from a recipe, in minutes.

Visit bettermenu.live