March 15, 2026
featureapi
Ensemble Forecasting
Automatically select and blend the best models for your data
Ensemble Forecasting
We are excited to introduce the new POST /v1/forecast/ensemble endpoint, which automatically selects and blends the best-performing models for your specific data.
How it works
When you submit a forecast request to the ensemble endpoint, TSFM.ai:
- Backtests your data against all available models using a configurable holdout window
- Scores each model using your preferred metric (SMAPE, MASE, or CRPS)
- Ranks models by performance and selects the top performers
- Blends their predictions using optimized weights to produce a single ensemble forecast
Request example
curl -X POST https://api.tsfm.ai/v1/forecast/ensemble \
-H "Authorization: Bearer $TSFM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": { "values": [1.2, 3.4, 5.6, ...], "freq": "h" },
"prediction_length": 24,
"scoring_metric": "smape",
"top_n": 5,
"max_models": 3
}'
Response
The response includes the ranked results with individual model scores, the computed weights for each model in the ensemble, and the final blended prediction.
Configuration
top_n— Number of models to evaluate during backtesting (default: 10)max_models— Maximum number of models to include in the final ensemble (default: 3)scoring_metric— One ofsmape,mase, orcrps(default:smape)budget— Maximum compute budget in seconds (default: 30)
Ensemble forecasting is available on all paid plans.