Forecasting
Forecasting APIby Birla AI Labs

Forecasting API · Public

API Reference

REST API for time-series forecasting. Send a series, get predictions back.

Base URL

api.oab-forecasting.com

Authentication

Bearer <key>→ Generate key

Versioning

v1 · v1.0.0→ Changelog

Available Models

IDNameSizesCov.
chronosAmazon Chronostiny · small · base · largeNo
chronos-2Amazon Chronos-2small · baseYes
timesfmGoogle TimesFM200mNo
timesfm-2Google TimesFM 2.5200mNo
moirai-2Salesforce Moirai-2smallYes
tabpfn-tsTabPFN-TSdefaultYes

Run a Forecast

Make your first forecast call in seconds. Works in terminal, Jupyter, and Google Colab.

Expected input formatyour df  →  API payload

DataFrame (df)

datevalue (float)
2024-01-01120.0
2024-02-01126.0
2024-03-01133.0
2024-04-01129.0
......

DatetimeIndex · one row per timestep · sorted ascending

POST /forecast  ·  series[0]

{
"index": ["2024-01-01", "2024-02-01", ...]
"target": [120.0, 126.0, ...]
}
"horizon": 6·"freq": "MS"

index & target — same length · extracted via df.index.strftime("%Y-%m-%d").tolist()

ScriptrequestsPython 3.8+·Notebookmatplotlibpandas
import os, requests
from getpass import getpass

# ── Setup
API_KEY  = os.environ.get("API_KEY") or getpass("Enter your API key: ")
BASE_URL = "https://api.oab-forecasting.com"

# ── Model selection
MODEL      = "chronos-2"   # chronos | chronos-2 | timesfm | timesfm-2 | moirai-2 | tabpfn-ts
MODEL_SIZE = "base"        # chronos: tiny|small|base|large  · chronos-2: small|base

# ── Input data
index  = ["2024-01-01","2024-02-01","2024-03-01","2024-04-01",
          "2024-05-01","2024-06-01","2024-07-01","2024-08-01",
          "2024-09-01","2024-10-01","2024-11-01","2024-12-01"]
target = [120.0, 126.0, 133.0, 129.0, 138.0, 145.0,
          141.0, 149.0, 152.0, 148.0, 155.0, 162.0]

# ── Covariates (optional — supported by chronos-2, moirai-2, tabpfn-ts)
horizon = 6
hist_variables = {
    "temperature": [20.0, 21.0, 22.0, 23.0, 24.0, 25.0,
                    26.0, 27.0, 26.0, 24.0, 22.0, 20.0],
    "promotion":   [0.0, 1.0, 0.0, 1.0, 0.0, 1.0,
                    0.0, 1.0, 0.0, 1.0, 0.0, 1.0],
}
future_variables = {
    "temperature": [19.0, 20.0, 21.0, 22.0, 23.0, 24.0],
    "promotion":   [1.0, 0.0, 1.0, 0.0, 1.0, 0.0],
}
future_variables_index = [
    "2025-01-01","2025-02-01","2025-03-01",
    "2025-04-01","2025-05-01","2025-06-01",
]

# ── API request
payload = {
    "series": [{
        "index":                  index,
        "target":                 target,
        "hist_variables":         hist_variables,
        "future_variables":       future_variables,
        "future_variables_index": future_variables_index,
    }],
    "horizon":    horizon,
    "freq":       "MS",               # MS | D | W | H | Q | Y
    "quantiles":  [0.1, 0.5, 0.9],
    "model":      MODEL,
    "model_size": MODEL_SIZE,
}

resp = requests.post(
    f"{BASE_URL}/forecast",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json=payload,
    timeout=60,
)
resp.raise_for_status()

result = resp.json()
print(f"Model: {result['model']}  |  Status: {result['status']}\n")

pred = result["series"][0][0]["prediction"]
idx  = result["series"][0][0]["index"]

print("Forecast:")
for i, date in enumerate(idx):
    print(f"{date}  p50={pred['0.5'][i]:6.2f}  [{pred['0.1'][i]:6.2f}–{pred['0.9'][i]:6.2f}]")
Get a key from API Keys. Set API_KEY as an env var to skip the prompt, or just paste it when asked.
POST
import requests

resp = requests.post(
    "https://api.oab-forecasting.com/forecast",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "series": [
            {"index": ["2023-01-01","2023-02-01","2023-03-01","2023-04-01","2023-05-01"],
             "target": [120.5, 122.3, 119.8, 124.1, 126.7]}
        ],
        "model": "chronos-2",
        "model_size": "base",
        "horizon": 6,
        "freq": "MS",
        "quantiles": [0.1, 0.5, 0.9],
    },
)
print(resp.json())

Forecasting API · Public

API Reference

REST API for time-series forecasting. Send a series, get predictions back.

Base URL

api.oab-forecasting.com

Authentication

Bearer <key>→ Generate key

Versioning

v1 · v1.0.0→ Changelog

Available Models

IDNameSizesCov.
chronosAmazon Chronostiny · small · base · largeNo
chronos-2Amazon Chronos-2small · baseYes
timesfmGoogle TimesFM200mNo
timesfm-2Google TimesFM 2.5200mNo
moirai-2Salesforce Moirai-2smallYes
tabpfn-tsTabPFN-TSdefaultYes

Run a Forecast

Make your first forecast call in seconds. Works in terminal, Jupyter, and Google Colab.

Expected input formatyour df  →  API payload

DataFrame (df)

datevalue (float)
2024-01-01120.0
2024-02-01126.0
2024-03-01133.0
2024-04-01129.0
......

DatetimeIndex · one row per timestep · sorted ascending

POST /forecast  ·  series[0]

{
"index": ["2024-01-01", "2024-02-01", ...]
"target": [120.0, 126.0, ...]
}
"horizon": 6·"freq": "MS"

index & target — same length · extracted via df.index.strftime("%Y-%m-%d").tolist()

ScriptrequestsPython 3.8+·Notebookmatplotlibpandas
import os, requests
from getpass import getpass

# ── Setup
API_KEY  = os.environ.get("API_KEY") or getpass("Enter your API key: ")
BASE_URL = "https://api.oab-forecasting.com"

# ── Model selection
MODEL      = "chronos-2"   # chronos | chronos-2 | timesfm | timesfm-2 | moirai-2 | tabpfn-ts
MODEL_SIZE = "base"        # chronos: tiny|small|base|large  · chronos-2: small|base

# ── Input data
index  = ["2024-01-01","2024-02-01","2024-03-01","2024-04-01",
          "2024-05-01","2024-06-01","2024-07-01","2024-08-01",
          "2024-09-01","2024-10-01","2024-11-01","2024-12-01"]
target = [120.0, 126.0, 133.0, 129.0, 138.0, 145.0,
          141.0, 149.0, 152.0, 148.0, 155.0, 162.0]

# ── Covariates (optional — supported by chronos-2, moirai-2, tabpfn-ts)
horizon = 6
hist_variables = {
    "temperature": [20.0, 21.0, 22.0, 23.0, 24.0, 25.0,
                    26.0, 27.0, 26.0, 24.0, 22.0, 20.0],
    "promotion":   [0.0, 1.0, 0.0, 1.0, 0.0, 1.0,
                    0.0, 1.0, 0.0, 1.0, 0.0, 1.0],
}
future_variables = {
    "temperature": [19.0, 20.0, 21.0, 22.0, 23.0, 24.0],
    "promotion":   [1.0, 0.0, 1.0, 0.0, 1.0, 0.0],
}
future_variables_index = [
    "2025-01-01","2025-02-01","2025-03-01",
    "2025-04-01","2025-05-01","2025-06-01",
]

# ── API request
payload = {
    "series": [{
        "index":                  index,
        "target":                 target,
        "hist_variables":         hist_variables,
        "future_variables":       future_variables,
        "future_variables_index": future_variables_index,
    }],
    "horizon":    horizon,
    "freq":       "MS",               # MS | D | W | H | Q | Y
    "quantiles":  [0.1, 0.5, 0.9],
    "model":      MODEL,
    "model_size": MODEL_SIZE,
}

resp = requests.post(
    f"{BASE_URL}/forecast",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json=payload,
    timeout=60,
)
resp.raise_for_status()

result = resp.json()
print(f"Model: {result['model']}  |  Status: {result['status']}\n")

pred = result["series"][0][0]["prediction"]
idx  = result["series"][0][0]["index"]

print("Forecast:")
for i, date in enumerate(idx):
    print(f"{date}  p50={pred['0.5'][i]:6.2f}  [{pred['0.1'][i]:6.2f}–{pred['0.9'][i]:6.2f}]")
Get a key from API Keys. Set API_KEY as an env var to skip the prompt, or just paste it when asked.