---
title: "Forecast a business metric"
method: POST
path: "/v1/forecast"
tags: ["Products"]
---

# Forecast a business metric

`POST /v1/forecast`

## Request

- Base URL: `https://api.algenta.ai`
- URL: `https://api.algenta.ai/v1/forecast`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Forecast any metric — revenue, demand, capacity — using historical data.

Combines time-series analysis with Monte Carlo uncertainty quantification. Returns point forecasts with confidence intervals for each period.

## Request body

- ForecastRequest: Forecast what will happen based on historical data and business drivers. Use cases: demand forecasting, revenue projection, capacity planning.
  - `metric` string, required: What you're forecasting, e.g. 'monthly_revenue'
  - `history` number[], required: Historical values (most recent last)
  - `horizon` integer: How many periods ahead to forecast
  - `seasonality` boolean: Account for seasonal patterns
  - `confidence_level` number: Confidence interval width

## Response `200`

Successful Response

- ForecastResponse
  - `forecast_id` string, required
  - `metric` string, required
  - `baseline` number, required: Most recent historical value
  - `forecast_mean` number, required: Expected value at end of horizon
  - `total_change_pct` number, required: Expected % change over horizon
  - `periods` ForecastPeriod[], required
    - `period` integer, required
    - `forecast` number, required
    - `lower_bound` number, required
    - `upper_bound` number, required
    - `trend` string, required
  - `scenarios_evaluated` integer, required
  - `latency_ms` number, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/codna/apis/algenta-api.md) · [All operations](https://skmtc.dev/codna/apis/algenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codna/apis/algenta-api/revisions/35d30f84a5df?raw)
