{"uid":"cap_eUdUM7n0i-Z7MO9paHaSx","slug":"brainiac-menu-profitability-rank-api-ef359409","name":"BRAINIAC Menu Profitability Rank API","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-profitability-rank?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","rank":1,"revenue":0,"recipeId":"R-1","sellPrice":3,"unitsSold":40,"foodCostPct":0.0733,"grossMargin":0.9267,"grossProfit":2.78,"contribution":111.2,"priceInvented":false,"costPerPortion":0.22,"revenueSupplied":false,"sellPriceSupplied":true,"unitsSoldSupplied":true,"foodCostPctSupplied":true,"grossMarginSupplied":true,"grossProfitSupplied":true,"contributionSupplied":true,"costPerPortionSupplied":true,"foodSafetyComplianceClaimed":false},{"name":"Toast","rank":2,"revenue":0,"recipeId":"R-2","sellPrice":4,"unitsSold":10,"foodCostPct":0.085,"grossMargin":0.915,"grossProfit":3.66,"contribution":36.6,"priceInvented":false,"costPerPortion":0.34,"revenueSupplied":false,"sellPriceSupplied":true,"unitsSoldSupplied":true,"foodCostPctSupplied":true,"grossMarginSupplied":true,"grossProfitSupplied":true,"contributionSupplied":true,"costPerPortionSupplied":true,"foodSafetyComplianceClaimed":false}],"status":"ranked","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_vQBjlGh36iK_pz7bLq0rC","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":"Ranks menu items by profitability using recipes, ingredient prices, sales, waste, and allergen data, computing food cost %, gross margin, and contribution margin per item.","exampleAgentPrompt":"Can you rank my menu items by profitability? Here are my recipes with ingredients and quantities, the supplier prices I'm paying, and last month's sales by dish — tell me which items have the best gross margin and contribution margin, and flag any allergen compliance issues.","exampleUseCases":[{"title":"Monthly menu engineering review","prompt":"I want to do a full menu engineering analysis — here are my recipes, what I pay suppliers for each ingredient, and my sales data for October. Rank every dish by gross margin and contribution margin so I know which ones to promote and which to cut."},{"title":"New menu launch profitability check","prompt":"We're launching a new menu next week. Can you take these 12 recipes with their ingredient lists and my current supplier prices and tell me which items are most profitable before we go live? I want to see food cost percentage and gross profit per portion for each."},{"title":"Waste impact on dish profitability","prompt":"I've got my recipes, sales numbers, and a waste log from this week — a lot of produce got thrown out. Can you rank my dishes by profitability factoring in that waste, so I can see which items are costing me the most?"}],"resultDescription":"A JSON array of ranked menu items, each with rank position, name, recipe ID, sell price, units sold, food cost %, gross margin, gross profit per portion, and total contribution margin. Flags indicate which values were supplied vs. derived, whether prices were invented, and whether allergen compliance was claimed. A top-level status, findings list, and limitations array are also returned.","failureModes":["Missing ingredient prices result in incomplete cost calculations — the API will not invent prices","Unit mismatch between recipe quantities and supplier pack units may prevent cost computation","Allergen validation only works if ingredient allergen flags are explicitly supplied","Truncated or malformed CSV/JSON inputs may be rejected or partially parsed","Exceeding array size limits (400 recipes, 400 sales rows, 200 waste rows) will cause input rejection","No nutritional data is computed — nutritional fields will be absent from output"],"whenToPreferThis":"Use this endpoint when you need a structured, computation-based profitability ranking of restaurant menu items using real recipe costs and sales data. It is ideal for menu engineering workflows where you have structured recipe, ingredient price, and sales data available. Prefer it over generic LLM analysis when you need deterministic gross margin and food cost calculations with clear traceability of which values were supplied vs. derived, and when allergen compliance flagging is needed alongside financial metrics.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T18:39:41.564Z","isFirstParty":false,"canonicalSlug":"brainiac-menu-profitability-rank-api-ef359409"}