# BRAINIAC Food Waste Estimator

> BRAINIAC Food Waste Estimator 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).

Estimates food waste costs for a restaurant by analyzing waste logs, recipes, ingredient prices, and sales data

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/restaurant-operations/food-waste-estimate?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-food-waste-estimator-094d8919
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BKegbHndMxqU2Wy64Lql-

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-food-waste-estimator-094d8919 -d '<json body>'
```

Example prompt: Estimate my restaurant's food waste costs — I had 500g of lettuce spoilage and 0.2kg of trim, the lettuce costs $4/kg, and I want to see a cost breakdown by ingredient and reason.

## When to prefer this

Use this endpoint when you need a transparent, deterministic cost estimate of restaurant food waste without any invented data — it explicitly flags when prices or nutritional values are missing rather than guessing. Ideal for restaurant operators, kitchen managers, or food-cost auditing agents that have structured waste logs, ingredient prices, and optionally recipes and sales data. Prefer this over general-purpose LLM analysis when auditability and clear sourcing of each price figure matters.

## Known failure modes

- Missing ingredient prices result in items with no estimated cost (prices are never invented)
- Unrecognized unit types prevent quantity conversion and cost calculation
- Overly large input (CSV/JSON exceeding 200,000 characters) may be rejected
- Malformed recipe or waste arrays may cause partial or empty results
- allergen findings only appear if allergen matrix and ingredient flags are explicitly supplied

## 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

A JSON object containing a list of waste line items each with estimated cost, unit price, price source, ingredient ID, quantity, and reason; a total estimated cost; a status field; allergen and nutrition invented flags; food safety compliance disclaimer; and a list of analytical limitations. Prices are only used when explicitly supplied — none are invented.

## 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": [
   {
    "unit": "g",
    "reason": "spoilage",
    "quantity": 500,
    "unitPrice": 0.004,
    "priceSource": "ingredient.unitPrice",
    "ingredientId": "lettuce",
    "estimatedCost": 2,
    "priceInvented": false,
    "estimatedCostSupplied": true
   },
   {
    "unit": "kg",
    "reason": "trim",
    "quantity": 0.2,
    "unitPrice": 4,
    "priceSource": "ingredient.unitPrice",
    "ingredientId": "lettuce",
    "estimatedCost": 0.8,
    "priceInvented": false,
    "estimatedCostSupplied": true
   }
  ],
  "status": "estimated",
  "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,
  "totalEstimatedCost": 2.8,
  "totalEstimatedCostSupplied": true,
  "foodSafetyComplianceClaimed": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-food-waste-estimator-094d8919/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)
