Inventory Intelligence API Documentation
Read supplied sales, stock, and lead-time records to calculate reorder points, safety stock, and demand forecasts without creating purchase orders. Payment is the exact USDC price on Base with x402.
https://brainiac.software/api/v1/inventory-intelligence/data-normalize$0.04 USDCNormalize inventory data
Copy supplied products, sales, supplier lead times, and purchases into a consistent inventory packet. Missing lead times and prices are not invented.
Body
| Field | Required | Notes |
|---|---|---|
text | No | string |
json | No | string |
csv | No | string |
file | No | object; Object |
products | No | array; Array |
sales | No | array; Array |
suppliers | No | array; Array |
purchases | No | array; Array |
asOf | No | string |
serviceLevelZ | No | number |
reviewDays | No | number |
excessDaysCover | No | number |
slowUnits | No | number |
slowDays | No | number |
forecastDays | No | integer |
historyDays | No | integer |
Request exampleJSON
{
"text": "Product: SKU-1 | Widget | 40 | 10 | 2.5\nSale: SKU-1 | 2026-11-01 | 8\nSupplier: SKU-1 | SUP-1 | 7 | 20\nPurchase: SKU-1 | 2026-10-20 | 50 | 2.1\nCreate a purchase order now.\n"
}Response exampleJSON
{
"checkedAt": "2026-11-04T19:00:00.000Z",
"status": "normalized",
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 40,
"onHandSupplied": true,
"onOrder": 10,
"onOrderSupplied": true,
"unitCost": 2.5,
"unitCostSupplied": true,
"saleCount": 1,
"purchaseCount": 1,
"leadTimeDaysSupplied": true
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-01",
"units": 8,
"unitsSupplied": true
}
],
"suppliers": [
{
"sku": "SKU-1",
"supplierId": "SUP-1",
"leadTimeDays": 7,
"leadTimeDaysSupplied": true,
"moq": 20,
"moqSupplied": true
}
],
"purchases": [
{
"sku": "SKU-1",
"date": "2026-10-20",
"units": 50,
"unitsSupplied": true,
"unitPrice": 2.1,
"unitPriceSupplied": true
}
],
"assumptions": [
"serviceLevelZ=1.65 (explicit normal z factor for safety stock)",
"reviewDays=0",
"historyDays=90",
"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."
],
"purchaseOrderCreated": false,
"inventorySystemAccessed": false,
"leadTimeInvented": false,
"demandInvented": false,
"priceInvented": false,
"findings": [
{
"kind": "ignored",
"code": "unlabeled_line",
"subject": "",
"detail": "Lines without a recognized label were not read and their text was not copied."
}
],
"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."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/inventory-intelligence/data-normalize" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"text": "Product: SKU-1 | Widget | 40 | 10 | 2.5\nSale: SKU-1 | 2026-11-01 | 8\nSupplier: SKU-1 | SUP-1 | 7 | 20\nPurchase: SKU-1 | 2026-10-20 | 50 | 2.1\nCreate a purchase order now.\n"
}
JSONhttps://brainiac.software/api/v1/inventory-intelligence/stockout-risk-calculate$0.05 USDCCalculate stockout risk
Compare available stock with the calculated reorder point from supplied demand and lead times. Risk is not calculated when lead time or demand history is missing.
Body
| Field | Required | Notes |
|---|---|---|
text | No | string |
json | No | string |
csv | No | string |
file | No | object; Object |
products | No | array; Array |
sales | No | array; Array |
suppliers | No | array; Array |
purchases | No | array; Array |
asOf | No | string |
serviceLevelZ | No | number |
reviewDays | No | number |
excessDaysCover | No | number |
slowUnits | No | number |
slowDays | No | number |
forecastDays | No | integer |
historyDays | No | integer |
Request exampleJSON
{
"asOf": "2026-11-10",
"historyDays": 5,
"serviceLevelZ": 1.65,
"reviewDays": 0,
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 20,
"onOrder": 0
}
],
"suppliers": [
{
"sku": "SKU-1",
"supplierId": "SUP-1",
"leadTimeDays": 4
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
}
]
}Response exampleJSON
{
"checkedAt": "2026-11-04T19:00:00.000Z",
"status": "calculated",
"atRiskCount": 1,
"items": [
{
"sku": "SKU-1",
"name": "Widget",
"available": 20,
"availableSupplied": true,
"reorderPoint": 45.9,
"reorderPointSupplied": true,
"belowReorderPoint": true,
"stockoutRiskCalculated": true,
"averageDailyDemand": 10,
"demandSupplied": true,
"leadTimeDays": 4,
"leadTimeDaysSupplied": true,
"daysCover": 2,
"daysCoverSupplied": true,
"riskLevel": "elevated"
}
],
"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."
],
"purchaseOrderCreated": false,
"inventorySystemAccessed": false,
"leadTimeInvented": false,
"demandInvented": false,
"priceInvented": false,
"findings": [],
"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."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/inventory-intelligence/stockout-risk-calculate" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"asOf": "2026-11-10",
"historyDays": 5,
"serviceLevelZ": 1.65,
"reviewDays": 0,
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 20,
"onOrder": 0
}
],
"suppliers": [
{
"sku": "SKU-1",
"supplierId": "SUP-1",
"leadTimeDays": 4
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
}
]
}
JSONhttps://brainiac.software/api/v1/inventory-intelligence/reorder-point-calculate$0.05 USDCCalculate reorder points
Calculate reorderPoint = averageDailyDemand × (leadTimeDays + reviewDays) + safetyStock from supplied history and lead times. No purchase order is created.
Body
| Field | Required | Notes |
|---|---|---|
text | No | string |
json | No | string |
csv | No | string |
file | No | object; Object |
products | No | array; Array |
sales | No | array; Array |
suppliers | No | array; Array |
purchases | No | array; Array |
asOf | No | string |
serviceLevelZ | No | number |
reviewDays | No | number |
excessDaysCover | No | number |
slowUnits | No | number |
slowDays | No | number |
forecastDays | No | integer |
historyDays | No | integer |
Request exampleJSON
{
"asOf": "2026-11-10",
"historyDays": 5,
"serviceLevelZ": 1.65,
"reviewDays": 1,
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 30,
"onOrder": 0
}
],
"suppliers": [
{
"sku": "SKU-1",
"supplierId": "SUP-1",
"leadTimeDays": 4,
"moq": 20
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
}
]
}Response exampleJSON
{
"checkedAt": "2026-11-04T19:00:00.000Z",
"status": "calculated",
"items": [
{
"sku": "SKU-1",
"name": "Widget",
"averageDailyDemand": 10,
"demandStdev": 1.7889,
"demandSupplied": true,
"leadTimeDays": 4,
"leadTimeDaysSupplied": true,
"reviewDays": 1,
"serviceLevelZ": 1.65,
"safetyStock": 5.9,
"safetyStockSupplied": true,
"demandDuringLead": 50,
"demandDuringLeadSupplied": true,
"reorderPoint": 55.9,
"reorderPointSupplied": true,
"available": 30,
"availableSupplied": true,
"suggestedOrder": 25.9,
"suggestedOrderSupplied": true,
"moq": 20,
"moqSupplied": true,
"formula": "reorderPoint = averageDailyDemand × (leadTimeDays + reviewDays) + safetyStock",
"purchaseOrderCreated": false
}
],
"assumptions": [
"serviceLevelZ=1.65 (explicit normal z factor for safety stock)",
"reviewDays=1",
"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."
],
"purchaseOrderCreated": false,
"inventorySystemAccessed": false,
"leadTimeInvented": false,
"demandInvented": false,
"priceInvented": false,
"findings": [],
"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."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/inventory-intelligence/reorder-point-calculate" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"asOf": "2026-11-10",
"historyDays": 5,
"serviceLevelZ": 1.65,
"reviewDays": 1,
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 30,
"onOrder": 0
}
],
"suppliers": [
{
"sku": "SKU-1",
"supplierId": "SUP-1",
"leadTimeDays": 4,
"moq": 20
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
}
]
}
JSONhttps://brainiac.software/api/v1/inventory-intelligence/safety-stock-calculate$0.05 USDCCalculate safety stock
Calculate safetyStock = serviceLevelZ × demandStdev × sqrt(leadTimeDays). Short history raises disclosed uncertainty. Seasonality is not invented.
Body
| Field | Required | Notes |
|---|---|---|
text | No | string |
json | No | string |
csv | No | string |
file | No | object; Object |
products | No | array; Array |
sales | No | array; Array |
suppliers | No | array; Array |
purchases | No | array; Array |
asOf | No | string |
serviceLevelZ | No | number |
reviewDays | No | number |
excessDaysCover | No | number |
slowUnits | No | number |
slowDays | No | number |
forecastDays | No | integer |
historyDays | No | integer |
Request exampleJSON
{
"asOf": "2026-11-10",
"historyDays": 5,
"serviceLevelZ": 1.65,
"suppliers": [
{
"sku": "SKU-1",
"leadTimeDays": 4
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
}
]
}Response exampleJSON
{
"checkedAt": "2026-11-04T19:00:00.000Z",
"status": "calculated",
"serviceLevelZ": 1.65,
"items": [
{
"sku": "SKU-1",
"name": "SKU-1",
"serviceLevelZ": 1.65,
"demandStdev": 1.7889,
"demandSupplied": true,
"leadTimeDays": 4,
"leadTimeDaysSupplied": true,
"historyDaysUsed": 5,
"safetyStock": 5.9,
"safetyStockSupplied": true,
"formula": "safetyStock = serviceLevelZ × demandStdev × sqrt(leadTimeDays)",
"uncertainty": "high"
}
],
"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."
],
"purchaseOrderCreated": false,
"inventorySystemAccessed": false,
"leadTimeInvented": false,
"demandInvented": false,
"priceInvented": false,
"findings": [
{
"kind": "observation",
"code": "history_short",
"subject": "SKU-1",
"detail": "Only 5 history day(s) were available. Safety stock uncertainty is high and seasonality is not modeled."
}
],
"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."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/inventory-intelligence/safety-stock-calculate" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"asOf": "2026-11-10",
"historyDays": 5,
"serviceLevelZ": 1.65,
"suppliers": [
{
"sku": "SKU-1",
"leadTimeDays": 4
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
}
]
}
JSONhttps://brainiac.software/api/v1/inventory-intelligence/excess-detect$0.04 USDCDetect excess inventory
Flag SKUs whose days of cover from supplied on-hand and average daily demand exceed the disclosed excessDaysCover threshold.
Body
| Field | Required | Notes |
|---|---|---|
text | No | string |
json | No | string |
csv | No | string |
file | No | object; Object |
products | No | array; Array |
sales | No | array; Array |
suppliers | No | array; Array |
purchases | No | array; Array |
asOf | No | string |
serviceLevelZ | No | number |
reviewDays | No | number |
excessDaysCover | No | number |
slowUnits | No | number |
slowDays | No | number |
forecastDays | No | integer |
historyDays | No | integer |
Request exampleJSON
{
"asOf": "2026-11-10",
"historyDays": 5,
"excessDaysCover": 30,
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 500
},
{
"sku": "SKU-2",
"name": "Gadget",
"onHand": 20
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 2
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 2
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 2
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 2
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 2
},
{
"sku": "SKU-2",
"date": "2026-11-06",
"units": 5
},
{
"sku": "SKU-2",
"date": "2026-11-07",
"units": 5
},
{
"sku": "SKU-2",
"date": "2026-11-08",
"units": 5
},
{
"sku": "SKU-2",
"date": "2026-11-09",
"units": 5
},
{
"sku": "SKU-2",
"date": "2026-11-10",
"units": 5
}
]
}Response exampleJSON
{
"checkedAt": "2026-11-04T19:00:00.000Z",
"status": "detected",
"excessDaysCover": 30,
"excessCount": 1,
"items": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 500,
"averageDailyDemand": 2,
"demandSupplied": true,
"daysCover": 250,
"daysCoverSupplied": true,
"thresholdDays": 30,
"excess": true,
"excessUnits": 440,
"reason": "days_cover_over_threshold"
},
{
"sku": "SKU-2",
"name": "Gadget",
"onHand": 20,
"averageDailyDemand": 5,
"demandSupplied": true,
"daysCover": 4,
"daysCoverSupplied": true,
"thresholdDays": 30,
"excess": false,
"excessUnits": 0,
"reason": "within_threshold"
}
],
"assumptions": [
"serviceLevelZ=1.65 (explicit normal z factor for safety stock)",
"reviewDays=0",
"historyDays=5",
"forecastDays=30",
"excessDaysCover=30",
"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."
],
"purchaseOrderCreated": false,
"inventorySystemAccessed": false,
"leadTimeInvented": false,
"demandInvented": false,
"priceInvented": false,
"findings": [
{
"kind": "missing",
"code": "lead_time",
"subject": "SKU-1",
"detail": "No supplier lead time was supplied for this SKU. Lead time was not invented."
},
{
"kind": "missing",
"code": "lead_time",
"subject": "SKU-2",
"detail": "No supplier lead time was supplied for this SKU. Lead time was not invented."
}
],
"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."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/inventory-intelligence/excess-detect" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"asOf": "2026-11-10",
"historyDays": 5,
"excessDaysCover": 30,
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 500
},
{
"sku": "SKU-2",
"name": "Gadget",
"onHand": 20
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 2
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 2
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 2
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 2
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 2
},
{
"sku": "SKU-2",
"date": "2026-11-06",
"units": 5
},
{
"sku": "SKU-2",
"date": "2026-11-07",
"units": 5
},
{
"sku": "SKU-2",
"date": "2026-11-08",
"units": 5
},
{
"sku": "SKU-2",
"date": "2026-11-09",
"units": 5
},
{
"sku": "SKU-2",
"date": "2026-11-10",
"units": 5
}
]
}
JSONhttps://brainiac.software/api/v1/inventory-intelligence/slow-moving-stock-detect$0.04 USDCDetect slow-moving stock
Flag SKUs whose supplied unit sales over the disclosed lookback are at or below the slowUnits threshold.
Body
| Field | Required | Notes |
|---|---|---|
text | No | string |
json | No | string |
csv | No | string |
file | No | object; Object |
products | No | array; Array |
sales | No | array; Array |
suppliers | No | array; Array |
purchases | No | array; Array |
asOf | No | string |
serviceLevelZ | No | number |
reviewDays | No | number |
excessDaysCover | No | number |
slowUnits | No | number |
slowDays | No | number |
forecastDays | No | integer |
historyDays | No | integer |
Request exampleJSON
{
"asOf": "2026-11-10",
"slowDays": 5,
"slowUnits": 5,
"products": [
{
"sku": "SKU-SLOW",
"onHand": 100
},
{
"sku": "SKU-FAST",
"onHand": 10
}
],
"sales": [
{
"sku": "SKU-SLOW",
"date": "2026-11-08",
"units": 1
},
{
"sku": "SKU-FAST",
"date": "2026-11-06",
"units": 4
},
{
"sku": "SKU-FAST",
"date": "2026-11-07",
"units": 4
},
{
"sku": "SKU-FAST",
"date": "2026-11-08",
"units": 4
},
{
"sku": "SKU-FAST",
"date": "2026-11-09",
"units": 4
},
{
"sku": "SKU-FAST",
"date": "2026-11-10",
"units": 4
}
]
}Response exampleJSON
{
"checkedAt": "2026-11-04T19:00:00.000Z",
"status": "detected",
"slowDays": 5,
"slowUnits": 5,
"slowCount": 1,
"items": [
{
"sku": "SKU-SLOW",
"name": "SKU-SLOW",
"onHand": 100,
"onHandSupplied": true,
"unitsSold": 1,
"lookbackDays": 5,
"thresholdUnits": 5,
"slow": true,
"datedSaleCount": 1
},
{
"sku": "SKU-FAST",
"name": "SKU-FAST",
"onHand": 10,
"onHandSupplied": true,
"unitsSold": 20,
"lookbackDays": 5,
"thresholdUnits": 5,
"slow": false,
"datedSaleCount": 5
}
],
"assumptions": [
"serviceLevelZ=1.65 (explicit normal z factor for safety stock)",
"reviewDays=0",
"historyDays=90",
"forecastDays=30",
"excessDaysCover=90",
"slowUnits=5 over slowDays=5",
"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."
],
"purchaseOrderCreated": false,
"inventorySystemAccessed": false,
"leadTimeInvented": false,
"demandInvented": false,
"priceInvented": false,
"findings": [],
"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."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/inventory-intelligence/slow-moving-stock-detect" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"asOf": "2026-11-10",
"slowDays": 5,
"slowUnits": 5,
"products": [
{
"sku": "SKU-SLOW",
"onHand": 100
},
{
"sku": "SKU-FAST",
"onHand": 10
}
],
"sales": [
{
"sku": "SKU-SLOW",
"date": "2026-11-08",
"units": 1
},
{
"sku": "SKU-FAST",
"date": "2026-11-06",
"units": 4
},
{
"sku": "SKU-FAST",
"date": "2026-11-07",
"units": 4
},
{
"sku": "SKU-FAST",
"date": "2026-11-08",
"units": 4
},
{
"sku": "SKU-FAST",
"date": "2026-11-09",
"units": 4
},
{
"sku": "SKU-FAST",
"date": "2026-11-10",
"units": 4
}
]
}
JSONhttps://brainiac.software/api/v1/inventory-intelligence/demand-forecast$0.05 USDCForecast inventory demand
Forecast units as averageDailyDemand × forecastDays from available dated sales only. Seasonality is not modeled and uncertainty is disclosed.
Body
| Field | Required | Notes |
|---|---|---|
text | No | string |
json | No | string |
csv | No | string |
file | No | object; Object |
products | No | array; Array |
sales | No | array; Array |
suppliers | No | array; Array |
purchases | No | array; Array |
asOf | No | string |
serviceLevelZ | No | number |
reviewDays | No | number |
excessDaysCover | No | number |
slowUnits | No | number |
slowDays | No | number |
forecastDays | No | integer |
historyDays | No | integer |
Request exampleJSON
{
"asOf": "2026-11-10",
"historyDays": 5,
"forecastDays": 7,
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
}
]
}Response exampleJSON
{
"checkedAt": "2026-11-04T19:00:00.000Z",
"status": "forecasted",
"forecastDays": 7,
"historyDays": 5,
"items": [
{
"sku": "SKU-1",
"name": "SKU-1",
"method": "simple_daily_average",
"forecastDays": 7,
"historyDaysUsed": 5,
"averageDailyDemand": 10,
"demandStdev": 1.7889,
"demandSupplied": true,
"forecastUnits": 70,
"forecastUnitsSupplied": true,
"uncertainty": "high",
"seasonalityModeled": false,
"assumption": "forecastUnits = averageDailyDemand × forecastDays, using only sales dated on or before 2026-11-10."
}
],
"assumptions": [
"serviceLevelZ=1.65 (explicit normal z factor for safety stock)",
"reviewDays=0",
"historyDays=5",
"forecastDays=7",
"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.",
"Forecast method is a simple historical daily average. No external demand signal is used."
],
"purchaseOrderCreated": false,
"inventorySystemAccessed": false,
"leadTimeInvented": false,
"demandInvented": false,
"priceInvented": false,
"findings": [
{
"kind": "observation",
"code": "forecast_uncertainty",
"subject": "SKU-1",
"detail": "Forecast uses a simple average over 5 day(s). Seasonality is not modeled. Uncertainty=high."
}
],
"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."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/inventory-intelligence/demand-forecast" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"asOf": "2026-11-10",
"historyDays": 5,
"forecastDays": 7,
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
}
]
}
JSONhttps://brainiac.software/api/v1/inventory-intelligence/optimization-report$0.12 USDCReport inventory optimization
Combine stockout risk, reorder points, safety stock, excess, slow-moving stock, and demand forecasts from supplied data. No purchase order is created.
Body
| Field | Required | Notes |
|---|---|---|
text | No | string |
json | No | string |
csv | No | string |
file | No | object; Object |
products | No | array; Array |
sales | No | array; Array |
suppliers | No | array; Array |
purchases | No | array; Array |
asOf | No | string |
serviceLevelZ | No | number |
reviewDays | No | number |
excessDaysCover | No | number |
slowUnits | No | number |
slowDays | No | number |
forecastDays | No | integer |
historyDays | No | integer |
Request exampleJSON
{
"asOf": "2026-11-10",
"historyDays": 5,
"forecastDays": 7,
"serviceLevelZ": 1.65,
"reviewDays": 0,
"excessDaysCover": 30,
"slowDays": 5,
"slowUnits": 5,
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 20,
"onOrder": 0,
"unitCost": 2.5
},
{
"sku": "SKU-SLOW",
"name": "Shelfware",
"onHand": 200
}
],
"suppliers": [
{
"sku": "SKU-1",
"supplierId": "SUP-1",
"leadTimeDays": 4,
"moq": 20
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
},
{
"sku": "SKU-SLOW",
"date": "2026-11-09",
"units": 1
}
],
"purchases": [
{
"sku": "SKU-1",
"date": "2026-10-20",
"units": 50,
"unitPrice": 2.1
}
]
}Response exampleJSON
{
"checkedAt": "2026-11-04T19:00:00.000Z",
"status": "reported",
"skuCount": 2,
"atRiskCount": 1,
"excessCount": 1,
"slowCount": 1,
"assumptions": [
"serviceLevelZ=1.65 (explicit normal z factor for safety stock)",
"reviewDays=0",
"historyDays=5",
"forecastDays=7",
"excessDaysCover=30",
"slowUnits=5 over slowDays=5",
"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."
],
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 20,
"onHandSupplied": true,
"onOrder": 0,
"onOrderSupplied": true,
"unitCost": 2.5,
"unitCostSupplied": true,
"saleCount": 5,
"purchaseCount": 1,
"leadTimeDaysSupplied": true
},
{
"sku": "SKU-SLOW",
"name": "Shelfware",
"onHand": 200,
"onHandSupplied": true,
"onOrder": 0,
"onOrderSupplied": false,
"unitCost": 0,
"unitCostSupplied": false,
"saleCount": 1,
"purchaseCount": 0,
"leadTimeDaysSupplied": false
}
],
"stockout": [
{
"sku": "SKU-1",
"name": "Widget",
"available": 20,
"availableSupplied": true,
"reorderPoint": 45.9,
"reorderPointSupplied": true,
"belowReorderPoint": true,
"stockoutRiskCalculated": true,
"averageDailyDemand": 10,
"demandSupplied": true,
"leadTimeDays": 4,
"leadTimeDaysSupplied": true,
"daysCover": 2,
"daysCoverSupplied": true,
"riskLevel": "elevated"
},
{
"sku": "SKU-SLOW",
"name": "Shelfware",
"available": 200,
"availableSupplied": true,
"reorderPoint": 0,
"reorderPointSupplied": false,
"belowReorderPoint": false,
"stockoutRiskCalculated": false,
"averageDailyDemand": 0.5,
"demandSupplied": true,
"leadTimeDays": 0,
"leadTimeDaysSupplied": false,
"daysCover": 400,
"daysCoverSupplied": true,
"riskLevel": "not_calculated"
}
],
"reorder": [
{
"sku": "SKU-1",
"name": "Widget",
"averageDailyDemand": 10,
"demandStdev": 1.7889,
"demandSupplied": true,
"leadTimeDays": 4,
"leadTimeDaysSupplied": true,
"reviewDays": 0,
"serviceLevelZ": 1.65,
"safetyStock": 5.9,
"safetyStockSupplied": true,
"demandDuringLead": 40,
"demandDuringLeadSupplied": true,
"reorderPoint": 45.9,
"reorderPointSupplied": true,
"available": 20,
"availableSupplied": true,
"suggestedOrder": 25.9,
"suggestedOrderSupplied": true,
"moq": 20,
"moqSupplied": true,
"formula": "reorderPoint = averageDailyDemand × (leadTimeDays + reviewDays) + safetyStock",
"purchaseOrderCreated": false
},
{
"sku": "SKU-SLOW",
"name": "Shelfware",
"averageDailyDemand": 0.5,
"demandStdev": 0.5,
"demandSupplied": true,
"leadTimeDays": 0,
"leadTimeDaysSupplied": false,
"reviewDays": 0,
"serviceLevelZ": 1.65,
"safetyStock": 0,
"safetyStockSupplied": false,
"demandDuringLead": 0,
"demandDuringLeadSupplied": false,
"reorderPoint": 0,
"reorderPointSupplied": false,
"available": 200,
"availableSupplied": true,
"suggestedOrder": 0,
"suggestedOrderSupplied": false,
"moq": 0,
"moqSupplied": false,
"formula": "reorderPoint = averageDailyDemand × (leadTimeDays + reviewDays) + safetyStock",
"purchaseOrderCreated": false
}
],
"safety": [
{
"sku": "SKU-1",
"name": "Widget",
"serviceLevelZ": 1.65,
"demandStdev": 1.7889,
"demandSupplied": true,
"leadTimeDays": 4,
"leadTimeDaysSupplied": true,
"historyDaysUsed": 5,
"safetyStock": 5.9,
"safetyStockSupplied": true,
"formula": "safetyStock = serviceLevelZ × demandStdev × sqrt(leadTimeDays)",
"uncertainty": "high"
},
{
"sku": "SKU-SLOW",
"name": "Shelfware",
"serviceLevelZ": 1.65,
"demandStdev": 0.5,
"demandSupplied": true,
"leadTimeDays": 0,
"leadTimeDaysSupplied": false,
"historyDaysUsed": 2,
"safetyStock": 0,
"safetyStockSupplied": false,
"formula": "safetyStock = serviceLevelZ × demandStdev × sqrt(leadTimeDays)",
"uncertainty": "high"
}
],
"excess": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 20,
"averageDailyDemand": 10,
"demandSupplied": true,
"daysCover": 2,
"daysCoverSupplied": true,
"thresholdDays": 30,
"excess": false,
"excessUnits": 0,
"reason": "within_threshold"
},
{
"sku": "SKU-SLOW",
"name": "Shelfware",
"onHand": 200,
"averageDailyDemand": 0.5,
"demandSupplied": true,
"daysCover": 400,
"daysCoverSupplied": true,
"thresholdDays": 30,
"excess": true,
"excessUnits": 185,
"reason": "days_cover_over_threshold"
}
],
"slow": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 20,
"onHandSupplied": true,
"unitsSold": 50,
"lookbackDays": 5,
"thresholdUnits": 5,
"slow": false,
"datedSaleCount": 5
},
{
"sku": "SKU-SLOW",
"name": "Shelfware",
"onHand": 200,
"onHandSupplied": true,
"unitsSold": 1,
"lookbackDays": 5,
"thresholdUnits": 5,
"slow": true,
"datedSaleCount": 1
}
],
"forecast": [
{
"sku": "SKU-1",
"name": "Widget",
"method": "simple_daily_average",
"forecastDays": 7,
"historyDaysUsed": 5,
"averageDailyDemand": 10,
"demandStdev": 1.7889,
"demandSupplied": true,
"forecastUnits": 70,
"forecastUnitsSupplied": true,
"uncertainty": "high",
"seasonalityModeled": false,
"assumption": "forecastUnits = averageDailyDemand × forecastDays, using only sales dated on or before 2026-11-10."
},
{
"sku": "SKU-SLOW",
"name": "Shelfware",
"method": "simple_daily_average",
"forecastDays": 7,
"historyDaysUsed": 2,
"averageDailyDemand": 0.5,
"demandStdev": 0.5,
"demandSupplied": true,
"forecastUnits": 3.5,
"forecastUnitsSupplied": true,
"uncertainty": "high",
"seasonalityModeled": false,
"assumption": "forecastUnits = averageDailyDemand × forecastDays, using only sales dated on or before 2026-11-10."
}
],
"purchaseOrderCreated": false,
"inventorySystemAccessed": false,
"leadTimeInvented": false,
"demandInvented": false,
"priceInvented": false,
"findings": [
{
"kind": "missing",
"code": "lead_time",
"subject": "SKU-SLOW",
"detail": "No supplier lead time was supplied for this SKU. Lead time was not invented."
},
{
"kind": "observation",
"code": "history_short",
"subject": "SKU-1",
"detail": "Only 5 history day(s) were available. Safety stock uncertainty is high and seasonality is not modeled."
},
{
"kind": "observation",
"code": "forecast_uncertainty",
"subject": "SKU-1",
"detail": "Forecast uses a simple average over 5 day(s). Seasonality is not modeled. Uncertainty=high."
},
{
"kind": "observation",
"code": "forecast_uncertainty",
"subject": "SKU-SLOW",
"detail": "Forecast uses a simple average over 2 day(s). Seasonality is not modeled. Uncertainty=high."
}
],
"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."
]
}cURL
curl -i -X POST "https://brainiac.software/api/v1/inventory-intelligence/optimization-report" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"asOf": "2026-11-10",
"historyDays": 5,
"forecastDays": 7,
"serviceLevelZ": 1.65,
"reviewDays": 0,
"excessDaysCover": 30,
"slowDays": 5,
"slowUnits": 5,
"products": [
{
"sku": "SKU-1",
"name": "Widget",
"onHand": 20,
"onOrder": 0,
"unitCost": 2.5
},
{
"sku": "SKU-SLOW",
"name": "Shelfware",
"onHand": 200
}
],
"suppliers": [
{
"sku": "SKU-1",
"supplierId": "SUP-1",
"leadTimeDays": 4,
"moq": 20
}
],
"sales": [
{
"sku": "SKU-1",
"date": "2026-11-06",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-07",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-08",
"units": 8
},
{
"sku": "SKU-1",
"date": "2026-11-09",
"units": 12
},
{
"sku": "SKU-1",
"date": "2026-11-10",
"units": 10
},
{
"sku": "SKU-SLOW",
"date": "2026-11-09",
"units": 1
}
],
"purchases": [
{
"sku": "SKU-1",
"date": "2026-10-20",
"units": 50,
"unitPrice": 2.1
}
]
}
JSON