Amazon Bedrock Bedrock Prompt Routers API

The Bedrock Prompt Routers API from Amazon Bedrock — 2 operation(s) for bedrock prompt routers.

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 /prompt-routers Create a prompt router · Create Prompt Router #
Ask an LLM
“How do I route requests between several foundation models?”
“Can a prompt router fall back to a single model when routing criteria don't match?”
Tell an agent
Create prompt router {promptRouterName} routing to {models} with criteria {routingCriteria} and fallback {fallbackModel}.
Create prompt router {promptRouterName} with models {models}, criteria {routingCriteria}, fallback {fallbackModel} and description {description}.
GET /prompt-routers List prompt routers · List Prompt Routers #
Ask an LLM
“Which prompt routers have I created in Bedrock?”
“Can I list only the default prompt routers?”
Tell an agent
List my prompt routers.
List prompt routers of type {type}.
GET /prompt-routers/{promptRouterArn} Get a prompt router · Get Prompt Router #
Ask an LLM
“What models and routing criteria does a prompt router use?”
“Can I look up a prompt router by its ARN?”
Tell an agent
Get prompt router {promptRouterArn}.
Show the routing configuration of prompt router {promptRouterArn}.
DELETE /prompt-routers/{promptRouterArn} Delete a prompt router · Delete Prompt Router #
Ask an LLM
“How do I delete a prompt router I no longer use?”
“Is deleting a prompt router reversible?”
Tell an agent destructive · confirm first
Delete prompt router {promptRouterArn}.
Remove the prompt router {promptRouterArn} permanently.

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-prompt-routers-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-prompt-routers-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Bedrock Prompt Routers 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:
  /prompt-routers:
    post:
      operationId: CreatePromptRouter
      summary: Create Prompt Router
      description: Creates a prompt router that manages the routing of requests between multiple foundation models based on
        the routing criteria.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePromptRouterResponse'
        '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:
                clientRequestToken:
                  type: string
                  description: A unique, case-sensitive identifier that you provide to ensure idempotency of your requests.
                    If not specified, the Amazon Web Services SDK automatically generates one for you.
                promptRouterName:
                  type: string
                  description: The name of the prompt router. The name must be unique within your Amazon Web Services account
                    in the current region.
                models:
                  type: array
                  items:
                    $ref: '#/components/schemas/PromptRouterTargetModel'
                  description: A list of foundation models that the prompt router can route requests to. At least one model
                    must be specified.
                description:
                  type: string
                  description: An optional description of the prompt router to help identify its purpose.
                routingCriteria:
                  $ref: '#/components/schemas/RoutingCriteria'
                fallbackModel:
                  $ref: '#/components/schemas/PromptRouterTargetModel'
                tags:
                  type: array
                  items:
                    $ref: '#/components/schemas/Tag'
                  description: An array of key-value pairs to apply to this resource as tags. You can use tags to categorize
                    and manage your Amazon Web Services resources.
              required:
              - promptRouterName
              - models
              - routingCriteria
              - fallbackModel
      tags:
      - Prompt Routers
    get:
      operationId: ListPromptRouters
      summary: List Prompt Routers
      description: Retrieves a list of prompt routers.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPromptRoutersResponse'
        '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 prompt routers to return in one page of results.
      - name: nextToken
        in: query
        schema:
          type: string
        description: Specify the pagination token from a previous request to retrieve the next page of results.
      - name: type
        in: query
        schema:
          type: string
          enum:
          - custom
          - default
        description: The type of the prompt routers, such as whether it's default or custom.
      tags:
      - Prompt Routers
  /prompt-routers/{promptRouterArn}:
    get:
      operationId: GetPromptRouter
      summary: Get Prompt Router
      description: Retrieves details about a prompt router.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPromptRouterResponse'
        '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: promptRouterArn
        in: path
        required: true
        schema:
          type: string
        description: The prompt router's ARN
      tags:
      - Prompt Routers
    delete:
      operationId: DeletePromptRouter
      summary: Delete Prompt Router
      description: Deletes a specified prompt router. This action cannot be undone.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletePromptRouterResponse'
        '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: promptRouterArn
        in: path
        required: true
        schema:
          type: string
        description: The Amazon Resource Name (ARN) of the prompt router to delete.
      tags:
      - Prompt Routers
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
    ConflictException:
      type: object
      properties:
        message:
          type: string
    CreatePromptRouterResponse:
      type: object
      properties:
        promptRouterArn:
          type: string
          description: The Amazon Resource Name (ARN) that uniquely identifies the prompt router.
    DeletePromptRouterResponse:
      type: object
      properties: {}
    GetPromptRouterResponse:
      type: object
      properties:
        promptRouterName:
          type: string
          description: The router's name.
        routingCriteria:
          $ref: '#/components/schemas/RoutingCriteria'
        description:
          type: string
          description: The router's description.
        createdAt:
          type: string
          format: date-time
          description: When the router was created.
        updatedAt:
          type: string
          format: date-time
          description: When the router was updated.
        promptRouterArn:
          type: string
          description: The prompt router's ARN
        models:
          type: array
          items:
            $ref: '#/components/schemas/PromptRouterTargetModel'
          description: The router's models.
        fallbackModel:
          $ref: '#/components/schemas/PromptRouterTargetModel'
        status:
          type: string
          enum:
          - AVAILABLE
          description: The router's status.
        type:
          type: string
          enum:
          - custom
          - default
          description: The router's type.
      required:
      - promptRouterName
      - routingCriteria
      - promptRouterArn
      - models
      - fallbackModel
      - status
      - type
    InternalServerException:
      type: object
      properties:
        message:
          type: string
    ListPromptRoutersResponse:
      type: object
      properties:
        promptRouterSummaries:
          type: array
          items:
            $ref: '#/components/schemas/PromptRouterSummary'
          description: A list of prompt router summaries.
        nextToken:
          type: string
          description: Specify the pagination token from a previous request to retrieve the next page of results.
    PromptRouterSummary:
      type: object
      properties:
        promptRouterName:
          type: string
          description: The router's name.
        routingCriteria:
          $ref: '#/components/schemas/RoutingCriteria'
        description:
          type: string
          description: The router's description.
        createdAt:
          type: string
          format: date-time
          description: When the router was created.
        updatedAt:
          type: string
          format: date-time
          description: When the router was updated.
        promptRouterArn:
          type: string
          description: The router's ARN.
        models:
          type: array
          items:
            $ref: '#/components/schemas/PromptRouterTargetModel'
          description: The router's models.
        fallbackModel:
          $ref: '#/components/schemas/PromptRouterTargetModel'
        status:
          type: string
          enum:
          - AVAILABLE
          description: The router's status.
        type:
          type: string
          enum:
          - custom
          - default
          description: The summary's type.
      required:
      - promptRouterName
      - routingCriteria
      - promptRouterArn
      - models
      - fallbackModel
      - status
      - type
    PromptRouterTargetModel:
      type: object
      properties:
        modelArn:
          type: string
          description: The target model's ARN.
      required:
      - modelArn
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
    RoutingCriteria:
      type: object
      properties:
        responseQualityDifference:
          type: number
          description: The criteria's response quality difference.
      required:
      - responseQualityDifference
    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)