{"openapi":"3.1.0","info":{"title":"Recipe Parser API","version":"0.1.0","description":"Pay-per-call recipe tools (USDC, x402). Rule-based, no AI model, no URL fetching. Nutrition values are estimates from generic USDA foods, not medical or dietary advice. Nutrition data: USDA FoodData Central (public domain).","x-guidance":"Use POST /v1/parse, POST /v1/scale, POST /v1/convert, POST /v1/substitute with JSON bodies. Unpaid calls receive HTTP 402 with x402 payment terms. See /llms.txt.","termsOfService":"https://ordstirr.com/agents/terms","contact":{"url":"https://ordstirr.com"}},"servers":[{"url":"https://recipes.ordstirr.com"}],"paths":{"/health":{"get":{"operationId":"health","summary":"Free health check","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/parse":{"post":{"operationId":"parseRecipe","summary":"Parse recipe text into structured ingredients, steps, times and nutrition per serving","description":"Send plain recipe text (up to 20 KB). Returns ingredients (quantity, unit, name, notes), numbered steps with detected times and oven temperatures, prep/cook/total time, servings, and estimated nutrition per serving from USDA SR Legacy + Foundation Foods. No URL fetching, no AI model: rule-based and repeatable. Unpaid calls receive HTTP 402 with x402 payment terms. Invalid input is rejected with HTTP 400 and never charged.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000,"description":"Recipe as plain text (max 20,000 bytes UTF-8). Headings like Ingredients / Directions are used when present."},"servings":{"type":"number","exclusiveMinimum":0,"maximum":1000,"description":"Optional number of servings. Overrides any 'Serves 4' line in the text; needed for per-serving nutrition if the text does not say."}},"required":["text"],"additionalProperties":false},"example":{"text":"Pancakes\nServes 4\n\nIngredients\n1 1/2 cups all-purpose flour\n2 tbsp sugar\n1 cup milk\n1 large egg\n\nDirections\n1. Whisk everything together.\n2. Cook on a hot griddle 2 minutes per side.","servings":4}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"},"example":{"title":"Pancakes","servings":{"count":4,"source":"request"},"ingredients":[{"index":0,"raw":"1 1/2 cups all-purpose flour","quantity":1.5,"unit":"cup","name":"all-purpose flour"}],"steps":[{"number":1,"text":"Whisk everything together."}],"times":{"total_minutes":4,"source":"estimated_from_steps"},"nutrition":{"basis":"per_serving","per_serving":{"calories_kcal":240}},"terms_url":"https://ordstirr.com/agents/terms","notice":"Informational estimate, not medical or dietary advice. Review before relying on it."}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment required (x402). See the PAYMENT-REQUIRED header."},"413":{"description":"Request body too large (never charged)"}}}},"/v1/scale":{"post":{"operationId":"scaleRecipe","summary":"Scale a list of recipe ingredient lines by a factor or from one serving count to another","description":"Send ingredient lines (up to 100). Give either `factor`, or `from_servings` and `to_servings`. Returns each line with the new quantity in kitchen fractions. Lines without a quantity (to taste) are passed through unchanged. No nutrition lookup. Unpaid calls receive HTTP 402 with x402 payment terms. Invalid input is rejected with HTTP 400 and never charged.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ingredients":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"string","maxLength":300},"description":"One ingredient per string, e.g. \"1 1/2 cups flour\"."},"factor":{"type":"number","exclusiveMinimum":0,"maximum":1000,"description":"Multiply every quantity by this."},"from_servings":{"type":"number","exclusiveMinimum":0,"maximum":1000},"to_servings":{"type":"number","exclusiveMinimum":0,"maximum":1000}},"required":["ingredients"],"additionalProperties":false},"example":{"ingredients":["1 1/2 cups all-purpose flour","2 large eggs","salt to taste"],"from_servings":4,"to_servings":6}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"},"example":{"factor":1.5,"ingredients":[{"index":0,"original":"1 1/2 cups all-purpose flour","scaled":"2 1/4 cup all-purpose flour","quantity":2.25,"unit":"cup","name":"all-purpose flour"}],"terms_url":"https://ordstirr.com/agents/terms","notice":"Informational estimate, not medical or dietary advice. Review before relying on it."}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment required (x402). See the PAYMENT-REQUIRED header."},"413":{"description":"Request body too large (never charged)"}}}},"/v1/convert":{"post":{"operationId":"convertCookingUnits","summary":"Convert cooking units: volume, weight and oven temperature (volume to weight needs an ingredient)","description":"Convert between US/metric volume units, between weight units, and between F/C/K temperatures. To go between volume and weight, add `ingredient`; the density comes from that food's USDA portion data (SR Legacy + Foundation Foods, public domain). Use \"°C\"/\"celsius\" for Celsius (\"c\" means cup). Unpaid calls receive HTTP 402 with x402 payment terms. Invalid input is rejected with HTTP 400 and never charged.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"number","minimum":-1000000,"maximum":1000000},"from":{"type":"string","maxLength":24,"description":"e.g. cup, tbsp, tsp, fl oz, ml, l, pint, quart, gallon, g, kg, oz, lb, F, °C"},"to":{"type":"string","maxLength":24},"ingredient":{"type":"string","maxLength":100,"description":"Needed only for volume <-> weight, e.g. \"all-purpose flour\"."}},"required":["value","from","to"],"additionalProperties":false},"example":{"value":2,"from":"cup","to":"g","ingredient":"all-purpose flour"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"},"example":{"value":2,"from":"cup","to":"g","result":250,"method":"volume_to_mass_via_density","ingredient_match":{"fdc_id":169761,"description":"Wheat flour, white, all-purpose, enriched, bleached"},"terms_url":"https://ordstirr.com/agents/terms","notice":"Informational estimate, not medical or dietary advice. Review before relying on it."}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment required (x402). See the PAYMENT-REQUIRED header."},"413":{"description":"Request body too large (never charged)"}}}},"/v1/substitute":{"post":{"operationId":"substituteIngredient","summary":"Ingredient substitutions with a citation from public-domain sources (Fannie Farmer, 1906)","description":"Look up a replacement for an ingredient. Every suggestion quotes and cites a public-domain source (The Boston Cooking-School Cook Book, Fannie Merritt Farmer, 1906 (copyright 1896-1906)). Covers a small, hand-checked set: cream, baking powder, baking soda and cream of tartar, unsweetened chocolate, mace, nutmeg, butter for frying, bread crumbs, whole wheat flour, milk for hot chocolate. An ingredient with no source-backed answer is a 400 and is not charged. Unpaid calls receive HTTP 402 with x402 payment terms. Invalid input is rejected with HTTP 400 and never charged.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ingredient":{"type":"string","minLength":1,"maxLength":80,"description":"Ingredient to replace. Covered: cream, baking powder, baking soda and cream of tartar, unsweetened chocolate, mace, nutmeg, butter for frying, bread crumbs, whole wheat flour, milk for hot chocolate."},"quantity":{"type":"number","exclusiveMinimum":0,"maximum":100000,"description":"Optional amount of the original; used only where the source supports a ratio."},"unit":{"type":"string","maxLength":24,"description":"Unit of `quantity` (tsp, tbsp, cup, oz, g...)."}},"required":["ingredient"],"additionalProperties":false},"example":{"ingredient":"baking powder","quantity":3,"unit":"tsp"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"},"example":{"ingredient":"baking powder","suggestions":[{"substitute":"baking soda + cream of tartar","how":"Mix one part baking soda with two parts cream of tartar","amounts":[{"name":"baking soda","quantity":1,"unit":"tsp"}],"citation":{"source":"The Boston Cooking-School Cook Book","chapter":"Chapter IV, Bread and Bread Making"}}],"terms_url":"https://ordstirr.com/agents/terms","notice":"Informational estimate, not medical or dietary advice. Review before relying on it."}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment required (x402). See the PAYMENT-REQUIRED header."},"413":{"description":"Request body too large (never charged)"}}}}}}