---
title: "POST /advanced-prompt-optimization-jobs"
method: POST
path: "/advanced-prompt-optimization-jobs"
---

# POST /advanced-prompt-optimization-jobs

`POST /advanced-prompt-optimization-jobs`

Creates an advanced prompt optimization job. The job optimizes your prompt templates for specific models using your evaluation dataset and criteria.

## Request body

- object
  - `jobName` string, required — The name of an advanced prompt optimization job.
  - `jobDescription` string — The description of an advanced prompt optimization job.
  - `clientToken` string — 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` object, required — Contains the input data configuration for an advanced prompt optimization job.
    - `s3Uri` string — The S3 URI of the JSONL input file containing prompt templates and evaluation samples.
  - `outputConfig` object, required — Contains the output data configuration for an advanced prompt optimization job.
    - `s3Uri` string — The S3 URI prefix where the optimization results will be written.
  - `encryptionKeyArn` string — 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` Tag[] — Tags to associate with the advanced prompt optimization job.
    - `key` string, required — Key for the tag.
    - `value` string, required — Value for the tag.
  - `modelConfigurations` ModelConfiguration[], required — A list of model configurations for advanced prompt optimization.
    - `modelId` string, required — The ID of the model to use for optimization.
    - `inferenceConfig` object — The inference configuration for the model, including parameters such as maximum tokens, temperature, and top-p.
      - `maxTokens` integer — 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` number, float — 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` number, float — 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 <code>topP</code>, the model selects from the top 80% of the probability distribution of tokens that could be next in the sequence.
      - `stopSequences` InferenceConfigurationStopSequencesListMemberString[] — A list of stop sequences. A stop sequence is a sequence of characters that causes the model to stop generating the response.
    - `additionalModelRequestFields` object — Additional model request fields. Use this to pass model-specific parameters that are not included in the standard inference configuration.

## Response `200`

Success

- CreateAdvancedPromptOptimizationJobResponse — Create Advanced Prompt Optimization Job Response
  - `jobArn` string, required — The Amazon Resource Name (ARN) of the created advanced prompt optimization job.

## Other responses

- `480` — ResourceNotFoundException
- `481` — AccessDeniedException
- `482` — ValidationException
- `483` — ConflictException
- `484` — InternalServerException
- `485` — TooManyTagsException
- `486` — ServiceQuotaExceededException
- `487` — ThrottlingException

---

[API](https://skmtc.net/aws/apis/bedrock.md) · [All operations](https://skmtc.net/aws/apis/bedrock/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock/versions/3bc874e43ecd/schema)
