> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnifuel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Train a Forecaster Model

> Initiates a Forecaster training job with the specified dataset and model configuration parameters.



## OpenAPI

````yaml openapi-forecaster POST /forecaster
openapi: 3.0.1
info:
  title: Omnifuel Forecasting
  description: The forecasting API
  version: 1.0.0
servers:
  - url: https://api.omnifuel.ai/v1
security:
  - api_key: []
    bearerAuth: []
paths:
  /forecaster:
    post:
      summary: Start a Forecaster training job
      description: >-
        Initiates a Forecaster training job with the specified dataset and model
        configuration parameters.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                dataset_format:
                  type: string
                  enum:
                    - csv
                    - parquet
                  default: csv
                dataset:
                  type: string
                  format: url
                  description: URL of the dataset to be used for training
                  default: >-
                    https://docs.google.com/spreadsheets/d/e/2PACX-1vQlWg_weIflYDrxnlAVx7pEaQHL2fgCuqjwswG0XdZGkakIFdCoBGgzH7JOy7qyPNFxs5T7YB4pjwPT/pub?output=csv
                time_column:
                  type: string
                  default: time
                target_columns:
                  type: array
                  items:
                    type: string
                  default:
                    - target
                past_covariates:
                  type: array
                  items:
                    type: string
                  default: []
                future_covariates:
                  type: array
                  items:
                    type: string
                  default: []
                static_covariates:
                  type: array
                  items:
                    type: string
                  default: []
                group_columns:
                  type: array
                  items:
                    type: string
                  default:
                    - group
                holidays:
                  type: array
                  items:
                    type: string
                  default: []
                datetime_attributes:
                  type: array
                  items:
                    type: string
                  default: []
                lags:
                  oneOf:
                    - type: number
                      minimum: 1
                    - type: array
                      items:
                        type: number
                  default: 30
                lags_past_covariates:
                  oneOf:
                    - type: number
                      minimum: 1
                    - type: array
                      items:
                        type: number
                  default: 7
                lags_future_covariates:
                  type: array
                  items:
                    type: number
                    minimum: 1
                num_leaves:
                  type: number
                  default: 50
                learning_rate:
                  type: number
                  default: 0.05
                num_iterations:
                  type: number
                  default: 200
                test_size:
                  type: number
                  default: 0.2
                test_sample_over:
                  type: string
                  enum:
                    - time
                    - groups
                  default: time
                min_data_in_leaf:
                  type: number
                  default: 20
                max_depth:
                  type: number
                  default: -1
                max_bin:
                  type: number
                  default: 255
                output_chunk_length:
                  type: number
                  default: 1
              required:
                - dataset
      responses:
        '200':
          description: Training job started successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  id:
                    type: string
                example:
                  message: Training job started successfully
                  id: abc1234-5678-9101-1121-314151617181
        '500':
          description: Error starting the training job
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  error:
                    type: boolean
                example:
                  message: Error starting training job
                  error: true
components:
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````