The Forecasting API is now v1. API v0 is deprecated and stops working on 20 December 2026. Move to v1
The Forecasting Company Logo

Forecast any time series.

Forecasting APIPython · REST

Forecast from your code

Call t0-gamma, our latest model, or any open-source model we host.

Python
import os import requests response = requests.post( "https://api.retrocast.com/v1/forecast?model=t0-gamma", headers={"Authorization": f"Bearer {os.environ['TFC_API_KEY']}"}, json={ "input": { "source": {"inline": { "date": ["2024-01-01", "2024-01-02", "2024-01-03", "2024-01-04"], "sales": [125, 120, 140, 135], }}, "columns": { "date": {"kind": "time", "frequency": "1d"}, "sales": {"kind": "target", "aggregate": "sum"}, }, }, "prediction_length": 3, "quantiles": [0.1, 0.5, 0.9], }, ) response.raise_for_status() print(response.json()["data"]["targets"]["sales"]["quantiles"]["0.5"])
RetrocastNo code

Forecast in your browser

Upload your data, compare models on your own history and forecast.