# BRAINIAC Ingredient Price Variance Analyzer

> BRAINIAC Ingredient Price Variance Analyzer is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-12).

Analyzes ingredient price data across suppliers and time periods to detect variance, inconsistencies, and cost trends for restaurant operations

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/restaurant-operations/ingredient-price-variance?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-ingredient-price-variance-analyzer-56d46647
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OFPcHKY4MmHq4zz1mE3Et

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brainiac-ingredient-price-variance-analyzer-56d46647 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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).

## Request schema (JSON Schema)

```json
{
 "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
  
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "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
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-ingredient-price-variance-analyzer-56d46647/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
