Forecasting
Forecasting APIby Birla AI Labs
GETapi.oab-forecasting.com/forecast-jobs/{job_id}

Retrieve Forecast Results

Retrieve the status and result of a previously submitted forecast job. Returns status: "in_progress" while running, "completed" when done, or "failed" on error. Poll every 2–5 s until status is not "in_progress".

Path Parameters

job_idstringrequired

The job ID returned by POST /forecast-jobs.

Response Schema

job_idstring
statusstring (enum)
modelstring
resultobject | null
statusstring (enum)
modelstring
seriesarray[array[object]]
[i][j]object
predictionobject
meanarray[number]
"0.1"array[number]
"0.5"array[number]
"0.9"array[number]
indexarray[string]
metricsobject | null
errorstring | null

Response Example

{
  "status": "completed",
  "model": "moirai-2",
  "series": [
    [
      {
        "prediction": {
          "0.1": [
            118
          ],
          "0.5": [
            122.3
          ],
          "0.9": [
            126.6
          ],
          "mean": [
            122.3
          ]
        },
        "index": [
          "2023-04-01"
        ]
      }
    ]
  ]
}

Possible Errors

401UnauthorizedMissing or invalid Authorization header
403ForbiddenJob belongs to a different API key
404Not FoundJob ID does not exist
GET
import requests, time

job_id  = "job_4f8a1c2d3e5b6a7f"
headers = {"Authorization": "Bearer YOUR_API_KEY"}

while True:
    resp = requests.get(f"https://api.oab-forecasting.com/forecast-jobs/{job_id}", headers=headers)
    data = resp.json()
    if data["status"] in ("completed", "failed"):
        break
    time.sleep(2)

print(data)
GETapi.oab-forecasting.com/forecast-jobs/{job_id}

Retrieve Forecast Results

Retrieve the status and result of a previously submitted forecast job. Returns status: "in_progress" while running, "completed" when done, or "failed" on error. Poll every 2–5 s until status is not "in_progress".

Path Parameters

job_idstringrequired

The job ID returned by POST /forecast-jobs.

Response Schema

job_idstring
statusstring (enum)
modelstring
resultobject | null
statusstring (enum)
modelstring
seriesarray[array[object]]
[i][j]object
predictionobject
meanarray[number]
"0.1"array[number]
"0.5"array[number]
"0.9"array[number]
indexarray[string]
metricsobject | null
errorstring | null

Response Example

{
  "status": "completed",
  "model": "moirai-2",
  "series": [
    [
      {
        "prediction": {
          "0.1": [
            118
          ],
          "0.5": [
            122.3
          ],
          "0.9": [
            126.6
          ],
          "mean": [
            122.3
          ]
        },
        "index": [
          "2023-04-01"
        ]
      }
    ]
  ]
}

Possible Errors

401UnauthorizedMissing or invalid Authorization header
403ForbiddenJob belongs to a different API key
404Not FoundJob ID does not exist