---
title: "POST /flows/{flowIdentifier}/aliases/{flowAliasIdentifier}"
method: POST
path: "/flows/{flowIdentifier}/aliases/{flowAliasIdentifier}"
---

# POST /flows/{flowIdentifier}/aliases/{flowAliasIdentifier}

`POST /flows/{flowIdentifier}/aliases/{flowAliasIdentifier}`

Invokes an alias of a flow to run the inputs that you specify and return the output of each node as a stream. If there's an error, the error is returned. For more information, see [Test a flow in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/flows-test.html) in the [Amazon Bedrock User Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html).

The CLI doesn't support streaming operations in Amazon Bedrock, including `InvokeFlow`.

## Path parameters

- `flowAliasIdentifier` string, required
- `flowIdentifier` string, required

## Request body

- object
  - `enableTrace` boolean — Specifies whether to return the trace for the flow or not. Traces track inputs and outputs for nodes in the flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.
  - `executionId` string — The unique identifier for the current flow execution. If you don't provide a value, Amazon Bedrock creates the identifier for you.
  - `inputs` FlowInput[], required — A list of objects, each containing information about an input into the flow.
    - `content` object, required — Contains information about an input into the prompt flow.
      - `document` object — The input to send to the prompt flow input node.
    - `nodeInputName` string — The name of the input from the flow input node.
    - `nodeName` string, required — The name of the flow input node that begins the prompt flow.
    - `nodeOutputName` string — The name of the output from the flow input node that begins the prompt flow.
  - `modelPerformanceConfiguration` object — The performance configuration for a model called with <a>InvokeFlow</a>.
    - `performanceConfig` object — The latency configuration for the model.
      - `latency` 'standard' | 'optimized' — To use a latency-optimized version of the model, set to <code>optimized</code>.

## Response `200`

Success

- InvokeFlowResponse
  - `responseStream` object, required — The output of the flow, returned as a stream. If there's an error, the error is returned.
    - `accessDeniedException` object — The request is denied because of missing access permissions. Check your permissions and retry your request.
      - `message` string
    - `badGatewayException` object — There was an issue with a dependency due to a server issue. Retry your request.
      - `message` string
      - `resourceName` string — The name of the dependency that caused the issue, such as Amazon Bedrock, Lambda, or STS.
    - `conflictException` object — There was a conflict performing an operation. Resolve the conflict and retry your request.
      - `message` string
    - `dependencyFailedException` object — There was an issue with a dependency. Check the resource configurations and retry the request.
      - `message` string
      - `resourceName` string — The name of the dependency that caused the issue, such as Amazon Bedrock, Lambda, or STS.
    - `flowCompletionEvent` object — Contains information about why the flow completed.
      - `completionReason` 'SUCCESS' | 'INPUT_REQUIRED', required — The reason that the flow completed.
    - `flowMultiTurnInputRequestEvent` object — The event stream containing the multi-turn input request information from the flow.
      - `content` object, required — The content payload containing the input request details for the multi-turn interaction.
        - `document` object — The requested additional input to send back to the multi-turn flow node.
      - `nodeName` string, required — The name of the node in the flow that is requesting the input.
      - `nodeType` 'FlowInputNode' | 'FlowOutputNode' | 'LambdaFunctionNode' | 'KnowledgeBaseNode' | 'PromptNode' | 'ConditionNode' | 'LexNode', required — The type of the node in the flow that is requesting the input.
    - `flowOutputEvent` object — Contains information about an output from flow invocation.
      - `content` object, required — The content in the output.
        - `document` object — The content in the output.
      - `nodeName` string, required — The name of the flow output node that the output is from.
      - `nodeType` 'FlowInputNode' | 'FlowOutputNode' | 'LambdaFunctionNode' | 'KnowledgeBaseNode' | 'PromptNode' | 'ConditionNode' | 'LexNode', required — The type of the node that the output is from.
    - `flowTraceEvent` object — Contains information about a trace, which tracks an input or output for a node in the flow.
      - `trace` object, required — The trace object containing information about an input or output for a node in the flow.
        - `conditionNodeResultTrace` object — Contains information about an output from a condition node.
          - `nodeName` string, required — The name of the condition node.
          - `satisfiedConditions` FlowTraceCondition[], required — An array of objects containing information about the conditions that were satisfied.
            - `conditionName` string, required — The name of the condition.
          - `timestamp` string, date-time, required — The date and time that the trace was returned.
        - `nodeActionTrace` object — Contains information about an action (operation) called by a node.
          - `nodeName` string, required — The name of the node that called the operation.
          - `operationName` string, required — The name of the operation that the node called.
          - `operationRequest` object — The request payload sent to the downstream service.
          - `operationResponse` object — The response payload received from the downstream service.
          - `requestId` string, required — The ID of the request that the node made to the operation.
          - `serviceName` string, required — The name of the service that the node called.
          - `timestamp` string, date-time, required — The date and time that the operation was called.
        - `nodeDependencyTrace` object — Contains information about an internal trace of a node.
          - `nodeName` string, required — The name of the node that generated the dependency trace.
          - `timestamp` string, date-time, required — The date and time that the dependency trace was generated.
          - `traceElements` object, required — The trace elements containing detailed information about the dependency.
            - `agentTraces` TracePart[] — Agent trace information for the flow execution.
              - …
        - `nodeInputTrace` object — Contains information about the input into a node.
          - `fields` FlowTraceNodeInputField[], required — An array of objects containing information about each field in the input.
            - `category` 'LoopCondition' | 'ReturnValueToLoopStart' | 'ExitLoop' — The category of the input field.
            - `content` object, required — The content of the node input.
              - …
            - `executionChain` FlowTraceNodeInputExecutionChainItem[] — The execution path through nested nodes like iterators and loops.
              - …
            - `nodeInputName` string, required — The name of the node input.
            - `source` object — The source node that provides input data to this field.
              - …
            - `type` 'String' | 'Number' | 'Boolean' | 'Object' | 'Array' — The data type of the input field for compatibility validation.
          - `nodeName` string, required — The name of the node that received the input.
          - `timestamp` string, date-time, required — The date and time that the trace was returned.
        - `nodeOutputTrace` object — Contains information about the output from a node.
          - `fields` FlowTraceNodeOutputField[], required — An array of objects containing information about each field in the output.
            - `content` object, required — The content of the node output.
              - …
            - `next` FlowTraceNodeOutputNext[] — The next node that receives output data from this field.
              - …
            - `nodeOutputName` string, required — The name of the node output.
            - `type` 'String' | 'Number' | 'Boolean' | 'Object' | 'Array' — The data type of the output field for compatibility validation.
          - `nodeName` string, required — The name of the node that yielded the output.
          - `timestamp` string, date-time, required — The date and time that the trace was returned.
    - `internalServerException` object — An internal server error occurred. Retry your request.
      - `message` string
      - `reason` string — The reason for the exception. If the reason is <code>BEDROCK_MODEL_INVOCATION_SERVICE_UNAVAILABLE</code>, the model invocation service is unavailable. Retry your request.
    - `resourceNotFoundException` object — The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
      - `message` string
    - `serviceQuotaExceededException` object — The number of requests exceeds the service quota. Resubmit your request later.
      - `message` string
    - `throttlingException` object — The number of requests exceeds the limit. Resubmit your request later.
      - `message` string
    - `validationException` object — Input validation failed. Check your request parameters and retry the request.
      - `message` string

## Other responses

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

---

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