POST
/
forecast
Request Time Series Forecast
curl --request POST \
  --url https://api.nolano.ai/forecast \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "series": [
    {
      "timestamps": [
        "2023-01-01T00:00:00",
        "2023-01-02T00:00:00",
        "2023-01-03T00:00:00"
      ],
      "values": [
        100.5,
        102.3,
        98.7
      ]
    }
  ],
  "forecast_horizon": 12,
  "data_frequency": "Daily",
  "forecast_frequency": "Daily",
  "confidence": 0.95
}'
{
  "forecast_timestamps": [
    "2024-01-01T00:00:00",
    "2024-01-02T00:00:00"
  ],
  "lower_bound": [
    145.2,
    146.8
  ],
  "median": [
    150,
    151.5
  ],
  "upper_bound": [
    154.8,
    156.2
  ]
}
Generate predictions for your time series data using state-of-the-art foundation models. This endpoint supports univariate forecasting with multiple model options optimized for different use cases.
Processing Time: Forecasts typically complete in 2-10 seconds depending on data size and model complexity.

Available Models

Choose the best model for your forecasting needs. Each model is optimized for specific use cases and data characteristics:
Model IDDescriptionBest For
forecast-model-1General-purpose foundation model (TOTO)Most time series patterns
forecast-model-2Trend-focused modelData with strong trends
forecast-model-3Seasonal modelSeasonal patterns
forecast-model-4Volatility modelHigh-variance data
For detailed model information and performance characteristics, see our Supported Models page.

Example Requests

curl --location 'https://api.nolano.ai/forecast' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ak_your_api_key_here' \
--header 'X-Model-Id: forecast-model-1' \
--data '{
  "series": [
    {
      "timestamps": [
        "2023-01-01T00:00:00",
        "2023-01-02T00:00:00",
        "2023-01-03T00:00:00",
        "2023-01-04T00:00:00",
        "2023-01-05T00:00:00"
      ],
      "values": [100, 102, 98, 105, 103]
    }
  ],
  "forecast_horizon": 7,
  "data_frequency": "Daily",
  "forecast_frequency": "Daily",
  "confidence": 0.95
}'

Response Format

The API returns forecast data with prediction intervals:
Example Response
{
  "forecast_timestamps": [
    "2024-01-01T00:00:00",
    "2024-01-02T00:00:00", 
    "2024-01-03T00:00:00"
  ],
  "lower_bound": [145.2, 146.8, 148.1],
  "median": [150.0, 151.5, 153.2],
  "upper_bound": [154.8, 156.2, 158.3]
}

Data Requirements

  • Minimum data points: 10 historical observations
  • Maximum forecast horizon: 100 periods
  • Supported frequencies: Seconds, Minutes, Hours, Daily, Weekly, Monthly, Quarterly, Yearly
  • Data format: Chronologically ordered timestamps with corresponding numerical values

Error Handling

The API returns structured error responses with specific error codes:
  • UNAUTHORIZED - Invalid or missing API key
  • INVALID_REQUEST - Validation failed for request parameters
  • DATA_VALIDATION_ERROR - Issues with time series data format
  • RATE_LIMIT_EXCEEDED - API rate limit exceeded
  • INTERNAL_ERROR - Unexpected server error
Always check the HTTP status code and parse the error object for detailed information about failures.

Authorizations

Authorization
string
header
required

API key authentication. Include your API key with 'Bearer' prefix.

Headers

X-Model-Id
enum<string>
default:forecast-model-1

Model ID to use for forecasting

Available options:
forecast-model-1,
forecast-model-2,
forecast-model-3,
forecast-model-4

Body

application/json

Response

200
application/json

Forecast generated successfully

The response is of type object.