{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-forecast/json-schema/amazon-forecast-create-auto-predictor-request-schema.json",
  "title": "CreateAutoPredictorRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-forecast-operations-api-openapi.yml#/components/schemas/CreateAutoPredictorRequest",
  "type": "object",
  "properties": {
    "PredictorName": {
      "type": "string",
      "description": "A unique name for the predictor"
    },
    "ForecastHorizon": {
      "type": "integer",
      "description": "The number of time-steps that the model predicts. The forecast horizon is also called the prediction length. The maximum forecast horizon is the lesser of 500 time-steps or 1/4 of the TARGET_TIME_SERIES dataset length. If you are retraining an existing AutoPredictor, then the maximum forecast horizon is the lesser of 500 time-steps or 1/3 of the TARGET_TIME_SERIES dataset length. If you are upgrading to an AutoPredictor or retraining an existing AutoPredictor, you cannot update the forecast horizon parameter. You can meet this requirement by providing longer time-series in the dataset."
    },
    "ForecastTypes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The forecast types used to train a predictor. You can specify up to five forecast types. Forecast types can be quantiles from 0.01 to 0.99, by increments of 0.01 or higher. You can also specify the mean forecast with mean."
    },
    "ForecastDimensions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "An array of dimension (field) names that specify how to group the generated forecast. For example, if you are generating forecasts for item sales across all your stores, and your dataset contains a store_id field, you would specify store_id as a dimension to group sales forecasts for each store."
    },
    "ForecastFrequency": {
      "type": "string",
      "description": "The frequency of predictions in a forecast. Valid intervals are an integer followed by Y (Year), M (Month), W (Week), D (Day), H (Hour), and min (Minute). For example, \"1D\" indicates every day and \"15min\" indicates every 15 minutes. You cannot specify a value that would overlap with the next larger frequency. That means, for example, you cannot specify a frequency of 60 minutes, because that is equivalent to 1 hour. The valid values for each frequency are the following: Minute - 1-59 Hour - 1-23 Day - 1-6 Week - 1-4 Month - 1-11 Year - 1 Thus, if you want every other week forecasts, specify \"2"
    },
    "DataConfig": {
      "$ref": "#/$defs/DataConfig"
    },
    "EncryptionConfig": {
      "$ref": "#/$defs/EncryptionConfig"
    },
    "ReferencePredictorArn": {
      "type": "string",
      "description": "The ARN of the predictor to retrain or upgrade. This parameter is only used when retraining or upgrading a predictor. When creating a new predictor, do not specify a value for this parameter. When upgrading or retraining a predictor, only specify values for the ReferencePredictorArn and PredictorName. The value for PredictorName must be a unique predictor name."
    },
    "OptimizationMetric": {
      "type": "string",
      "enum": [
        "WAPE",
        "RMSE",
        "AverageWeightedQuantileLoss",
        "MASE",
        "MAPE"
      ],
      "description": "The accuracy metric used to optimize the predictor."
    },
    "ExplainPredictor": {
      "type": "boolean",
      "description": "Create an Explainability resource for the predictor."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Optional metadata to help you categorize and organize your predictors. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive. The following restrictions apply to tags: For each resource, each tag key must be unique and each tag key must have one value. Maximum number of tags per resource: 50. Maximum key length: 128 Unicode characters in UTF-8. Maximum value length: 256 Unicode characters in UTF-8. Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across o"
    },
    "MonitorConfig": {
      "$ref": "#/$defs/MonitorConfig"
    },
    "TimeAlignmentBoundary": {
      "$ref": "#/$defs/TimeAlignmentBoundary"
    }
  },
  "required": [
    "PredictorName"
  ],
  "$defs": {
    "AdditionalDataset": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the additional dataset. Valid names: \"holiday\" and \"weather\"."
        },
        "Configuration": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": "Weather Index To enable the Weather Index, do not specify a value for Configuration. Holidays Holidays To enable Holidays, set CountryCode to one of the following two-letter country codes: \"AL\" - ALBANIA \"AR\" - ARGENTINA \"AT\" - AUSTRIA \"AU\" - AUSTRALIA \"BA\" - BOSNIA HERZEGOVINA \"BE\" - BELGIUM \"BG\" - BULGARIA \"BO\" - BOLIVIA \"BR\" - BRAZIL \"BY\" - BELARUS \"CA\" - CANADA \"CL\" - CHILE \"CO\" - COLOMBIA \"CR\" - COSTA RICA \"HR\" - CROATIA \"CZ\" - CZECH REPUBLIC \"DK\" - DENMARK \"EC\" - ECUADOR \"EE\" - ESTONIA \"ET\" - ETHIOPIA \"FI\" - FINLAND \"FR\" - FRANCE \"DE\" - GERMANY \"GR\" - GREECE \"HU\" - HUNGARY \"IS\" - ICELAND"
        }
      },
      "required": [
        "Name"
      ]
    },
    "AttributeConfig": {
      "type": "object",
      "properties": {
        "AttributeName": {
          "type": "string",
          "description": "The name of the attribute as specified in the schema. Amazon Forecast supports the target field of the target time series and the related time series datasets. For example, for the RETAIL domain, the target is demand."
        },
        "Transformations": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The method parameters (key-value pairs), which are a map of override parameters. Specify these parameters to override the default values. Related Time Series attributes do not accept aggregation parameters. The following list shows the parameters and their valid values for the \"filling\" featurization method for a Target Time Series dataset. Default values are bolded. aggregation: sum, avg, first, min, max frontfill: none middlefill: zero, nan (not a number), value, median, mean, min, max backfill: zero, nan, value, median, mean, min, max The following list shows the parameters and their valid "
        }
      },
      "required": [
        "AttributeName",
        "Transformations"
      ]
    },
    "DataConfig": {
      "type": "object",
      "properties": {
        "DatasetGroupArn": {
          "type": "string",
          "description": "The ARN of the dataset group used to train the predictor."
        },
        "AttributeConfigs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttributeConfig"
          },
          "description": "Aggregation and filling options for attributes in your dataset group."
        },
        "AdditionalDatasets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AdditionalDataset"
          },
          "description": "Additional built-in datasets like Holidays and the Weather Index."
        }
      },
      "required": [
        "DatasetGroupArn"
      ]
    },
    "EncryptionConfig": {
      "type": "object",
      "properties": {
        "RoleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that Amazon Forecast can assume to access the KMS key. Passing a role across Amazon Web Services accounts is not allowed. If you pass a role that isn't in your account, you get an InvalidInputException error."
        },
        "KMSKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the KMS key."
        }
      },
      "required": [
        "RoleArn",
        "KMSKeyArn"
      ]
    },
    "MonitorConfig": {
      "type": "object",
      "properties": {
        "MonitorName": {
          "type": "string",
          "description": "The name of the monitor resource."
        }
      },
      "required": [
        "MonitorName"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values."
        },
        "Value": {
          "type": "string",
          "description": "The optional part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key)."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    },
    "TimeAlignmentBoundary": {
      "type": "object",
      "properties": {
        "Month": {
          "type": "string",
          "enum": [
            "JANUARY",
            "FEBRUARY",
            "MARCH",
            "APRIL",
            "MAY",
            "JUNE",
            "JULY",
            "AUGUST",
            "SEPTEMBER",
            "OCTOBER",
            "NOVEMBER",
            "DECEMBER"
          ],
          "description": "The month to use for time alignment during aggregation. The month must be in uppercase."
        },
        "DayOfMonth": {
          "type": "integer",
          "description": "The day of the month to use for time alignment during aggregation."
        },
        "DayOfWeek": {
          "type": "string",
          "enum": [
            "MONDAY",
            "TUESDAY",
            "WEDNESDAY",
            "THURSDAY",
            "FRIDAY",
            "SATURDAY",
            "SUNDAY"
          ],
          "description": "The day of week to use for time alignment during aggregation. The day must be in uppercase."
        },
        "Hour": {
          "type": "integer",
          "description": "The hour of day to use for time alignment during aggregation."
        }
      }
    }
  }
}