CoolFace
Modelpublic

Eymdeyy/tsfa-forecasting-api

sourceHugging Facemitupdated 4mo agoView on Hugging Face
3likes
Model Card

TSFA — Time Series Forecasting API

Predict future values with calibrated confidence intervals via a simple REST API.

TSFA handles the full forecasting pipeline: automatic preprocessing, model selection, uncertainty quantification, and diagnostics — no ML expertise required.

Available on RapidAPI

🚀 [Try the API on RapidAPI](https://rapidapi.com/dorianmrt/api/tsfa)

Free tier available. No credit card required to start.

Quick Start

python
import requests

resp = requests.post(
    "https://tsfa.p.rapidapi.com/v1/forecast/univariate",
    headers={
        "X-RapidAPI-Key": "YOUR_KEY",
        "X-RapidAPI-Host": "tsfa.p.rapidapi.com",
    },
    json={
        "series": [120, 132, 128, 145, 139, 152, 148, 160, 155, 168],
        "horizon": 7,
        "model": "auto",
    },
)
print(resp.json()["forecast"]["mean"])
# [171.2, 174.5, 177.8, 181.0, 184.3, 187.6, 190.8]

Use Cases

Retail demand forecast — 14-day ahead with 80% and 95% confidence intervals Retail demand forecast — 14-day ahead with 80% and 95% confidence intervals

EUR/USD exchange rate forecast — 30-day ahead with 95% probability band EUR/USD exchange rate forecast — 30-day ahead with 95% probability band

Energy consumption forecast — 48h ahead (ETT-h1 real data) Energy consumption forecast — 48h ahead (ETT-h1 real data)

Models

ModelCreditsBest For
auto1Automatic selection — recommended
arima1Stationary series, interpretable
chronos1Pre-trained transformer (zero-shot)
lstm2Long sequences, complex patterns

Benchmarks

Evaluated via sliding-window backtesting (5 windows) on public datasets.

DatasetModelHorizonMAERMSEMAPEsMAPE
ett_h1arima242.45242.940510.12%10.74%
ett_h1naive242.45242.940510.12%10.74%
ett_h1seasonal_naive241.92632.28378.25%8.74%
exchange_ratearima300.00850.01001.13%1.13%
exchange_ratenaive300.00850.01001.13%1.13%
exchange_rateseasonal_naive300.01030.01171.37%1.37%
m5_samplearima149.042710.56177.63%7.43%
m5_samplenaive1414.354116.705411.45%11.74%
m5_sampleseasonal_naive145.03726.20194.24%4.18%

Datasets: ETT-h1 (electricity transformer temperature), Exchange Rate (8 currencies), M5 (retail sales). All results are out-of-sample.

Endpoints

MethodPathDescription
POST/v1/forecast/univariateForecast a single series
POST/v1/forecast/batchForecast 50–500 series in parallel
POST/v1/validateBacktest with sliding-window cross-validation
GET/v1/modelsList available models
GET/v1/usageCheck credit consumption
GET/healthAPI health status

Plans

PlanMonthly CreditsRate LimitPrice
Free50010 req/min$0
Basic10,00030 req/min$49
Pro50,000100 req/min$199
Ultra200,000300 req/min$499

License

MIT — see GitHub