# Compute Nutrition Facts

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

Compute compliant-rounded nutrition facts for a serving.

Applies compliant rounding rules to produce per-serving and optionally
per-container nutrition facts.

The top-level ``version_id`` identifies the new version created by
this operation. Pass it back as ``If-Match`` on the next mutation.

409 scenarios and recovery — check steps_required in the response:
- MISSING_DEPENDENCY: no nutrition -> call setRecipeIngredients first
- STALE_DEPENDENCY: ingredients changed since nutrition was computed -> re-call setRecipeIngredients
- MISSING_DEPENDENCY: no serving -> call addRecipeServing
After completing steps_required, retry this call.

Available only on API versions declaring the ``recipe_versioning``
capability. Requests without this capability receive a 404.

Related endpoints:
- getRecipePerServingNutritionFacts — retrieve the stored result
