Cookbook

Analyze food photo and generate recipes

post/api/cookbook/analyze-photo

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/analyze-photo
  • Auth
    HTTP bearer

Request body multipart/form-data

sourcestring

Set to "lucille" when the call originates in the Lucille chat. The result is then persisted as a chat turn and returned as a card.

sessionIdstring

Current Lucille chat session id, if the client tracks one.

clientTurnIdstring

Client-generated id for the optimistic chat bubble. Echoed back inside card so the app can reconcile it.

userMessagestring

What the user typed alongside the photo.

Example request

{
  "source": "lucille"
}

Response

unknown required

Example response

{
  "success": true,
  "ingredients": [
    "chicken breast",
    "broccoli",
    "olive oil",
    "garlic"
  ],
  "suggestions": [
    {
      "title": "Garlic Chicken with Broccoli",
      "calories": 340,
      "protein": 42
    },
    {
      "title": "Sheet Pan Chicken Dinner",
      "calories": 380,
      "protein": 44
    }
  ]
}

Changes

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