Get API key
POSTapi.oab-forecasting.com/v1/forecast

Run a Forecast

Run a forecast adaptively. The endpoint returns a completed forecast when capacity is available or HTTP 202 with a queued job; this reference UI follows the job until the result is ready.

View code & Try it

Request Schema

modelstringrequiredModel ID or supported alias. Toto checkpoints use toto-2 or toto-2-ft.
targetarray[number]requiredFinite values to forecast.
indexarray[string]requiredStrictly ascending ISO dates or datetimes matching target length.
hist_variablesobject<string, array[number]>optionalHistorical covariates; every array matches target length.
future_variablesobject<string, array[number]>optionalFuture covariates; every array matches horizon.
future_variables_indexarray[string]optionalFuture-covariate timestamps matching horizon.
static_variablesobjectoptionalScalar covariates for the series.
horizonintegerrequiredForecast steps, bounded by the selected model.
freqfrequencyrequired5min, 15min, 30min, H, D, W, M, MS, Q, or Y.
contextintegeroptionalHistory steps supplied to the model.
quantilesarray[number]optionalValues strictly between 0 and 1. Defaults to every decile from 0.1 through 0.9.
model_sizestringoptionalSize for a multi-size model. Both Toto-2 checkpoints use the fixed 2.5b size.
modelstringModel implementation selected for the override.
configobjectConfiguration values passed to the selected model.
seedintegeroptionalReproducibility seed; default 42.
allow_truncationbooleanoptionalAllow context-window trimming; default false.

Response Schema

statuscompletedrequired
modelstringrequired
predictionobject<string, array[number]>required
indexarray[string]required
warningsarray[ForecastWarning] | nullStable warnings such as context truncation.
job_idstringrequired
statusqueuedrequired
modelstringrequired
poll_urlstringrequiredSame-API URL used to poll the job.

Response Example

{
  "status": "completed",
  "model": "yug",
  "series": [
    [
      {
        "prediction": {
          "mean": [
            158.3,
            161.2
          ],
          "0.1": [
            142.1,
            143
          ],
          "0.2": [
            146.1,
            147.2
          ],
          "0.3": [
            150,
            151.3
          ],
          "0.4": [
            154,
            156
          ],
          "0.5": [
            158.3,
            161.2
          ],
          "0.6": [
            162.2,
            165
          ],
          "0.7": [
            166,
            169.7
          ],
          "0.8": [
            170.1,
            174.3
          ],
          "0.9": [
            174.5,
            179.4
          ]
        },
        "index": [
          "2024-01-06",
          "2024-01-07"
        ]
      }
    ]
  ]
}

Possible Errors

401UnauthorizedThe API key is missing, expired, revoked, or invalid.
413Context too largeA series exceeds the selected model context and truncation is disabled.
422Validation errorThe request or model configuration is invalid.
429Limit exceededA request-rate or forecast quota was exceeded.
503Dependency unavailableA quota, queue, storage, or inference dependency is temporarily unavailable.
409Async requiredSubmit this workload to POST /v1/forecast-jobs.
import requests

response = requests.post(
    "https://api.oab-forecasting.com/v1/forecast",
    headers={"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"},
    json={
  "model": "yug",
  "model_size": "base",
  "series": [
    {
      "target": [
        120.5,
        132.1,
        118.3,
        141,
        155.2
      ],
      "index": [
        "2024-01-01",
        "2024-01-02",
        "2024-01-03",
        "2024-01-04",
        "2024-01-05"
      ]
    }
  ],
  "horizon": 2,
  "freq": "D",
  "quantiles": [
    0.1,
    0.2,
    0.3,
    0.4,
    0.5,
    0.6,
    0.7,
    0.8,
    0.9
  ]
},
)
response.raise_for_status()
print(response.json())
POSTapi.oab-forecasting.com/v1/forecast

Run a Forecast

Run a forecast adaptively. The endpoint returns a completed forecast when capacity is available or HTTP 202 with a queued job; this reference UI follows the job until the result is ready.

View code & Try it

Request Schema

modelstringrequiredModel ID or supported alias. Toto checkpoints use toto-2 or toto-2-ft.
targetarray[number]requiredFinite values to forecast.
indexarray[string]requiredStrictly ascending ISO dates or datetimes matching target length.
hist_variablesobject<string, array[number]>optionalHistorical covariates; every array matches target length.
future_variablesobject<string, array[number]>optionalFuture covariates; every array matches horizon.
future_variables_indexarray[string]optionalFuture-covariate timestamps matching horizon.
static_variablesobjectoptionalScalar covariates for the series.
horizonintegerrequiredForecast steps, bounded by the selected model.
freqfrequencyrequired5min, 15min, 30min, H, D, W, M, MS, Q, or Y.
contextintegeroptionalHistory steps supplied to the model.
quantilesarray[number]optionalValues strictly between 0 and 1. Defaults to every decile from 0.1 through 0.9.
model_sizestringoptionalSize for a multi-size model. Both Toto-2 checkpoints use the fixed 2.5b size.
modelstringModel implementation selected for the override.
configobjectConfiguration values passed to the selected model.
seedintegeroptionalReproducibility seed; default 42.
allow_truncationbooleanoptionalAllow context-window trimming; default false.

Response Schema

statuscompletedrequired
modelstringrequired
predictionobject<string, array[number]>required
indexarray[string]required
warningsarray[ForecastWarning] | nullStable warnings such as context truncation.
job_idstringrequired
statusqueuedrequired
modelstringrequired
poll_urlstringrequiredSame-API URL used to poll the job.

Response Example

{
  "status": "completed",
  "model": "yug",
  "series": [
    [
      {
        "prediction": {
          "mean": [
            158.3,
            161.2
          ],
          "0.1": [
            142.1,
            143
          ],
          "0.2": [
            146.1,
            147.2
          ],
          "0.3": [
            150,
            151.3
          ],
          "0.4": [
            154,
            156
          ],
          "0.5": [
            158.3,
            161.2
          ],
          "0.6": [
            162.2,
            165
          ],
          "0.7": [
            166,
            169.7
          ],
          "0.8": [
            170.1,
            174.3
          ],
          "0.9": [
            174.5,
            179.4
          ]
        },
        "index": [
          "2024-01-06",
          "2024-01-07"
        ]
      }
    ]
  ]
}

Possible Errors

401UnauthorizedThe API key is missing, expired, revoked, or invalid.
413Context too largeA series exceeds the selected model context and truncation is disabled.
422Validation errorThe request or model configuration is invalid.
429Limit exceededA request-rate or forecast quota was exceeded.
503Dependency unavailableA quota, queue, storage, or inference dependency is temporarily unavailable.
409Async requiredSubmit this workload to POST /v1/forecast-jobs.