# Set Custom Ingredient Serving



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

Replace a custom ingredient's serving / gram basis in one commit — every field is taken verbatim from the request (destructive replace, like `setRecipeIngredients`); an omitted field clears to null. `reference_quantity_g` is the derived as-sold gram basis the nutrition-calc adapter uses to convert stored nutrient amounts to a per-100g basis. Allowed while the ingredient is `draft` or `active`; rejected once `archived`.

<APIPage document="&#x22;bettermenu&#x22;" operations="[{&#x22;path&#x22;:&#x22;/studio/custom-ingredients/{custom_ingredient_id}/serving&#x22;,&#x22;method&#x22;:&#x22;put&#x22;}]" />
