Amazon Bedrock Bedrock Invocations API

The Bedrock Invocations API from Amazon Bedrock — 3 operation(s) for bedrock invocations.

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

PUT /sessions/{sessionIdentifier}/invocations/ Start a new invocation in a session · Create Invocation #
Ask an LLM
“How do I start a new conversation invocation inside a session?”
“Can I give a session invocation a description?”
Tell an agent
Create a new invocation in session {session}.
Start an invocation {invocation} in session {session} described as {description}.
POST /sessions/{sessionIdentifier}/invocations/ List invocations in a session · List Invocations #
Ask an LLM
“Which invocations are stored in a session?”
“Can I page through a session's invocations?”
Tell an agent
List invocations in session {session}.
Show the first {max} invocations of session {session}.
GET /runtimes/{agentRuntimeArn}/invocations/.well-known/agent-card.json Get an agent's A2A agent card · Get Agent Card #
Ask an LLM
“What does the agent card look like for an AgentCore Runtime agent?”
“Can I fetch an agent card for a specific alias?”
Tell an agent
Get the agent card for runtime {runtime}.
Fetch the agent card of {runtime} using alias {qualifier}.
POST /runtimes/{agentRuntimeArn}/invocations Invoke an agent or tool in a runtime · Invoke Agent Runtime #
Ask an LLM
“How do I send a request to an agent hosted in an AgentCore Runtime?”
“Can I invoke an agent by its agent ID instead of its full ARN?”
Tell an agent
Invoke runtime {runtime}.
Invoke agent {runtime} in account {account} using qualifier {qualifier}.

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-invocations-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-invocations-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Bedrock Invocations 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-agent-runtime.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /sessions/{sessionIdentifier}/invocations/:
    put:
      operationId: CreateInvocation
      summary: Create Invocation
      description: Creates a new invocation within a session. An invocation groups the related invocation steps that store
        the content from a conversation. For more information about sessions, see Store and retrieve conversation history
        and context with Amazon Bedrock sessions. Related APIs ListInvocations ListSessions GetSession
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateInvocationResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '409':
          description: ConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentRuntimeInternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '400':
          description: ServiceQuotaExceededException; ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceQuotaExceededException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      parameters:
      - name: sessionIdentifier
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier for the associated session for the invocation. You can specify either the session's
          sessionId or its Amazon Resource Name (ARN).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                invocationId:
                  type: string
                  description: A unique identifier for the invocation in UUID format.
                description:
                  type: string
                  description: A description for the interactions in the invocation. For example, "User asking about weather
                    in Seattle".
      tags:
      - Invocations
    post:
      operationId: ListInvocations
      summary: List Invocations
      description: Lists all invocations associated with a specific session. For more information about sessions, see Store
        and retrieve conversation history and context with Amazon Bedrock sessions.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListInvocationsResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentRuntimeInternalServerException'
        '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: nextToken
        in: query
        schema:
          type: string
        description: If the total number of results is greater than the maxResults value provided in the request, enter the
          token returned in the nextToken field in the response in this field to return the next batch of results.
      - name: maxResults
        in: query
        schema:
          type: integer
        description: The maximum number of results to return in the response. If the total number of results is greater than
          this value, use the token returned in the response in the nextToken field when making another request to return
          the next batch of results.
      - name: sessionIdentifier
        in: path
        required: true
        schema:
          type: string
        description: The unique identifier for the session to list invocations for. You can specify either the session's sessionId
          or its Amazon Resource Name (ARN).
      tags:
      - Invocations
  /runtimes/{agentRuntimeArn}/invocations/.well-known/agent-card.json:
    get:
      operationId: GetAgentCard
      summary: Get Agent Card
      description: Retrieves the A2A agent card associated with an AgentCore Runtime agent.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAgentCardResponse'
        '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'
        '409':
          description: RetryableConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryableConflictException'
        '424':
          description: RuntimeClientError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeClientError'
        '402':
          description: ServiceQuotaExceededException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceQuotaExceededException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentcoreValidationException'
      parameters:
      - name: X-Amzn-Bedrock-AgentCore-Runtime-Session-Id
        in: header
        schema:
          type: string
        description: The session ID that the AgentCore Runtime agent is using.
      - name: agentRuntimeArn
        in: path
        required: true
        schema:
          type: string
        description: The ARN of the AgentCore Runtime agent for which you want to get the A2A agent card.
      - name: qualifier
        in: query
        schema:
          type: string
        description: Optional qualifier to specify an agent alias, such as prodcode> or dev. If you don't provide a value,
          the DEFAULT alias is used.
      tags:
      - Invocations
      servers:
      - url: https://bedrock-agentcore.{region}.amazonaws.com
        variables:
          region:
            default: us-east-1
      security:
      - sigv4_bedrock_agentcore: []
  /runtimes/{agentRuntimeArn}/invocations:
    post:
      operationId: InvokeAgentRuntime
      summary: Invoke Agent Runtime
      description: Sends a request to an agent or tool hosted in an Amazon Bedrock AgentCore Runtime and receives responses
        in real-time. To invoke an agent, you can specify either the AgentCore Runtime ARN or the agent ID with an account
        ID, and provide a payload containing your request. When you use the agent ID instead of the full ARN, you don't need
        to URL-encode the identifier. You can optionally specify a qualifier to target a specific endpoint of the agent. This
        operation supports streaming responses, allowing you to receive partial responses as they become available. We recommend
        using pagination to ensure that the operation returns quickly and successfully when processing large responses. For
        example code, see Invoke an AgentCore Runtime agent. If you're integrating your agent with OAuth, you can't use the
        Amazon Web Services SDK to call InvokeAgentRuntime. Instead, make a HTTPS request to InvokeAgentRuntime. For an example,
        see Authenticate and authorize with Inbound Auth and Outbound Auth. To use this operation, you must have the bedrock-agentcore:InvokeAgentRuntime
        permission. If you are making a call to InvokeAgentRuntime on behalf of a user ID with the X-Amzn-Bedrock-AgentCore-Runtime-U
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvokeAgentRuntimeResponse'
        '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'
        '409':
          description: RetryableConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryableConflictException'
        '424':
          description: RuntimeClientError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeClientError'
        '402':
          description: ServiceQuotaExceededException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceQuotaExceededException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentcoreValidationException'
      parameters:
      - name: Content-Type
        in: header
        schema:
          type: string
        description: The MIME type of the input data in the payload. This tells the agent runtime how to interpret the payload
          data. Common values include application/json for JSON data.
      - name: Accept
        in: header
        schema:
          type: string
        description: The desired MIME type for the response from the agent runtime. This tells the agent runtime what format
          to use for the response data. Common values include application/json for JSON data.
      - name: Mcp-Session-Id
        in: header
        schema:
          type: string
        description: The identifier of the MCP session.
      - name: X-Amzn-Bedrock-AgentCore-Runtime-Session-Id
        in: header
        schema:
          type: string
        description: The identifier of the runtime session.
      - name: Mcp-Protocol-Version
        in: header
        schema:
          type: string
        description: The version of the MCP protocol being used.
      - name: Mcp-Method
        in: header
        schema:
          type: string
        description: The MCP method being invoked. For example, tools/call, resources/read, or prompts/get.
      - name: Mcp-Name
        in: header
        schema:
          type: string
        description: 'The name of the MCP resource, tool, or prompt being accessed. The value depends on the method: tools/call
          – The tool name. resources/read – The resource URI. prompts/get – The prompt name.'
      - name: X-Amzn-Bedrock-AgentCore-Runtime-User-Id
        in: header
        schema:
          type: string
        description: The identifier of the runtime user.
      - name: X-Amzn-Trace-Id
        in: header
        schema:
          type: string
        description: The trace identifier for request tracking.
      - name: traceparent
        in: header
        schema:
          type: string
        description: The parent trace information for distributed tracing.
      - name: tracestate
        in: header
        schema:
          type: string
        description: The trace state information for distributed tracing.
      - name: baggage
        in: header
        schema:
          type: string
        description: Additional context information for distributed tracing.
      - name: agentRuntimeArn
        in: path
        required: true
        schema:
          type: string
        description: The identifier of the agent runtime to invoke. You can specify either the full Amazon Web Services Resource
          Name (ARN) or the agent ID. If you use the agent ID, you must also provide the accountId query parameter.
      - name: qualifier
        in: query
        schema:
          type: string
        description: The qualifier to use for the agent runtime. This is an endpoint name that points to a specific version.
          If not specified, Amazon Bedrock AgentCore uses the default endpoint of the agent runtime.
      - name: accountId
        in: query
        schema:
          type: string
        description: The identifier of the Amazon Web Services account for the agent runtime resource. This parameter is required
          when you specify an agent ID instead of the full ARN for agentRuntimeArn.
      requestBody:
        content:
          application/json:
            schema:
              type: string
              format: byte
      tags:
      - Invocations
      servers:
      - url: https://bedrock-agentcore.{region}.amazonaws.com
        variables:
          region:
            default: us-east-1
      security:
      - sigv4_bedrock_agentcore: []
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
    sigv4_bedrock_agentcore:
      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-agentcore
  schemas:
    AccessDeniedException:
      type: object
      properties:
        message:
          type: string
    BedrockAgentRuntimeInternalServerException:
      type: object
      properties:
        message:
          type: string
        reason:
          type: string
          description: The reason for the exception. If the reason is BEDROCK_MODEL_INVOCATION_SERVICE_UNAVAILABLE, the model
            invocation service is unavailable. Retry your request.
    BedrockAgentcoreValidationException:
      type: object
      properties:
        message:
          type: string
        reason:
          type: string
          enum:
          - CannotParse
          - FieldValidationFailed
          - IdempotentParameterMismatchException
          - EventInOtherSession
          - ResourceConflict
        fieldList:
          type: array
          items:
            $ref: '#/components/schemas/ValidationExceptionField'
      required:
      - message
      - reason
    ConflictException:
      type: object
      properties:
        message:
          type: string
    CreateInvocationResponse:
      type: object
      properties:
        sessionId:
          type: string
          description: The unique identifier for the session associated with the invocation.
        invocationId:
          type: string
          description: The unique identifier for the invocation.
        createdAt:
          type: string
          format: date-time
          description: The timestamp for when the invocation was created.
      required:
      - sessionId
      - invocationId
      - createdAt
    GetAgentCardResponse:
      type: object
      properties:
        runtimeSessionId:
          type: string
          description: The ID of the session associated with the AgentCore Runtime agent.
        agentCard:
          type: object
          description: An agent card document that contains metadata and capabilities for an AgentCore Runtime agent.
        statusCode:
          type: integer
          description: The status code of the request.
      required:
      - agentCard
    InternalServerException:
      type: object
      properties:
        message:
          type: string
    InvocationSummary:
      type: object
      properties:
        sessionId:
          type: string
          description: The unique identifier for the session associated with the invocation.
        invocationId:
          type: string
          description: A unique identifier for the invocation in UUID format.
        createdAt:
          type: string
          format: date-time
          description: The timestamp for when the invocation was created.
      required:
      - sessionId
      - invocationId
      - createdAt
    InvokeAgentRuntimeResponse:
      type: object
      properties:
        runtimeSessionId:
          type: string
          description: The identifier of the runtime session.
        sessionEndpointUrl:
          type: string
          description: The HTTPS endpoint that addresses this runtime session directly. This value is returned only when the
            agent runtime is configured with allowed ports and direct runtime access is available for the session. If this
            value is not present, use InvokeAgentRuntime to communicate with the session.
        mcpSessionId:
          type: string
          description: The identifier of the MCP session.
        mcpProtocolVersion:
          type: string
          description: The version of the MCP protocol being used.
        traceId:
          type: string
          description: The trace identifier for request tracking.
        traceParent:
          type: string
          description: The parent trace information for distributed tracing.
        traceState:
          type: string
          description: The trace state information for distributed tracing.
        baggage:
          type: string
          description: Additional context information for distributed tracing.
        contentType:
          type: string
          description: The MIME type of the response data. This indicates how to interpret the response data. Common values
            include application/json for JSON data.
        response:
          type: string
          format: byte
          description: The response data from the agent runtime. The format of this data depends on the specific agent configuration
            and the requested accept type. For most agents, this is a JSON object containing the agent's response to the user's
            request.
        statusCode:
          type: integer
          description: The HTTP status code of the response. A status code of 200 indicates a successful operation. Other
            status codes indicate various error conditions.
      required:
      - contentType
    ListInvocationsResponse:
      type: object
      properties:
        invocationSummaries:
          type: array
          items:
            $ref: '#/components/schemas/InvocationSummary'
          description: A list of invocation summaries associated with the session.
        nextToken:
          type: string
          description: If the total number of results is greater than the maxResults value provided in the request, use this
            token when making another request in the nextToken field to return the next batch of results.
      required:
      - invocationSummaries
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
    RetryableConflictException:
      type: object
      properties:
        message:
          type: string
      required:
      - message
    RuntimeClientError:
      type: object
      properties:
        message:
          type: string
    ServiceQuotaExceededException:
      type: object
      properties:
        message:
          type: string
    ThrottlingException:
      type: object
      properties:
        message:
          type: string
    ValidationException:
      type: object
      properties:
        message:
          type: string
    ValidationExceptionField:
      type: object
      properties:
        name:
          type: string
          description: The name of the field.
        message:
          type: string
          description: A message describing why this field failed validation.
      required:
      - name
      - message
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/bedrock-agent-runtime/service/2023-07-26/bedrock-agent-runtime-2023-07-26.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)
  sources:
  - https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/bedrock-agent-runtime/service/2023-07-26/bedrock-agent-runtime-2023-07-26.json
  - https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/bedrock-agentcore/service/2024-02-28/bedrock-agentcore-2024-02-28.json