# Start Ingredient Resolution



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

Starts a new ingredient resolution. Resolves ingredient items into matched food items and gram weights. Each item declares an action (add\_ingredient, keep\_ingredient, replace\_ingredient, update\_ingredient\_text, update\_ingredient\_name, update\_ingredient\_quantity, update\_ingredient\_grams, or remove\_ingredient). Returns resolved rows with search candidates and unit conversions. Check summary.ready\_to\_confirm — if true, call confirmIngredients. No Version is committed.

AGENT QUOTA PROTOCOL:

1. Call getEntitlementStatus; read quotas.ai\_ingredient\_resolutions. If the key is absent, the plan is unlimited — proceed directly.
2. If remaining >= len(items): proceed directly.
3. If remaining \< len(items): compute cost = metered\_units x overage\_per\_unit\_cents / 100 (values from status response). Inform user and ask for confirmation.
4. On approval: retry with metered\_usage\_confirmed: true, same X-Request-ID header for idempotency.
5. If 402 on retry (concurrent depletion): present updated values from 402 body.
6. On decline: do not retry.

<APIPage document="&#x22;bettermenu&#x22;" operations="[{&#x22;path&#x22;:&#x22;/studio/recipes/{recipe_id}/ingredient-resolutions&#x22;,&#x22;method&#x22;:&#x22;post&#x22;}]" />
