Amazon Bedrock Bedrock Advanced Prompt Optimization Jobs API

The Bedrock Advanced Prompt Optimization Jobs API from Amazon Bedrock — 2 operation(s) for bedrock advanced prompt optimization jobs.

GitHub OpenAPI

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /advanced-prompt-optimization-job/batch-delete Delete several advanced prompt optimization jobs · Batch Delete Advanced Prompt Optimization Job #
Ask an LLM
“How do I delete a batch of advanced prompt optimization jobs at once?”
“Can I remove several prompt optimization jobs by their ARNs?”
Tell an agent destructive · confirm first
Delete advanced prompt optimization jobs {jobIdentifiers}.
Remove the prompt optimization jobs {jobIdentifiers} in one batch.
POST /advanced-prompt-optimization-jobs Optimize prompt templates for a model · Create Advanced Prompt Optimization Job #
Ask an LLM
“How do I optimize prompt templates for a model using my evaluation data?”
“Can I encrypt the output of a prompt optimization job with a KMS key?”
Tell an agent
Create prompt optimization job {jobName} targeting models {modelConfigurations} with input {inputConfig} and output {outputConfig}.
Start prompt optimization job {jobName} for {modelConfigurations} using {inputConfig} and outputting to {outputConfig}, encrypted with {encryptionKeyArn}.
GET /advanced-prompt-optimization-jobs List advanced prompt optimization jobs · List Advanced Prompt Optimization Jobs #
Ask an LLM
“Which advanced prompt optimization jobs have I run?”
“Can I sort my prompt optimization jobs by creation date?”
Tell an agent
List my advanced prompt optimization jobs.
List prompt optimization jobs sorted by {sortBy} in {sortOrder} order.
GET /advanced-prompt-optimization-jobs/{jobIdentifier} Get an advanced prompt optimization job · Get Advanced Prompt Optimization Job #
Ask an LLM
“What is the status of one advanced prompt optimization job?”
“Can I look up a prompt optimization job by its ID?”
Tell an agent
Show advanced prompt optimization job {jobIdentifier}.
Get the status of prompt optimization job {jobIdentifier}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-bedrock:amazon-bedrock-advanced-prompt-optimization-jobs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-bedrock-advanced-prompt-optimization-jobs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Bedrock Advanced Prompt Optimization Jobs API
  version: '2023-04-20'
  description: Generated from AWS's published Smithy model for Amazon Bedrock. 4 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://bedrock.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /advanced-prompt-optimization-job/batch-delete:
    post:
      operationId: BatchDeleteAdvancedPromptOptimizationJob
      summary: Batch Delete Advanced Prompt Optimization Job
      description: Deletes one or more advanced prompt optimization jobs.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchDeleteAdvancedPromptOptimizationJobResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                jobIdentifiers:
                  type: array
                  items:
                    type: string
                  description: A list of advanced prompt optimization job identifiers (ARNs or IDs) to delete.
              required:
              - jobIdentifiers
      tags:
      - Advanced Prompt Optimization Jobs
  /advanced-prompt-optimization-jobs:
    post:
      operationId: CreateAdvancedPromptOptimizationJob
      summary: Create Advanced Prompt Optimization Job
      description: Creates an advanced prompt optimization job. The job optimizes your prompt templates for specific models
        using your evaluation dataset and criteria.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAdvancedPromptOptimizationJobResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '400':
          description: ConflictException; ServiceQuotaExceededException; TooManyTagsException; ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      requestBody:
        content:
          application/json:
            schema:
              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: '#/components/schemas/AdvancedPromptOptimizationInputConfig'
                outputConfig:
                  $ref: '#/components/schemas/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: '#/components/schemas/Tag'
                  description: Tags to associate with the advanced prompt optimization job.
                modelConfigurations:
                  type: array
                  items:
                    $ref: '#/components/schemas/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
      tags:
      - Advanced Prompt Optimization Jobs
    get:
      operationId: ListAdvancedPromptOptimizationJobs
      summary: List Advanced Prompt Optimization Jobs
      description: Lists the advanced prompt optimization jobs in your account.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAdvancedPromptOptimizationJobsResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      parameters:
      - name: maxResults
        in: query
        schema:
          type: integer
        description: The maximum number of results to return in the response.
      - name: nextToken
        in: query
        schema:
          type: string
        description: If the total number of results is greater than the maxResults value provided in the request, use this
          token in a subsequent request to get the next set of results.
      - name: sortBy
        in: query
        schema:
          type: string
          enum:
          - CreationTime
        description: The field to sort the results by.
      - name: sortOrder
        in: query
        schema:
          type: string
          enum:
          - Ascending
          - Descending
        description: The sort order for the results.
      tags:
      - Advanced Prompt Optimization Jobs
  /advanced-prompt-optimization-jobs/{jobIdentifier}:
    get:
      operationId: GetAdvancedPromptOptimizationJob
      summary: Get Advanced Prompt Optimization Job
      description: Gets information about an advanced prompt optimization job.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAdvancedPromptOptimizationJobResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      parameters:
      - name: jobIdentifier
        in: path
        required: true
        schema:
          type: string
        description: The ARN or ID of the advanced prompt optimization job.
      tags:
      - Advanced Prompt Optimization Jobs
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: bedrock
  schemas:
    AccessDeniedException:
      type: object
      properties:
        message:
          type: string
    AdvancedPromptOptimizationInputConfig:
      type: object
      properties:
        s3Uri:
          type: string
          description: The S3 URI of the JSONL input file containing prompt templates and evaluation samples.
      required:
      - s3Uri
    AdvancedPromptOptimizationJobSummary:
      type: object
      properties:
        jobArn:
          type: string
          description: The Amazon Resource Name (ARN) of the job.
        jobName:
          type: string
          description: The name of the job.
        jobStatus:
          type: string
          enum:
          - InProgress
          - Completed
          - Failed
          - PartiallyCompleted
          - Stopping
          - Stopped
          - Deleting
          description: The status of the job.
        creationTime:
          type: string
          format: date-time
          description: The time at which the job was created.
        lastModifiedTime:
          type: string
          format: date-time
          description: The time at which the job was last modified.
      required:
      - jobArn
      - jobName
      - jobStatus
      - creationTime
    AdvancedPromptOptimizationOutputConfig:
      type: object
      properties:
        s3Uri:
          type: string
          description: The S3 URI prefix where the optimization results will be written.
      required:
      - s3Uri
    BatchDeleteAdvancedPromptOptimizationJobError:
      type: object
      properties:
        jobIdentifier:
          type: string
          description: The identifier of the job that could not be deleted.
        code:
          type: string
          description: The error code for the deletion failure.
        message:
          type: string
          description: A message describing the error.
      required:
      - jobIdentifier
      - code
    BatchDeleteAdvancedPromptOptimizationJobItem:
      type: object
      properties:
        jobIdentifier:
          type: string
          description: The identifier of the deleted job.
        jobStatus:
          type: string
          enum:
          - InProgress
          - Completed
          - Failed
          - PartiallyCompleted
          - Stopping
          - Stopped
          - Deleting
          description: The status of the deleted job.
      required:
      - jobIdentifier
      - jobStatus
    BatchDeleteAdvancedPromptOptimizationJobResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/BatchDeleteAdvancedPromptOptimizationJobError'
          description: A list of errors encountered during batch deletion.
        advancedPromptOptimizationJobs:
          type: array
          items:
            $ref: '#/components/schemas/BatchDeleteAdvancedPromptOptimizationJobItem'
          description: A list of successfully deleted advanced prompt optimization jobs.
      required:
      - errors
      - advancedPromptOptimizationJobs
    ConflictException:
      type: object
      properties:
        message:
          type: string
    CreateAdvancedPromptOptimizationJobResponse:
      type: object
      properties:
        jobArn:
          type: string
          description: The Amazon Resource Name (ARN) of the created advanced prompt optimization job.
      required:
      - jobArn
    GetAdvancedPromptOptimizationJobResponse:
      type: object
      properties:
        jobArn:
          type: string
          description: The Amazon Resource Name (ARN) of the advanced prompt optimization job.
        jobName:
          type: string
          description: The name of the advanced prompt optimization job.
        jobDescription:
          type: string
          description: The description of the advanced prompt optimization job.
        jobStatus:
          type: string
          enum:
          - InProgress
          - Completed
          - Failed
          - PartiallyCompleted
          - Stopping
          - Stopped
          - Deleting
          description: The status of the advanced prompt optimization job.
        inputConfig:
          $ref: '#/components/schemas/AdvancedPromptOptimizationInputConfig'
        outputConfig:
          $ref: '#/components/schemas/AdvancedPromptOptimizationOutputConfig'
        encryptionKeyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the KMS key used to encrypt the output data.
        creationTime:
          type: string
          format: date-time
          description: The time at which the advanced prompt optimization job was created.
        lastModifiedTime:
          type: string
          format: date-time
          description: The time at which the advanced prompt optimization job was last modified.
        failureMessage:
          type: string
          description: If the job failed, a message describing the reason for the failure.
        modelConfigurations:
          type: array
          items:
            $ref: '#/components/schemas/ModelConfiguration'
          description: The model configurations used in the optimization job.
      required:
      - jobArn
      - jobName
      - jobStatus
      - inputConfig
      - outputConfig
      - creationTime
      - modelConfigurations
    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.
    InternalServerException:
      type: object
      properties:
        message:
          type: string
    ListAdvancedPromptOptimizationJobsResponse:
      type: object
      properties:
        jobSummaries:
          type: array
          items:
            $ref: '#/components/schemas/AdvancedPromptOptimizationJobSummary'
          description: A list of advanced prompt optimization job summaries.
        nextToken:
          type: string
          description: If the total number of results is greater than the maxResults value provided in the request, use this
            token in a subsequent request to get the next set of results.
    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: '#/components/schemas/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
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
    Tag:
      type: object
      properties:
        key:
          type: string
          description: Key for the tag.
        value:
          type: string
          description: Value for the tag.
      required:
      - key
      - value
    ThrottlingException:
      type: object
      properties:
        message:
          type: string
    ValidationException:
      type: object
      properties:
        message:
          type: string
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/bedrock/service/2023-04-20/bedrock-2023-04-20.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)