Welcome to our new API docs on docs.retrocast.com 🧑‍🚀✨!
The Forecasting Company Logo
The Forecasting Company API

Documentation

Endpoint:https://api.retrocast.com

Model inference

POST
https://api.retrocast.com
/forecast

Perform inference with foundation models.

Model inferencequery Parameters

  • modelstring · enum · required

    The forecasting model to use for inference. Note that only tabpfn-ts, moirai and moirai-moe support exogenous variables.

    Enum values:
    moirai
    chronos
    chronos-bolt
    timesfm
    timesfm-2
    moirai-moe
    moirai-2
    tabpfn-ts
    Default: tabpfn-ts
  • cloudstring · enum

    Specify the cloud provider to use for inference. If none is set then any may be used depending on availability.

    Enum values:
    gcp
    aws
    oci

Model inferenceHeaders

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Model inferenceRequest Body

  • seriesobject[] · required
    Example: {"0":{"future_variables":{"local_attendance_forecast":[125,75,200,122,123,150,100,120,121,119]},"future_variables_index":["2001-01-06","2001-01-07","2001-01-08","2001-01-09","2001-01-10","2001-01-11","2001-01-12","2001-01-13","2001-01-14","2001-01-15"],"hist_variables":{"temperature":[74,72,79,77,75]},"index":["2001-01-06","2001-01-07","2001-01-08","2001-01-09","2001-01-10"],"static_variables":{"Population":100000},"target":[125,120,140,135,133]}}
  • horizoninteger · min: 1 · max: 1000 · required

    Number of steps to forecast given the frequency.

    Example: 5
  • freqstring · enum · required

    Frequency of the time series.

    Enum values:
    5min
    15min
    30min
    H
    D
    W
    M
    Q
    Example: D
  • context

    The amount of history to use when forecasting. This is the number of steps to look back in the target series. More history can improve the forecast accuracy, but can also increase the computation time. By default this is set to the max of model capability or the length of the provided target series, whichever is shorter.

    Example: 20
    Default: null
  • quantiles
    Default: [0.1,0.9,0.4,0.5]
  • covariates

    Apply additional co-variates provided by TFC. Only supported by the following models: Navi, Moirai, Moriai-MoE and TabPFN-TS.

    Example: {"0":{"config":{"country":"US"},"type":"holidays"}}
    Default: null

Model inferenceResponses

Success

  • series
    Default: null
  • status
    Default: completed

Submit job for retrocasting

POST
https://api.retrocast.com
/retrocast-jobs

Perform historic inference for a range of forecast creation dates (fcds). These jobs can run longer and need to be retrieved with a separate endpoint and the returned job ID.

Submit job for retrocastingquery Parameters

  • modelstring · enum · required

    The forecasting model to use for inference. Note that only tabpfn-ts, moirai, and moirai-moe support exogenous variables.

    Enum values:
    tabpfn-ts
    moirai
    chronos
    chronos-bolt
    timesfm
    timesfm-2
    time-moe
    aarima
    Default: tabpfn-ts

Submit job for retrocastingHeaders

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Submit job for retrocastingRequest Body

  • seriesobject[] · required
    Example: {"0":{"future_variables":{"local_attendance_forecast":[125,75,200,122,123,150,100,120,121,119]},"future_variables_index":["2001-01-06","2001-01-07","2001-01-08","2001-01-09","2001-01-10","2001-01-11","2001-01-12","2001-01-13","2001-01-14","2001-01-15"],"hist_variables":{"temperature":[74,72,79,77,75]},"index":["2001-01-06","2001-01-07","2001-01-08","2001-01-09","2001-01-10"],"static_variables":{"Population":100000},"target":[125,120,140,135,133]}}
  • horizoninteger · min: 1 · max: 1000 · required

    Number of steps to forecast given the frequency.

    Example: 5
  • freqstring · enum · required

    Frequency of the time series.

    Enum values:
    5min
    15min
    30min
    H
    D
    W
    M
    Q
    Example: D
  • context

    The amount of history to use when forecasting. This is the number of steps to look back in the target series. More history can improve the forecast accuracy, but can also increase the computation time. By default this is set to the max of model capability or the length of the provided target series, whichever is shorter.

    Example: 20
    Default: null
  • quantiles
    Default: [0.1,0.9,0.4,0.5]
  • covariates

    Apply additional co-variates provided by TFC. Only supported by the following models: Navi, Moirai, Moriai-MoE and TabPFN-TS.

    Example: {"0":{"config":{"country":"US"},"type":"holidays"}}
    Default: null

Submit job for retrocastingResponses

Job submitted successfully

  • call_idstring

    The unique identifier of the submitted job


Retrieve job result

GET
https://api.retrocast.com
/retrocast-jobs/{job_id}

Retrieve the forecast result from a retrocast job.

Retrieve job resultpath Parameters

  • job_idstring · required

Retrieve job resultHeaders

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Retrieve job resultResponses

Success

  • series
    Default: null
  • status
    Default: completed

OpenAPI spec

GET
https://api.retrocast.com
/openapi

Return the OpenAPI spec for the TFC API.

OpenAPI specResponses

Rate Limiting Response

  • typestring · required

    A URI reference that identifies the problem.

  • titlestring · required

    A short, human-readable summary of the problem.

  • statusnumber · required

    The HTTP status code.

  • instancestring

Warmup model

GET
https://api.retrocast.com
/warmup

Warmup a model endpoint for better UX in embedded applications.

Warmup modelquery Parameters

  • modelstring · enum · required

    The forecasting model to warmup.

    Enum values:
    moirai
    chronos
    chronos-bolt
    timesfm
    timesfm-2
    moirai-moe
    moirai-2
    tabpfn-ts
    Default: tabpfn-ts
  • cloudstring · enum

    Specify the cloud provider to use. If none is set then any may be used depending on availability.

    Enum values:
    gcp
    aws
    oci

Warmup modelHeaders

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

Warmup modelResponses

Rate Limiting Response

  • typestring · required

    A URI reference that identifies the problem.

  • titlestring · required

    A short, human-readable summary of the problem.

  • statusnumber · required

    The HTTP status code.

  • instancestring