Forecasting

Forecasting

Generate AI-powered demand and revenue forecasts from your historical data.

Request a Forecast

curl -X POST http://localhost:8000/v1/forecast \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_id": "uuid",
    "metric": "daily_revenue",
    "horizon_days": 30,
    "context": "Include upcoming holiday season impact"
  }'

Response

{
  "job_id": "uuid",
  "status": "pending"
}

Forecast Result

Once complete, the job returns chart-ready forecast data:

{
  "forecast": {
    "metric": "daily_revenue",
    "unit": "USD",
    "series": [
      { "date": "2026-04-11", "predicted": 142500, "lower": 131000, "upper": 154000 },
      { "date": "2026-04-12", "predicted": 138200, "lower": 126500, "upper": 149900 }
    ],
    "confidence": 0.85,
    "method": "AI-assisted trend extrapolation",
    "chart": {
      "type": "line",
      "x_axis": "date",
      "y_axis": "predicted",
      "bands": ["lower", "upper"]
    }
  }
}

Supported Metrics

Any numeric column can be forecasted. Common examples:

  • daily_revenue — total sales per day
  • units_sold — product demand
  • inventory_level — stock depletion rate
  • customer_count — foot traffic or signups