Skip to main content
POST
/
v2
/
historic_forecast
Foundational Time Series Model Multi Series Historic
curl --request POST \
  --url https://api.nixtla.io/v2/historic_forecast \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "series": {
    "sizes": [
      35
    ],
    "y": [
      0,
      1,
      2,
      3,
      4,
      5,
      6,
      0,
      1,
      2,
      3,
      4,
      5,
      6,
      0,
      1,
      2,
      3,
      4,
      5,
      6,
      0,
      1,
      2,
      3,
      4,
      5,
      6,
      0,
      1,
      2,
      10,
      4,
      5,
      6
    ]
  },
  "freq": "D"
}'
{
  "input_tokens": 1,
  "output_tokens": 1,
  "finetune_tokens": 1,
  "mean": [
    123
  ],
  "sizes": [
    123
  ],
  "intervals": {},
  "weights_x": [
    123
  ],
  "feature_contributions": [
    [
      123
    ]
  ]
}

Authorizations

Authorization
string
header
required

HTTPBearer

Body

application/json
series
object
required
freq
string
required

The frequency of the data represented as a string. 'D' for daily, 'M' for monthly, 'H' for hourly, and 'W' for weekly frequencies are available.

model
any

Model to use as a string. Common options are (but not restricted to) timegpt-1 and timegpt-1-long-horizon. Full options vary by different users. Contact ops@nixtla.io for more information. We recommend using timegpt-1-long-horizon for forecasting if you want to predict more than one seasonal period given the frequency of your data.

clean_ex_first
boolean
default:true

A boolean flag that indicates whether the API should preprocess (clean) the exogenous signal before applying the large time model. If True, the exogenous signal is cleaned; if False, the exogenous variables are applied after the large time model.

finetuned_model_id
string | null

ID of previously finetuned model

level
Level · array

A list of values representing the prediction intervals. Each value is a percentage that indicates the level of certainty for the corresponding prediction interval. For example, [80, 90] defines 80% and 90% prediction intervals.

Minimum length: 1
feature_contributions
boolean
default:false

Compute the exogenous features contributions to the forecast.

Response

Successful Response

input_tokens
integer
required
Required range: x >= 0
output_tokens
integer
required
Required range: x >= 0
finetune_tokens
integer
required
Required range: x >= 0
mean
number[]
required
sizes
integer[]
required
intervals
object | null
weights_x
number[] | null
feature_contributions
number[][] | null
I