{"uid":"cap_0FrwHoAZRNmBHaB67kYkG","slug":"brainiac-allergen-matrix-validator-e7431b5e","name":"BRAINIAC Allergen Matrix Validator","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/allergen-matrix-validate?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","allergens":[{"status":"match","claimed":true,"sources":["flour","butter"],"allergen":"gluten","derivedPresent":true,"claimedSupplied":true,"allergenInvented":false,"derivedPresentSupplied":true,"foodSafetyComplianceClaimed":false},{"status":"mismatch","claimed":false,"sources":["butter"],"allergen":"milk","derivedPresent":true,"claimedSupplied":true,"allergenInvented":false,"derivedPresentSupplied":true,"foodSafetyComplianceClaimed":false},{"status":"claim_without_ingredient_data","claimed":false,"sources":[],"allergen":"peanut","derivedPresent":false,"claimedSupplied":true,"allergenInvented":false,"derivedPresentSupplied":false,"foodSafetyComplianceClaimed":false}],"mismatchCount":1,"ingredientCount":2,"allergenInvented":false,"foodSafetyComplianceClaimed":false}],"status":"validated","findings":[{"code":"allergen_mismatch","kind":"conflict","detail":"Menu allergen claim does not match derived ingredient allergen flags.","subject":"R-1:milk"},{"code":"allergen_basis","kind":"missing","detail":"A menu allergen claim has no supporting ingredient allergen rows.","subject":"R-1:peanut"}],"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."],"mismatchCount":1,"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_BlA1qAfjyU3ZQ-ltb5H7Z","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":"Validates restaurant menu allergen claims against recipe ingredients, detecting mismatches between declared allergens and ingredient-derived allergen presence.","exampleAgentPrompt":"Can you validate our allergen matrix against our recipe ingredients? I'll give you our recipes and the allergen claims we've made on the menu — flag any mismatches where we've missed declaring an allergen or claimed one that isn't actually present.","exampleUseCases":[{"title":"Pre-inspection allergen audit","prompt":"We have a health inspection coming up and I need to verify our menu allergen declarations are accurate. Here are our recipes with their ingredients and our current allergen matrix — please check for any mismatches or undeclared allergens across all dishes."},{"title":"New menu item allergen check","prompt":"We just added a new cookie recipe to the menu and declared it contains gluten and eggs. Can you cross-check that against the actual ingredient list and flag if we're missing any allergens like milk or nuts?"},{"title":"Supplier ingredient change impact","prompt":"Our supplier swapped in a new butter that contains traces of peanut — can you re-validate our full allergen matrix against the updated ingredient allergen flags and tell me which dishes now have a mismatch?"}],"resultDescription":"Returns a structured JSON object with per-recipe allergen validation results, including allergen status (match, mismatch, claim_without_ingredient_data), sources (which ingredients contribute each allergen), mismatch counts, overall validation status, specific findings with codes and details (e.g. allergen_mismatch, allergen_basis), a checkedAt timestamp, and a list of limitations. Also returns top-level flags: mismatchCount, priceInvented, allergenInvented, nutritionInvented, foodSafetyComplianceClaimed.","failureModes":["Missing required allergen matrix or recipe data results in incomplete validation","Allergen claims with no supporting ingredient rows produce 'claim_without_ingredient_data' status rather than an error","Ingredient allergen flags not explicitly supplied are never inferred or invented","Unit conversion failures for non-standard units may cause missing cost data","Exceeding array size limits (400 matrix rows, 400 recipes) causes rejection","Invalid mediaType in file upload returns schema validation error"],"whenToPreferThis":"Use this endpoint when you need to systematically cross-check a restaurant's declared menu allergens against actual recipe ingredient data to find discrepancies. It is especially valuable for pre-inspection audits, menu updates, or supplier changes. Unlike manual review, it programmatically detects undeclared allergens, false claims, and claims with no supporting ingredient evidence. It does not invent data or claim legal food-safety compliance, making it suitable for objective validation workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T18:39:13.339Z","isFirstParty":false,"canonicalSlug":"brainiac-allergen-matrix-validator-e7431b5e"}