{"uid":"cap_H2FFmUhLb-idEsJR4DGOO","slug":"brainiac-restaurant-menu-item-margin-analyzer-1f414a6f","name":"BRAINIAC Restaurant Menu Item Margin Analyzer","description":"Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.","url":"https://www.brainiac.software/api/v1/restaurant-operations/menu-item-margin-analyze?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"csv":{"type":"string","maxLength":200000},"asOf":{"type":"string","maxLength":40},"file":{"type":"object","required":["mediaType","fileBase64"],"properties":{"filename":{"type":"string","maxLength":180,"minLength":1},"mediaType":{"enum":["text/plain","text/csv","application/json"],"type":"string"},"fileBase64":{"type":"string","maxLength":12000000,"minLength":1}},"additionalProperties":false},"json":{"type":"string","maxLength":200000},"text":{"type":"string","maxLength":200000},"sales":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","maxLength":40},"units":{"type":"number","maximum":1000000000,"minimum":0},"revenue":{"type":"number","maximum":1000000000,"minimum":0},"recipeId":{"type":"string","maxLength":80}},"additionalProperties":false},"maxItems":400},"waste":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","maxLength":40},"reason":{"type":"string","maxLength":160},"quantity":{"type":"number","maximum":1000000000,"minimum":0},"ingredientId":{"type":"string","maxLength":80}},"additionalProperties":false},"maxItems":200},"matrix":{"type":"array","items":{"type":"object","properties":{"claimed":{"type":"boolean"},"allergen":{"type":"string","maxLength":80},"recipeId":{"type":"string","maxLength":80}},"additionalProperties":false},"maxItems":400},"prices":{"type":"array","items":{"type":"object","properties":{"asOf":{"type":"string","maxLength":40},"unit":{"type":"string","maxLength":40},"packSize":{"type":"number","maximum":1000000000,"minimum":0},"packPrice":{"type":"number","maximum":1000000000,"minimum":0},"unitPrice":{"type":"number","maximum":1000000000,"minimum":0},"supplierId":{"type":"string","maxLength":80},"ingredientId":{"type":"string","maxLength":80}},"additionalProperties":false},"maxItems":400},"recipes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":160},"portions":{"type":"number","maximum":1000000,"minimum":0},"yieldQty":{"type":"number","maximum":1000000000,"minimum":0},"sellPrice":{"type":"number","maximum":1000000000,"minimum":0},"yieldUnit":{"type":"string","maxLength":40}},"additionalProperties":false},"maxItems":100},"allergens":{"type":"array","items":{"type":"object","properties":{"present":{"type":"boolean"},"allergen":{"type":"string","maxLength":80},"ingredientId":{"type":"string","maxLength":80}},"additionalProperties":false},"maxItems":400},"ingredients":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":160},"unit":{"type":"string","maxLength":40},"packSize":{"type":"number","maximum":1000000000,"minimum":0},"packPrice":{"type":"number","maximum":1000000000,"minimum":0},"unitPrice":{"type":"number","maximum":1000000000,"minimum":0}},"additionalProperties":false},"maxItems":200},"recipeLines":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","maxLength":40},"quantity":{"type":"number","maximum":1000000000,"minimum":0},"recipeId":{"type":"string","maxLength":80},"ingredientId":{"type":"string","maxLength":80}},"additionalProperties":false},"maxItems":500}}},"responseSchema":{"type":"json","example":{"items":[{"name":"Cookie","recipeId":"R-1","sellPrice":3,"foodCostPct":0.0733,"grossMargin":0.9267,"grossProfit":2.78,"priceInvented":false,"costPerPortion":0.22,"sellPriceSupplied":true,"foodCostPctSupplied":true,"grossMarginSupplied":true,"grossProfitSupplied":true,"costPerPortionSupplied":true,"foodSafetyComplianceClaimed":false},{"name":"Toast","recipeId":"R-2","sellPrice":4,"foodCostPct":0.085,"grossMargin":0.915,"grossProfit":3.66,"priceInvented":false,"costPerPortion":0.34,"sellPriceSupplied":true,"foodCostPctSupplied":true,"grossMarginSupplied":true,"grossProfitSupplied":true,"costPerPortionSupplied":true,"foodSafetyComplianceClaimed":false}],"status":"analyzed","findings":[],"checkedAt":"2026-11-04T21:00:00.000Z","limitations":["Recipes, supplier prices, sales, waste, and allergen rows are copied only from labeled fields supplied by the caller.","Recipe cost uses supplied quantities and prices after unit conversion. Missing prices are not invented.","Unit conversion covers common mass and volume units. Count units convert only to the same count family.","Allergen validation uses only explicitly supplied ingredient allergen flags and menu claims.","Nutritional values are never invented. No legal food-safety compliance is claimed."],"priceInvented":false,"allergenInvented":false,"nutritionInvented":false,"foodSafetyComplianceClaimed":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rrj7QXGHO-S4T8jAkFszy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes restaurant menu items to compute food cost percentage, gross margin, gross profit, and cost per portion using supplied recipes, ingredient prices, sales, waste, and allergen data.","exampleAgentPrompt":"Analyze the profit margins for my restaurant menu — here are my recipes with ingredient quantities, supplier prices for each ingredient, and recent sales data. I want to see the food cost percentage, gross margin, gross profit, and cost per portion for each dish.","exampleUseCases":[{"title":"Identify low-margin dishes to reprice","prompt":"I want to know which of my menu items are costing me the most relative to what I charge — can you calculate the gross margin and food cost percentage for each dish using these recipes and my current supplier prices so I can decide what to reprice?"},{"title":"Track margin impact of ingredient price changes","prompt":"My supplier just raised the price of chicken and flour — can you re-run the margin analysis on all my recipes using the updated ingredient costs so I can see how my food cost percentage and gross profit have changed?"},{"title":"Validate allergen claims against menu recipes","prompt":"Before we update our printed menu, can you check whether the allergen claims we've listed for each dish are actually consistent with the ingredients in those recipes? I'll send you the allergen matrix and the full recipe list."}],"resultDescription":"Returns a list of analyzed menu items each with: name, recipe ID, sell price, food cost percentage, gross margin, gross profit, cost per portion, allergen compliance claim status, and flags indicating which values were supplied vs. computed. Also includes overall status ('analyzed'), any findings or warnings, a timestamp, and a list of data limitations/assumptions made during analysis. No nutritional values, allergen flags, or prices are invented — missing data is flagged, not fabricated.","failureModes":["Missing ingredient prices for recipe components — affected cost fields are omitted rather than invented","Unrecognized unit types that cannot be converted — portion cost calculation fails for those ingredients","Recipes referencing ingredient IDs not present in the prices array — cost cannot be computed","Empty or malformed CSV/JSON input — parsing error returned","Input exceeds size limits (e.g. more than 400 recipe items or 200 waste rows) — request rejected"],"whenToPreferThis":"Use this endpoint when you need a transparent, auditable margin and food cost analysis for restaurant menu items using your own supplied recipe, pricing, and sales data — particularly when you need to avoid any invented or hallucinated cost figures. It is especially suited for agentic workflows where you want structured per-item margin breakdowns with explicit data provenance flags. Prefer this over general LLM-based calculations when you need consistent, deterministic computation with allergen validation and clear limitation disclosures.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-11T13:20:48.737Z","isFirstParty":false,"canonicalSlug":"brainiac-restaurant-menu-item-margin-analyzer-1f414a6f"}