Flambe docs

Compute nutrition

Estimates per-serving nutrition by matching each ingredient against USDA FoodData Central and Open Food Facts, then stores the result on the recipe. Values are estimates; ingredients that cannot be matched are skipped rather than guessed. The result is cached against a hash of the ingredient list, so calling this again without editing ingredients returns the stored figures.

POST
/api/recipes/{id}/nutrition

Estimates per-serving nutrition by matching each ingredient against USDA FoodData Central and Open Food Facts, then stores the result on the recipe. Values are estimates; ingredients that cannot be matched are skipped rather than guessed.

The result is cached against a hash of the ingredient list, so calling this again without editing ingredients returns the stored figures.

Authorization

bearerAuth
AuthorizationBearer <token>

A Clerk session JWT. Obtain one with a Clerk frontend SDK (session.getToken()) or, for server-to-server use, with a Clerk machine token. The token's sub claim is the Flambe user id that scopes every request.

In: header

Path Parameters

id*string

Recipe identifier.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/recipes/497f6eca-6276-4993-bfeb-53cbbbba6f08/nutrition"
{  "calories": 0,  "protein_g": 0,  "fat_g": 0,  "carbs_g": 0,  "fiber_g": 0,  "sugar_g": 0,  "sodium_mg": 0,  "per": "serving",  "computed_at": "2019-08-24T14:15:22Z",  "ingredients_hash": "string"}