---
title: "POST /model/{modelId}/invoke-with-bidirectional-stream"
method: POST
path: "/model/{modelId}/invoke-with-bidirectional-stream"
---

# POST /model/{modelId}/invoke-with-bidirectional-stream

`POST /model/{modelId}/invoke-with-bidirectional-stream`

Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed.

It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.

## Path parameters

- `modelId` string, required

## Request body

- object
  - `body` object, required — Payload content, the speech chunk, for the bidirectional input of the invocation step.
    - `chunk` object — The audio chunk that is used as input for the invocation step.
      - `bytes` string, password — The audio content for the bidirectional input.

## Response `200`

Success

- InvokeModelWithBidirectionalStreamResponse
  - `body` object, required — Streaming response from the model in the format specified by the <code>BidirectionalOutputPayloadPart</code> header.
    - `chunk` object — The speech chunk that was provided as output from the invocation step.
      - `bytes` string, password — The speech output of the bidirectional stream.
    - `internalServerException` object — The request encountered an unknown internal error.
      - `message` string
    - `modelStreamErrorException` object — The request encountered an error with the model stream.
      - `message` string
      - `originalStatusCode` integer — The original status code.
      - `originalMessage` string — The original message.
    - `validationException` object — The input fails to satisfy the constraints specified by an Amazon Web Services service.
      - `message` string
    - `throttlingException` object — The request was denied due to request throttling.
      - `message` string
    - `modelTimeoutException` object — The connection was closed because a request was not received within the timeout period.
      - `message` string
    - `serviceUnavailableException` object — The request has failed due to a temporary failure of the server.
      - `message` string

## Other responses

- `480` — AccessDeniedException
- `481` — ResourceNotFoundException
- `482` — ThrottlingException
- `483` — ModelTimeoutException
- `484` — InternalServerException
- `485` — ServiceUnavailableException
- `486` — ModelStreamErrorException
- `487` — ValidationException
- `488` — ServiceQuotaExceededException
- `489` — ModelNotReadyException
- `490` — ModelErrorException

---

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