{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-create-advanced-prompt-optimization-job-request-schema.json",
  "title": "CreateAdvancedPromptOptimizationJobRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-advanced-prompt-optimization-jobs-api-openapi.yml#/components/schemas/CreateAdvancedPromptOptimizationJobRequest",
  "type": "object",
  "properties": {
    "jobName": {
      "type": "string",
      "description": "A name for the advanced prompt optimization job."
    },
    "jobDescription": {
      "type": "string",
      "description": "A description of the advanced prompt optimization job."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request but does not return an error."
    },
    "inputConfig": {
      "$ref": "#/$defs/AdvancedPromptOptimizationInputConfig"
    },
    "outputConfig": {
      "$ref": "#/$defs/AdvancedPromptOptimizationOutputConfig"
    },
    "encryptionKeyArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the KMS key used for encrypting the output data. If not specified, the output is encrypted with an Amazon-owned KMS key."
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Tags to associate with the advanced prompt optimization job."
    },
    "modelConfigurations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ModelConfiguration"
      },
      "description": "A list of model configurations specifying the target models for prompt optimization. You can specify up to 5 models."
    }
  },
  "required": [
    "jobName",
    "inputConfig",
    "outputConfig",
    "modelConfigurations"
  ],
  "$defs": {
    "AdvancedPromptOptimizationInputConfig": {
      "type": "object",
      "properties": {
        "s3Uri": {
          "type": "string",
          "description": "The S3 URI of the JSONL input file containing prompt templates and evaluation samples."
        }
      },
      "required": [
        "s3Uri"
      ]
    },
    "AdvancedPromptOptimizationOutputConfig": {
      "type": "object",
      "properties": {
        "s3Uri": {
          "type": "string",
          "description": "The S3 URI prefix where the optimization results will be written."
        }
      },
      "required": [
        "s3Uri"
      ]
    },
    "InferenceConfiguration": {
      "type": "object",
      "properties": {
        "maxTokens": {
          "type": "integer",
          "description": "The maximum number of tokens to allow in the generated response. The default value is the maximum allowed value for the model that you are using."
        },
        "temperature": {
          "type": "number",
          "description": "The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options."
        },
        "topP": {
          "type": "number",
          "description": "The percentage of most-likely candidates that the model considers for the next token. For example, if you choose a value of 0.8 for topP, the model selects from the top 80% of the probability distribution of tokens that could be next in the sequence."
        },
        "stopSequences": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response."
        }
      }
    },
    "ModelConfiguration": {
      "type": "object",
      "properties": {
        "modelId": {
          "type": "string",
          "description": "The model to use for optimization. The value depends on the resource that you use: If you use a base model, specify the model ID or its ARN. For a list of model IDs, see Models at a glance in the Amazon Bedrock User Guide. If you use a cross-Region (system-defined) inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see Supported Regions and models for inference profiles in the Amazon Bedrock User Guide. If you use an application inference profile, specify its full ARN, including the account ID and Region."
        },
        "inferenceConfig": {
          "$ref": "#/$defs/InferenceConfiguration"
        },
        "additionalModelRequestFields": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          },
          "description": "Additional model request fields. Use this to pass model-specific parameters that are not included in the standard inference configuration."
        }
      },
      "required": [
        "modelId"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "Key for the tag."
        },
        "value": {
          "type": "string",
          "description": "Value for the tag."
        }
      },
      "required": [
        "key",
        "value"
      ]
    }
  }
}