{"uid":"cap_OFPcHKY4MmHq4zz1mE3Et","slug":"brainiac-ingredient-price-variance-analyzer-56d46647","name":"BRAINIAC Ingredient Price Variance 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/ingredient-price-variance?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":"flour","unit":"kg","spread":0.7,"maxPrice":2.5,"minPrice":1.8,"changePct":0.1364,"spreadPct":0.3889,"latestAsOf":"2026-11-01","latestPrice":2.5,"inconsistent":true,"ingredientId":"flour","previousAsOf":"2026-11-01","previousPrice":2.2,"priceInvented":false,"observationCount":3,"changePctSupplied":true}],"status":"detected","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.04","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.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cv1x70suHNTgK_H6Vcpfb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes ingredient price data across suppliers and time periods to detect variance, inconsistencies, and cost trends for restaurant operations","exampleAgentPrompt":"Can you analyze these ingredient price records from my restaurant and flag any significant price variance or inconsistencies across suppliers? Here are the prices array with entries for flour, chicken, and olive oil over the past three months, and I want to check as of 2026-11-01.","exampleUseCases":[{"title":"Detect supplier price gouging","prompt":"I have purchase records for my restaurant going back six months — can you check if any of my suppliers have been inconsistently pricing the same ingredients? I'll give you the prices array with ingredientId, supplierId, packPrice, and date so you can flag anything that looks like gouging or variance."},{"title":"Monthly food cost variance report","prompt":"Run a price variance analysis on our ingredient purchases for October — here's the full prices array with unit costs and supplier IDs for each item we bought, as of 2026-10-31. I want to know which ingredients had the biggest price swings and what the min/max spread was."},{"title":"Recipe cost consistency check","prompt":"We updated several recipes this quarter and I want to make sure our ingredient costs have stayed consistent — can you analyze these price records alongside our recipes array and sales data to detect any cost anomalies that might be eating into margins?"}],"resultDescription":"Returns a JSON object with an items array where each entry describes an ingredient's price variance: min/max price, spread, spread percentage, change percentage, latest vs previous price with dates, observation count, and an inconsistency flag. Also includes a top-level status, findings list, checkedAt timestamp, and a limitations array clarifying what was and wasn't computed (e.g. no nutrition invention, no food-safety compliance claims).","failureModes":["Missing or malformed prices array results in empty items output with no variance computed","Unrecognized unit types prevent unit conversion and may cause missing price calculations","Truncated CSV or JSON input (exceeding maxLength) may result in incomplete analysis","Insufficient observation count per ingredient yields low-confidence variance metrics","Mismatched ingredientIds between recipes and prices cause gaps in cost analysis"],"whenToPreferThis":"Use this endpoint when you need to programmatically detect ingredient price variance across suppliers or time periods for a restaurant or food-service operation, especially when you already have structured purchase/price records. It is well-suited for automated cost-monitoring agents that ingest purchasing data and need to flag anomalies without manual review. Prefer it over generic spreadsheet tools when you need structured JSON output with per-ingredient variance metrics, inconsistency flags, and built-in unit conversion, all with no account setup required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T18:39:27.040Z","isFirstParty":false,"canonicalSlug":"brainiac-ingredient-price-variance-analyzer-56d46647"}