Skip to main content
POST
/
forecaster
Start a Forecaster training job
curl --request POST \
  --url https://api.omnifuel.ai/v1/forecaster \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "dataset_format": "csv",
  "dataset": "https://docs.google.com/spreadsheets/d/e/2PACX-1vQlWg_weIflYDrxnlAVx7pEaQHL2fgCuqjwswG0XdZGkakIFdCoBGgzH7JOy7qyPNFxs5T7YB4pjwPT/pub?output=csv",
  "time_column": "time",
  "target_columns": [
    "target"
  ],
  "past_covariates": [],
  "future_covariates": [],
  "static_covariates": [],
  "group_columns": [
    "group"
  ],
  "holidays": [],
  "datetime_attributes": [],
  "lags": 2,
  "lags_past_covariates": 2,
  "lags_future_covariates": [
    2
  ],
  "num_leaves": 50,
  "learning_rate": 0.05,
  "num_iterations": 200,
  "test_size": 0.2,
  "test_sample_over": "time",
  "min_data_in_leaf": 20,
  "max_depth": -1,
  "max_bin": 255,
  "output_chunk_length": 1
}'
{
  "message": "Training job started successfully",
  "id": "abc1234-5678-9101-1121-314151617181"
}

Authorizations

x-api-key
string
header
required
Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
dataset
string<url>
default:https://docs.google.com/spreadsheets/d/e/2PACX-1vQlWg_weIflYDrxnlAVx7pEaQHL2fgCuqjwswG0XdZGkakIFdCoBGgzH7JOy7qyPNFxs5T7YB4pjwPT/pub?output=csv
required

URL of the dataset to be used for training

dataset_format
enum<string>
default:csv
Available options:
csv,
parquet
time_column
string
default:time
target_columns
string[]
past_covariates
string[]
future_covariates
string[]
static_covariates
string[]
group_columns
string[]
holidays
string[]
datetime_attributes
string[]
lags
default:30
Required range: x >= 1
lags_past_covariates
default:7
Required range: x >= 1
lags_future_covariates
number[]
num_leaves
number
default:50
learning_rate
number
default:0.05
num_iterations
number
default:200
test_size
number
default:0.2
test_sample_over
enum<string>
default:time
Available options:
time,
groups
min_data_in_leaf
number
default:20
max_depth
number
default:-1
max_bin
number
default:255
output_chunk_length
number
default:1

Response

Training job started successfully

message
string
id
string
I