# BRAINIAC Inventory Intelligence — Stockout Risk Calculator

> BRAINIAC Inventory Intelligence — Stockout Risk Calculator is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-12).

Calculates stockout risk, days-of-cover, and reorder points for inventory items using sales history, current stock levels, and supplier lead times

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/inventory-intelligence/stockout-risk-calculate?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-inventory-intelligence-stockout-risk-calculator-4df1e883
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AL4wqGo35Pm9kRpU_1mhl

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-inventory-intelligence-stockout-risk-calculator-4df1e883 -d '<json body>'
```

Example prompt: Can you assess the stockout risk for my products? I'll give you my current stock levels (Widget SKU-1: 20 units on hand), 5 days of sales history, and supplier lead time of 4 days — tell me which SKUs are at risk and what their reorder points should be.

## When to prefer this

Use this endpoint when you have structured inventory and sales data and need a rapid, stateless stockout risk computation without connecting to a live inventory system. Ideal for agents orchestrating weekly replenishment workflows, pre-purchase-order reviews, or alerting pipelines where the agent supplies the data. Prefer this over manual spreadsheet analysis or ERP queries when you want a standardized risk score and reorder point with explicit assumptions surfaced. Not suited for real-time inventory system integration or demand forecasting with explicit seasonality modeling.

## Known failure modes

- Missing required product or sales data — API may return partial results or flag missing fields
- Sales history too short — model falls back to zero-fill for missing days, potentially underestimating demand
- SKU mismatch between products, sales, and suppliers arrays — mismatched SKUs produce incomplete calculations
- CSV/JSON parsing failure if unstructured input is malformed
- Input exceeds max array sizes (200 products, 2000 sales rows) — request will be rejected
- No supplier lead time provided — reorder point calculation may default to zero lead time

## 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 array of items, each containing: SKU, name, units available, days of cover remaining, risk level (e.g. elevated/critical/low), reorder point, average daily demand, lead time, and boolean flags indicating which values were supplied vs. assumed. Also includes global counts of at-risk products, model assumptions, and explicit limitations (e.g. no seasonality modeled, no purchase orders created).

## 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": {
     "sku": {
      "type": "string",
      "maxLength": 80
     },
     "date": {
      "type": "string",
      "maxLength": 40
     },
     "units": {
      "type": "number",
      "maximum": 1000000000,
      "minimum": 0
     }
    },
    "additionalProperties": false
   },
   "maxItems": 2000
  },
  "products": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "sku": {
      "type": "string",
      "maxLength": 80
     },
     "name": {
      "type": "string",
      "maxLength": 160
     },
     "onHand": {
      "type": "number",
      "maximum": 1000000000,
      "minimum": 0
     },
     "onOrder": {
      "type": "number",
      "maximum": 1000000000,
      "minimum": 0
     },
     "unitCost": {
      "type": "number",
      "maximum": 1000000000,
      "minimum": 0
     }
    },
    "additionalProperties": false
   },
   "maxItems": 200
  },
  "slowDays": {
   "type": "number",
   "maximum": 3650,
   "minimum": 1
  },
  "purchases": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "sku": {
      "type": "string",
      "maxLength": 80
     },
     "date": {
      "type": "string",
      "maxLength": 40
     },
     "units": {
      "type": "number",
      "maximum": 1000000000,
      "minimum": 0
     },
     "unitPrice": {
      "type": "number",
      "maximum": 1000000000,
      "minimum": 0
     }
    },
    "additionalProperties": false
   },
   "maxItems": 500
  },
  "slowUnits": {
   "type": "number",
   "maximum": 1000000000,
   "minimum": 0
  },
  "suppliers": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "moq
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "sku": "SKU-1",
    "name": "Widget",
    "available": 20,
    "daysCover": 2,
    "riskLevel": "elevated",
    "leadTimeDays": 4,
    "reorderPoint": 45.9,
    "demandSupplied": true,
    "availableSupplied": true,
    "belowReorderPoint": true,
    "daysCoverSupplied": true,
    "averageDailyDemand": 10,
    "leadTimeDaysSupplied": true,
    "reorderPointSupplied": true,
    "stockoutRiskCalculated": true
   }
  ],
  "status": "calculated",
  "findings": [],
  "checkedAt": "2026-11-04T19:00:00.000Z",
  "assumptions": [
   "serviceLevelZ=1.65 (explicit normal z factor for safety stock)",
   "reviewDays=0",
   "historyDays=5",
   "forecastDays=30",
   "excessDaysCover=90",
   "slowUnits=5 over slowDays=90",
   "Daily demand average fills missing days in the history window with zero when a history end date exists.",
   "Seasonality is not added. Only variation already present in the supplied history affects the standard deviation."
  ],
  "atRiskCount": 1,
  "limitations": [
   "Products, sales, supplier lead times, and purchases are copied only from labeled fields supplied by the caller.",
   "Reorder point = average daily demand × (lead time days + review days) + safety stock.",
   "Safety stock = service-level z × daily demand standard deviation × square root of lead time days.",
   "Demand forecasts use a simple average of available history only. Seasonality is not modeled unless present in that history.",
   "Lead times, demand, and purchase prices are never invented. No purchase order is created and no inventory system is accessed."
  ],
  "priceInvented": false,
  "demandInvented": false,
  "leadTimeInvented": false,
  "purchaseOrderCreated": false,
  "inventorySystemAccessed": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-inventory-intelligence-stockout-risk-calculator-4df1e883/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)
