{"uid":"cap_r-Np5myLpfyumeBHissth","slug":"brainiac-safety-stock-calculator-09d531f7","name":"BRAINIAC Safety Stock Calculator","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/inventory-intelligence/safety-stock-calculate?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":{"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":{"type":"number","maximum":1000000000,"minimum":0},"sku":{"type":"string","maxLength":80},"supplierId":{"type":"string","maxLength":80},"leadTimeDays":{"type":"number","maximum":3650,"minimum":0}},"additionalProperties":false},"maxItems":200},"reviewDays":{"type":"number","maximum":365,"minimum":0},"historyDays":{"type":"integer","maximum":3650,"minimum":1},"forecastDays":{"type":"integer","maximum":365,"minimum":1},"serviceLevelZ":{"type":"number","maximum":5,"minimum":0},"excessDaysCover":{"type":"number","maximum":3650,"minimum":1}}},"responseSchema":{"type":"json","example":{"items":[{"sku":"SKU-1","name":"SKU-1","formula":"safetyStock = serviceLevelZ × demandStdev × sqrt(leadTimeDays)","demandStdev":1.7889,"safetyStock":5.9,"uncertainty":"high","leadTimeDays":4,"serviceLevelZ":1.65,"demandSupplied":true,"historyDaysUsed":5,"safetyStockSupplied":true,"leadTimeDaysSupplied":true}],"status":"calculated","findings":[{"code":"history_short","kind":"observation","detail":"Only 5 history day(s) were available. Safety stock uncertainty is high and seasonality is not modeled.","subject":"SKU-1"}],"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."],"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,"serviceLevelZ":1.65,"demandInvented":false,"leadTimeInvented":false,"purchaseOrderCreated":false,"inventorySystemAccessed":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_cqnzdvlIpNbRHf45Zybdc","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":"Calculates safety stock levels and reorder points for SKUs using historical sales, supplier lead times, and a configurable service-level z-factor","exampleAgentPrompt":"Using our last 90 days of daily sales data and a 7-day supplier lead time, calculate safety stock and reorder points for all our SKUs at a 95% service level (z=1.65), and flag any items where we currently have less than the recommended safety stock on hand.","exampleUseCases":[{"title":"E-commerce reorder point planning","prompt":"I have sales data for 50 SKUs over the past 180 days and my suppliers have lead times between 5 and 14 days. Can you calculate the safety stock and reorder points for each SKU at a 95% service level so I know when to place purchase orders?"},{"title":"New product buffer stock estimate","prompt":"We just launched a new product SKU-NEW-001 and only have 30 days of sales history — 2 to 5 units sold per day. Our supplier lead time is 10 days. What safety stock should we hold, and how uncertain is that estimate given our short history?"},{"title":"Slow-moving inventory identification","prompt":"For our full catalog, calculate safety stock using the past 90 days of sales. Flag any SKUs that sell fewer than 5 units over any 90-day window as slow-movers and tell me the reorder point for each one so we don't over-stock slow items."}],"resultDescription":"Returns a per-SKU breakdown including calculated safety stock quantity, reorder point, demand standard deviation, lead time days used, service level z-factor, the exact formula applied, uncertainty rating, and whether key inputs were supplied vs. inferred. Also returns a list of findings (e.g. short history warnings), all modeling assumptions, and explicit confirmations that no purchase orders were created and no inventory system was accessed.","failureModes":["Insufficient sales history leads to high uncertainty flag rather than refusal — results returned with caveat","Missing supplier lead time data causes the endpoint to omit or flag affected SKUs","SKU count exceeding 200 products or 2000 sales records returns a validation error","Malformed date strings in sales or purchase arrays cause parsing errors","Missing required SKU identifiers result in items being skipped or grouped incorrectly"],"whenToPreferThis":"Choose this endpoint when you need a statistically grounded safety stock calculation using real historical sales data and supplier lead times, without integrating with an ERP or inventory system. It is ideal for AI agents automating inventory planning tasks, e-commerce operations tools, or procurement workflows where you want an auditable formula-based result (not a black-box ML forecast) with explicit assumptions and uncertainty flags. At $0.05 per call with no account required, it suits pay-per-use agent pipelines on Base via x402.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T18:39:31.242Z","isFirstParty":false,"canonicalSlug":"brainiac-safety-stock-calculator-09d531f7"}