> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vellum.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vellum.ai/_mcp/server.

# Execute Workflow as Stream

POST https://predict.vellum.ai/v1/execute-workflow-stream
Content-Type: application/json

Executes a deployed Workflow and streams back its results.

Reference: https://docs.vellum.ai/developers/client-sdk/workflows/execute-workflow-stream

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects an ExecuteWorkflowStreamRequest.

- `inputs` (list of WorkflowRequestInputRequest, required) — The list of inputs defined in the Workflow's Deployment with their corresponding values.
- `expand_meta` (WorkflowExpandMetaRequest, optional, nullable) — An optionally specified configuration used to opt in to including additional metadata about this workflow execution in the API response. Corresponding values will be returned under the `execution_meta` key within NODE events in the response stream.
- `workflow_deployment_id` (string, optional, nullable) — The ID of the Workflow Deployment. Must provide either this or workflow_deployment_name.
- `workflow_deployment_name` (string, optional, nullable) — The name of the Workflow Deployment. Must provide either this or workflow_deployment_id.
- `release_tag` (string, optional, nullable) — Optionally specify a release tag if you want to pin to a specific release of the Workflow Deployment
- `external_id` (string, optional, nullable) — Optionally include a unique identifier for tracking purposes. Must be unique within a given Workspace.
- `event_types` (list of enum, optional) — Optionally specify which events you want to receive. Defaults to only WORKFLOW events. Note that the schema of non-WORKFLOW events is unstable and should be used with caution.
  - Allowed values: `NODE`, `WORKFLOW`
- `metadata` (map from string to any, optional, nullable) — Arbitrary JSON metadata associated with this request. Can be used to capture additional monitoring data such as user id, session id, etc. for future analysis.
- `previous_execution_id` (string, optional, nullable) — The ID of a previous Workflow Execution to reference for initial State loading.

## Response

### 200

- Streaming response of `WorkflowStreamEvent`.

## Errors

### 400 Bad Request Error

- `map from string to any`

### 404 Not Found Error

- `detail` (string, required) — Details about why the request failed.

### 500 Internal Server Error

- `detail` (string, required) — Details about why the request failed.

## Types

### WorkflowRequestInputRequest

### WorkflowExpandMetaRequest

- `usage` (boolean, optional, nullable) — If enabled, the Prompt Node FULFILLED events will include model host usage tracking. This may increase latency for some model hosts.
- `cost` (boolean, optional, nullable) — If enabled, the Prompt Node FULFILLED events will include model host cost tracking. This may increase latency for some model hosts.
- `model_name` (boolean, optional, nullable) — If enabled, the Prompt Node FULFILLED events will include model host name

### WorkflowExecutionWorkflowResultEvent

A WORKFLOW-level event emitted from the workflow's execution.

- `execution_id` (string, required)
- `type` (enum, required)
  - Allowed values: `WORKFLOW`
- `data` (WorkflowResultEvent, required)
- `external_id` (string, optional, nullable)
- `run_id` (string, optional, nullable, deprecated)

### WorkflowExecutionNodeResultEvent

A NODE-level event emitted from the workflow's execution.

- `execution_id` (string, required)
- `type` (enum, required)
  - Allowed values: `NODE`
- `data` (WorkflowNodeResultEvent, required)
- `run_id` (string, optional, nullable)
- `external_id` (string, optional, nullable)

### WorkflowRequestStringInputRequest

The input for a string variable in a Workflow.

- `name` (string, required) — The variable's name, as defined in the Workflow.
- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required)

### WorkflowRequestJSONInputRequest

The input for a JSON variable in a Workflow.

- `name` (string, required) — The variable's name, as defined in the Workflow.
- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)

### WorkflowRequestChatHistoryInputRequest

The input for a chat history variable in a Workflow.

- `name` (string, required) — The variable's name, as defined in the Workflow.
- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessageRequest, required)

### WorkflowRequestNumberInputRequest

The input for a number variable in a Workflow.

- `name` (string, required) — The variable's name, as defined in the Workflow.
- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required)

### WorkflowRequestAudioInputRequest

The input for an audio variable in a Workflow.

- `name` (string, required) — The variable's name, as defined in the Workflow.
- `type` (enum, required)
  - Allowed values: `AUDIO`
- `value` (VellumAudioRequest, required)

### WorkflowRequestVideoInputRequest

The input for a video variable in a Workflow.

- `name` (string, required) — The variable's name, as defined in the Workflow.
- `type` (enum, required)
  - Allowed values: `VIDEO`
- `value` (VellumVideoRequest, required)

### WorkflowRequestImageInputRequest

The input for an image variable in a Workflow.

- `name` (string, required) — The variable's name, as defined in the Workflow.
- `type` (enum, required)
  - Allowed values: `IMAGE`
- `value` (VellumImageRequest, required)

### WorkflowRequestDocumentInputRequest

The input for a document variable in a Workflow.

- `name` (string, required) — The variable's name, as defined in the Workflow.
- `type` (enum, required)
  - Allowed values: `DOCUMENT`
- `value` (VellumDocumentRequest, required)

### WorkflowResultEvent

- `id` (string, required)
- `state` (enum, required) — * `INITIATED` - Initiated * `STREAMING` - Streaming * `FULFILLED` - Fulfilled * `REJECTED` - Rejected * `PENDING` - Pending
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`, `PENDING`
- `ts` (string, required)
- `output` (WorkflowResultEventOutputData, required, nullable)
- `error` (WorkflowEventError, optional, nullable)
- `outputs` (list of WorkflowOutput, optional, nullable)
- `inputs` (list of ExecutionVellumValue, optional, nullable)

### WorkflowNodeResultEvent

### ChatMessageRequest

- `role` (enum, required) — * `SYSTEM` - System * `ASSISTANT` - Assistant * `USER` - User * `FUNCTION` - Function
  - Allowed values: `SYSTEM`, `ASSISTANT`, `USER`, `FUNCTION`
- `text` (string, optional, nullable)
- `content` (ChatMessageContentRequest, optional, nullable)
- `source` (string, optional, nullable) — An optional identifier representing who or what generated this message.
- `metadata` (map from string to any, optional, nullable)

### VellumAudioRequest

- `src` (string, required) — The reference to the source data. This can be one of the following formats: 1. A base64-encoded data URL (e.g., 'data:application/pdf;base64,JVBERi0xLjQKJcfs...'). 2. A url pointing to a file accessible over HTTP or HTTPS. 3. A reference to a file that's been previously uploaded to Vellum, in the form of 'vellum:uploaded-file:\{uploaded\_file\_id}'. You can use the Uploaded Files API to retrieve the url of the uploaded file given its ID. See [https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve](https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve) for details.
- `metadata` (map from string to any, optional, nullable)

### VellumVideoRequest

- `src` (string, required) — The reference to the source data. This can be one of the following formats: 1. A base64-encoded data URL (e.g., 'data:application/pdf;base64,JVBERi0xLjQKJcfs...'). 2. A url pointing to a file accessible over HTTP or HTTPS. 3. A reference to a file that's been previously uploaded to Vellum, in the form of 'vellum:uploaded-file:\{uploaded\_file\_id}'. You can use the Uploaded Files API to retrieve the url of the uploaded file given its ID. See [https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve](https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve) for details.
- `metadata` (map from string to any, optional, nullable)

### VellumImageRequest

- `src` (string, required) — The reference to the source data. This can be one of the following formats: 1. A base64-encoded data URL (e.g., 'data:application/pdf;base64,JVBERi0xLjQKJcfs...'). 2. A url pointing to a file accessible over HTTP or HTTPS. 3. A reference to a file that's been previously uploaded to Vellum, in the form of 'vellum:uploaded-file:\{uploaded\_file\_id}'. You can use the Uploaded Files API to retrieve the url of the uploaded file given its ID. See [https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve](https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve) for details.
- `metadata` (map from string to any, optional, nullable)

### VellumDocumentRequest

- `src` (string, required) — The reference to the source data. This can be one of the following formats: 1. A base64-encoded data URL (e.g., 'data:application/pdf;base64,JVBERi0xLjQKJcfs...'). 2. A url pointing to a file accessible over HTTP or HTTPS. 3. A reference to a file that's been previously uploaded to Vellum, in the form of 'vellum:uploaded-file:\{uploaded\_file\_id}'. You can use the Uploaded Files API to retrieve the url of the uploaded file given its ID. See [https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve](https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve) for details.
- `metadata` (map from string to any, optional, nullable)

### WorkflowResultEventOutputData

### WorkflowEventError

- `message` (string, required)
- `code` (enum, required) — * `WORKFLOW_INITIALIZATION` - WORKFLOW_INITIALIZATION * `WORKFLOW_CANCELLED` - WORKFLOW_CANCELLED * `WORKFLOW_TIMEOUT` - WORKFLOW_TIMEOUT * `PROVIDER_CREDENTIALS_UNAVAILABLE` - PROVIDER_CREDENTIALS_UNAVAILABLE * `INTEGRATION_CREDENTIALS_UNAVAILABLE` - INTEGRATION_CREDENTIALS_UNAVAILABLE * `NODE_EXECUTION_COUNT_LIMIT_REACHED` - NODE_EXECUTION_COUNT_LIMIT_REACHED * `INTERNAL_SERVER_ERROR` - INTERNAL_SERVER_ERROR * `NODE_EXECUTION` - NODE_EXECUTION * `NODE_CANCELLED` - NODE_CANCELLED * `NODE_TIMEOUT` - NODE_TIMEOUT * `LLM_PROVIDER` - LLM_PROVIDER * `INVALID_TEMPLATE` - INVALID_TEMPLATE * `INVALID_INPUTS` - INVALID_INPUTS * `PROVIDER_QUOTA_EXCEEDED` - PROVIDER_QUOTA_EXCEEDED * `USER_DEFINED_ERROR` - USER_DEFINED_ERROR
  - Allowed values: `WORKFLOW_INITIALIZATION`, `WORKFLOW_CANCELLED`, `WORKFLOW_TIMEOUT`, `PROVIDER_CREDENTIALS_UNAVAILABLE`, `INTEGRATION_CREDENTIALS_UNAVAILABLE`, `NODE_EXECUTION_COUNT_LIMIT_REACHED`, `INTERNAL_SERVER_ERROR`, `NODE_EXECUTION`, `NODE_CANCELLED`, `NODE_TIMEOUT`, `LLM_PROVIDER`, `INVALID_TEMPLATE`, `INVALID_INPUTS`, `PROVIDER_QUOTA_EXCEEDED`, `USER_DEFINED_ERROR`
- `raw_data` (WorkflowEventErrorRawData, optional, nullable)
- `stacktrace` (string, optional, nullable)

### WorkflowOutput

### ExecutionVellumValue

### InitiatedWorkflowNodeResultEvent

An event that indicates that the node has initiated its execution.

- `id` (string, required)
- `node_id` (string, required)
- `node_result_id` (string, required)
- `state` (enum, required)
  - Allowed values: `INITIATED`
- `data` (WorkflowNodeResultData, required, nullable)
- `ts` (string, optional, nullable)
- `source_execution_id` (string, optional, nullable)
- `input_values` (list of NodeInputVariableCompiledValue, optional, nullable)

### StreamingWorkflowNodeResultEvent

An event that indicates that the node has execution is in progress.

- `id` (string, required)
- `node_id` (string, required)
- `node_result_id` (string, required)
- `state` (enum, required)
  - Allowed values: `STREAMING`
- `data` (WorkflowNodeResultData, required, nullable)
- `ts` (string, optional, nullable)
- `source_execution_id` (string, optional, nullable)
- `output` (NodeOutputCompiledValue, optional, nullable)
- `output_index` (integer, optional, nullable)

### FulfilledWorkflowNodeResultEvent

An event that indicates that the node has fulfilled its execution.

- `id` (string, required)
- `node_id` (string, required)
- `node_result_id` (string, required)
- `state` (enum, required)
  - Allowed values: `FULFILLED`
- `data` (WorkflowNodeResultData, required, nullable)
- `output_values` (list of NodeOutputCompiledValue, required)
- `ts` (string, optional, nullable)
- `source_execution_id` (string, optional, nullable)
- `mocked` (boolean, optional)

### RejectedWorkflowNodeResultEvent

An event that indicates that the node has rejected its execution.

- `id` (string, required)
- `node_id` (string, required)
- `node_result_id` (string, required)
- `state` (enum, required)
  - Allowed values: `REJECTED`
- `data` (WorkflowNodeResultData, required, nullable)
- `error` (WorkflowEventError, required)
- `ts` (string, optional, nullable)
- `source_execution_id` (string, optional, nullable)

### ChatMessageContentRequest

### WorkflowResultEventOutputDataString

A string output streamed from a Workflow execution.

- `name` (string, required)
- `state` (enum, required) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`
- `delta` (string, required, nullable) — The newly output string value, meant to be concatenated with all previous. Will be non-null for events of state STREAMING.
- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required, nullable) — The entire string value. Will be non-null for events of state FULFILLED.
- `id` (string, optional, nullable)
- `node_id` (string, optional, nullable)

### WorkflowResultEventOutputDataNumber

A number output streamed from a Workflow execution.

- `name` (string, required)
- `state` (enum, required) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`
- `delta` (string, required, nullable) — The newly output string value. Only relevant for string outputs with a state of STREAMING.
- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required, nullable)
- `id` (string, optional, nullable)
- `node_id` (string, optional, nullable)

### WorkflowResultEventOutputDataJSON

A JSON output streamed from a Workflow execution.

- `name` (string, required)
- `state` (enum, required) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`
- `delta` (string, required, nullable) — The newly output string value. Only relevant for string outputs with a state of STREAMING.
- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)
- `id` (string, optional, nullable)
- `node_id` (string, optional, nullable)

### WorkflowResultEventOutputDataChatHistory

A Chat History output streamed from a Workflow execution.

- `name` (string, required)
- `state` (enum, required) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`
- `delta` (string, required, nullable) — The newly output string value. Only relevant for string outputs with a state of STREAMING.
- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessage, required, nullable)
- `id` (string, optional, nullable)
- `node_id` (string, optional, nullable)

### WorkflowResultEventOutputDataSearchResults

A Search Results output streamed from a Workflow execution.

- `name` (string, required)
- `state` (enum, required) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`
- `delta` (string, required, nullable) — The newly output string value. Only relevant for string outputs with a state of STREAMING.
- `type` (enum, required)
  - Allowed values: `SEARCH_RESULTS`
- `value` (list of SearchResult, required, nullable)
- `id` (string, optional, nullable)
- `node_id` (string, optional, nullable)

### WorkflowResultEventOutputDataArray

An Array output returned from a Workflow execution.

- `name` (string, required)
- `state` (enum, required) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`
- `delta` (string, required, nullable) — The newly output string value. Only relevant for string outputs with a state of STREAMING.
- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of VellumValue, required, nullable)
- `id` (string, optional, nullable)
- `node_id` (string, optional, nullable)

### WorkflowResultEventOutputDataFunctionCall

A Function Call output returned from a Workflow execution.

- `name` (string, required)
- `state` (enum, required) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`
- `delta` (string, required, nullable) — The newly output string value. Only relevant for string outputs with a state of STREAMING.
- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCall, required, nullable) — The final resolved function call value.
- `id` (string, optional, nullable)
- `node_id` (string, optional, nullable)

### WorkflowResultEventOutputDataError

An Error output streamed from a Workflow execution.

- `name` (string, required)
- `state` (enum, required) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`
- `delta` (string, required, nullable) — The newly output string value. Only relevant for string outputs with a state of STREAMING.
- `type` (enum, required)
  - Allowed values: `ERROR`
- `value` (VellumError, required, nullable)
- `id` (string, optional, nullable)
- `node_id` (string, optional, nullable)

### WorkflowEventErrorRawData

### WorkflowOutputString

A string output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required, nullable)

### WorkflowOutputNumber

A number output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required, nullable)

### WorkflowOutputJSON

A JSON output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)

### WorkflowOutputChatHistory

A chat history output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessage, required, nullable)

### WorkflowOutputSearchResults

A search results output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `SEARCH_RESULTS`
- `value` (list of SearchResult, required, nullable)

### WorkflowOutputArray

An array output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of VellumValue, required, nullable)

### WorkflowOutputError

An error output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `ERROR`
- `value` (VellumError, required, nullable)

### WorkflowOutputFunctionCall

A function call output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCall, required, nullable) — The final resolved function call value.

### WorkflowOutputImage

An image output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `IMAGE`
- `value` (VellumImage, required, nullable)

### WorkflowOutputAudio

An audio output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `AUDIO`
- `value` (VellumAudio, required, nullable)

### WorkflowOutputVideo

A video output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `VIDEO`
- `value` (VellumVideo, required, nullable)

### WorkflowOutputDocument

A document output from a Workflow execution.

- `id` (string, required)
- `name` (string, required) — The output's name, as defined in the workflow
- `type` (enum, required)
  - Allowed values: `DOCUMENT`
- `value` (VellumDocument, required, nullable)

### ExecutionStringVellumValue

A value representing a string.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required, nullable)

### ExecutionNumberVellumValue

A value representing a number.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required, nullable)

### ExecutionJsonVellumValue

A value representing a JSON object.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)

### ExecutionChatHistoryVellumValue

A value representing Chat History.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessage, required, nullable)

### ExecutionSearchResultsVellumValue

A value representing Search Results.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `SEARCH_RESULTS`
- `value` (list of SearchResult, required, nullable)

### ExecutionErrorVellumValue

A value representing an Error.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `ERROR`
- `value` (VellumError, required, nullable)

### ExecutionArrayVellumValue

A value representing an array of Vellum variable values.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of VellumValue, required, nullable)

### ExecutionFunctionCallVellumValue

A value representing a Function Call.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCall, required, nullable) — The final resolved function call value.

### ExecutionThinkingVellumValue

A value representing Thinking mode output.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `THINKING`
- `value` (StringVellumValue, required, nullable) — A value representing a string.

### ExecutionAudioVellumValue

A base Vellum primitive value representing audio.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `AUDIO`
- `value` (VellumAudio, required, nullable)

### ExecutionVideoVellumValue

A base Vellum primitive value representing a video.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `VIDEO`
- `value` (VellumVideo, required, nullable)

### ExecutionImageVellumValue

A base Vellum primitive value representing an image.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `IMAGE`
- `value` (VellumImage, required, nullable)

### ExecutionDocumentVellumValue

A base Vellum primitive value representing a document.

- `id` (string, required) — The variable's uniquely identifying internal id.
- `name` (string, required)
- `type` (enum, required)
  - Allowed values: `DOCUMENT`
- `value` (VellumDocument, required, nullable)

### WorkflowNodeResultData

### NodeInputVariableCompiledValue

### NodeOutputCompiledValue

### StringChatMessageContentRequest

A string value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required)

### FunctionCallChatMessageContentRequest

A function call value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCallChatMessageContentValueRequest, required) — The final resolved function call value.

### ArrayChatMessageContentRequest

A list of chat message content items.

- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of ArrayChatMessageContentItemRequest, required)

### AudioChatMessageContentRequest

An audio value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `AUDIO`
- `value` (VellumAudioRequest, required)

### VideoChatMessageContentRequest

A video value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `VIDEO`
- `value` (VellumVideoRequest, required)

### ImageChatMessageContentRequest

An image value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `IMAGE`
- `value` (VellumImageRequest, required)

### DocumentChatMessageContentRequest

A document value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `DOCUMENT`
- `value` (VellumDocumentRequest, required)

### ChatMessage

- `role` (enum, required) — * `SYSTEM` - System * `ASSISTANT` - Assistant * `USER` - User * `FUNCTION` - Function
  - Allowed values: `SYSTEM`, `ASSISTANT`, `USER`, `FUNCTION`
- `text` (string, optional, nullable)
- `content` (ChatMessageContent, optional, nullable)
- `source` (string, optional, nullable) — An optional identifier representing who or what generated this message.
- `metadata` (map from string to any, optional, nullable)

### SearchResult

- `text` (string, required) — The text of the chunk that matched the search query.
- `score` (double, required) — A score representing how well the chunk matches the search query.
- `keywords` (list of string, required)
- `document` (SearchResultDocument, required) — The document that contains the chunk that matched the search query.
- `meta` (SearchResultMeta, optional, nullable) — Additional information about the search result.

### VellumValue

### FunctionCall

The final resolved function call value.

- `arguments` (map from string to any, required)
- `name` (string, required)
- `id` (string, optional, nullable)

### VellumError

- `code` (enum, required) — * `INVALID_REQUEST` - INVALID_REQUEST * `INVALID_INPUTS` - INVALID_INPUTS * `PROVIDER_ERROR` - PROVIDER_ERROR * `PROVIDER_CREDENTIALS_UNAVAILABLE` - PROVIDER_CREDENTIALS_UNAVAILABLE * `INTEGRATION_CREDENTIALS_UNAVAILABLE` - INTEGRATION_CREDENTIALS_UNAVAILABLE * `REQUEST_TIMEOUT` - REQUEST_TIMEOUT * `INTERNAL_SERVER_ERROR` - INTERNAL_SERVER_ERROR * `USER_DEFINED_ERROR` - USER_DEFINED_ERROR * `WORKFLOW_CANCELLED` - WORKFLOW_CANCELLED * `NODE_CANCELLED` - NODE_CANCELLED * `PROVIDER_QUOTA_EXCEEDED` - PROVIDER_QUOTA_EXCEEDED * `CHAT_QUOTA_EXCEEDED` - CHAT_QUOTA_EXCEEDED
  - Allowed values: `INVALID_REQUEST`, `INVALID_INPUTS`, `PROVIDER_ERROR`, `PROVIDER_CREDENTIALS_UNAVAILABLE`, `INTEGRATION_CREDENTIALS_UNAVAILABLE`, `REQUEST_TIMEOUT`, `INTERNAL_SERVER_ERROR`, `USER_DEFINED_ERROR`, `WORKFLOW_CANCELLED`, `NODE_CANCELLED`, `PROVIDER_QUOTA_EXCEEDED`, `CHAT_QUOTA_EXCEEDED`
- `message` (string, required)
- `raw_data` (map from string to any, optional, nullable)

### VellumImage

- `src` (string, required) — The reference to the source data. This can be one of the following formats: 1. A base64-encoded data URL (e.g., 'data:application/pdf;base64,JVBERi0xLjQKJcfs...'). 2. A url pointing to a file accessible over HTTP or HTTPS. 3. A reference to a file that's been previously uploaded to Vellum, in the form of 'vellum:uploaded-file:\{uploaded\_file\_id}'. You can use the Uploaded Files API to retrieve the url of the uploaded file given its ID. See [https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve](https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve) for details.
- `metadata` (map from string to any, optional, nullable)

### VellumAudio

- `src` (string, required) — The reference to the source data. This can be one of the following formats: 1. A base64-encoded data URL (e.g., 'data:application/pdf;base64,JVBERi0xLjQKJcfs...'). 2. A url pointing to a file accessible over HTTP or HTTPS. 3. A reference to a file that's been previously uploaded to Vellum, in the form of 'vellum:uploaded-file:\{uploaded\_file\_id}'. You can use the Uploaded Files API to retrieve the url of the uploaded file given its ID. See [https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve](https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve) for details.
- `metadata` (map from string to any, optional, nullable)

### VellumVideo

- `src` (string, required) — The reference to the source data. This can be one of the following formats: 1. A base64-encoded data URL (e.g., 'data:application/pdf;base64,JVBERi0xLjQKJcfs...'). 2. A url pointing to a file accessible over HTTP or HTTPS. 3. A reference to a file that's been previously uploaded to Vellum, in the form of 'vellum:uploaded-file:\{uploaded\_file\_id}'. You can use the Uploaded Files API to retrieve the url of the uploaded file given its ID. See [https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve](https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve) for details.
- `metadata` (map from string to any, optional, nullable)

### VellumDocument

- `src` (string, required) — The reference to the source data. This can be one of the following formats: 1. A base64-encoded data URL (e.g., 'data:application/pdf;base64,JVBERi0xLjQKJcfs...'). 2. A url pointing to a file accessible over HTTP or HTTPS. 3. A reference to a file that's been previously uploaded to Vellum, in the form of 'vellum:uploaded-file:\{uploaded\_file\_id}'. You can use the Uploaded Files API to retrieve the url of the uploaded file given its ID. See [https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve](https://docs.vellum.ai/developers/client-sdk/uploaded-files/retrieve) for details.
- `metadata` (map from string to any, optional, nullable)

### StringVellumValue

A value representing a string.

- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required, nullable)

### PromptNodeResult

A Node Result Event emitted from a Prompt Node.

- `type` (enum, required)
  - Allowed values: `PROMPT`
- `data` (PromptNodeResultData, required)

### SearchNodeResult

A Node Result Event emitted from a Search Node.

- `type` (enum, required)
  - Allowed values: `SEARCH`
- `data` (SearchNodeResultData, required)

### TemplatingNodeResult

A Node Result Event emitted from a Templating Node.

- `type` (enum, required)
  - Allowed values: `TEMPLATING`
- `data` (TemplatingNodeResultData, required)

### CodeExecutionNodeResult

A Node Result Event emitted from a Code Execution Node.

- `type` (enum, required)
  - Allowed values: `CODE_EXECUTION`
- `data` (CodeExecutionNodeResultData, required)

### ConditionalNodeResult

A Node Result Event emitted from a Conditional Node.

- `type` (enum, required)
  - Allowed values: `CONDITIONAL`
- `data` (ConditionalNodeResultData, required)

### ApiNodeResult

A Node Result Event emitted from an API Node.

- `type` (enum, required)
  - Allowed values: `API`
- `data` (ApiNodeResultData, required)

### TerminalNodeResult

A Node Result Event emitted from a Terminal Node.

- `type` (enum, required)
  - Allowed values: `TERMINAL`
- `data` (TerminalNodeResultData, required)

### MergeNodeResult

A Node Result Event emitted from a Merge Node.

- `type` (enum, required)
  - Allowed values: `MERGE`
- `data` (MergeNodeResultData, required)

### SubworkflowNodeResult

A Node Result Event emitted from a Subworkflow Node.

- `type` (enum, required)
  - Allowed values: `SUBWORKFLOW`
- `data` (SubworkflowNodeResultData, optional)

### MetricNodeResult

A Node Result Event emitted from a Metric Node.

- `type` (enum, required)
  - Allowed values: `METRIC`

### MapNodeResult

A Node Result Event emitted from a Map Node.

- `type` (enum, required)
  - Allowed values: `MAP`
- `data` (MapNodeResultData, optional)

### NodeInputCompiledStringValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required, nullable)

### NodeInputCompiledNumberValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required, nullable)

### NodeInputCompiledJsonValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)

### NodeInputCompiledChatHistoryValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessage, required, nullable)

### NodeInputCompiledSearchResultsValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `SEARCH_RESULTS`
- `value` (list of SearchResult, required, nullable)

### NodeInputCompiledErrorValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `ERROR`
- `value` (VellumError, required, nullable)

### NodeInputCompiledArrayValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of VellumValue, required, nullable)

### NodeInputCompiledFunctionCallValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCall, required, nullable) — The final resolved function call value.

### NodeInputCompiledSecretValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `SECRET`
- `value` (VellumSecret, required)

### NodeInputCompiledAudioValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `AUDIO`
- `value` (VellumAudio, required, nullable)

### NodeInputCompiledVideoValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `VIDEO`
- `value` (VellumVideo, required, nullable)

### NodeInputCompiledImageValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `IMAGE`
- `value` (VellumImage, required, nullable)

### NodeInputCompiledDocumentValue

- `node_input_id` (string, required)
- `key` (string, required)
- `type` (enum, required)
  - Allowed values: `DOCUMENT`
- `value` (VellumDocument, required, nullable)

### NodeOutputCompiledStringValue

An output returned by a node that is of type STRING.

- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required, nullable)
- `node_output_id` (string, required)
- `state` (enum, optional) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`

### NodeOutputCompiledNumberValue

An output returned by a node that is of type NUMBER.

- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required, nullable)
- `node_output_id` (string, required)
- `state` (enum, optional) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`

### NodeOutputCompiledJsonValue

An output returned by a node that is of type JSON.

- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)
- `node_output_id` (string, required)
- `state` (enum, optional) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`

### NodeOutputCompiledChatHistoryValue

An output returned by a node that is of type CHAT_HISTORY.

- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessage, required, nullable)
- `node_output_id` (string, required)
- `state` (enum, optional) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`

### NodeOutputCompiledSearchResultsValue

An output returned by a node that is of type SEARCH_RESULTS.

- `type` (enum, required)
  - Allowed values: `SEARCH_RESULTS`
- `value` (list of SearchResult, required, nullable)
- `node_output_id` (string, required)
- `state` (enum, optional) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`

### NodeOutputCompiledErrorValue

An output returned by a node that is of type ERROR.

- `type` (enum, required)
  - Allowed values: `ERROR`
- `value` (VellumError, required, nullable)
- `node_output_id` (string, required)
- `state` (enum, optional) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`

### NodeOutputCompiledArrayValue

An output returned by a node that is of type ARRAY.

- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of VellumValue, required, nullable)
- `node_output_id` (string, required)
- `state` (enum, optional) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`

### NodeOutputCompiledFunctionCallValue

An output returned by a node that is of type FUNCTION_CALL.

- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCall, required, nullable) — The final resolved function call value.
- `node_output_id` (string, required)
- `state` (enum, optional) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`

### NodeOutputCompiledThinkingValue

An output returned by a node that is of type THINKING.

- `type` (enum, required)
  - Allowed values: `THINKING`
- `value` (StringVellumValue, required, nullable) — A value representing a string.
- `node_output_id` (string, required)
- `state` (enum, optional) — * `INITIATED` - INITIATED * `STREAMING` - STREAMING * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `STREAMING`, `FULFILLED`, `REJECTED`

### FunctionCallChatMessageContentValueRequest

The final resolved function call value.

- `name` (string, required)
- `arguments` (map from string to any, required)
- `id` (string, optional, nullable)

### ArrayChatMessageContentItemRequest

### ChatMessageContent

### SearchResultDocument

- `label` (string, required) — The human-readable name for the document.
- `id` (string, optional, nullable) — The ID of the document.
- `external_id` (string, optional, nullable) — The unique ID of the document as represented in an external system and specified when it was originally uploaded.
- `metadata` (map from string to any, optional, nullable) — A previously supplied JSON object containing metadata that can be filtered on when searching.

### SearchResultMeta

- `source` (SearchResultMetaSource, optional, nullable)

### NumberVellumValue

A value representing a number.

- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required, nullable)

### JsonVellumValue

A value representing a JSON object.

- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)

### AudioVellumValue

A base Vellum primitive value representing audio.

- `type` (enum, required)
  - Allowed values: `AUDIO`
- `value` (VellumAudio, required, nullable)

### VideoVellumValue

A base Vellum primitive value representing a video.

- `type` (enum, required)
  - Allowed values: `VIDEO`
- `value` (VellumVideo, required, nullable)

### ImageVellumValue

A base Vellum primitive value representing an image.

- `type` (enum, required)
  - Allowed values: `IMAGE`
- `value` (VellumImage, required, nullable)

### DocumentVellumValue

A base Vellum primitive value representing a document.

- `type` (enum, required)
  - Allowed values: `DOCUMENT`
- `value` (VellumDocument, required, nullable)

### FunctionCallVellumValue

A value representing a Function Call.

- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCall, required, nullable) — The final resolved function call value.

### ErrorVellumValue

A value representing an Error.

- `type` (enum, required)
  - Allowed values: `ERROR`
- `value` (VellumError, required, nullable)

### ArrayVellumValue

A value representing an array of Vellum variable values.

- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of VellumValue, required, nullable)

### ChatHistoryVellumValue

A value representing Chat History.

- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessage, required, nullable)

### SearchResultsVellumValue

A value representing Search Results.

- `type` (enum, required)
  - Allowed values: `SEARCH_RESULTS`
- `value` (list of SearchResult, required, nullable)

### ThinkingVellumValue

A value representing Thinking mode output.

- `type` (enum, required)
  - Allowed values: `THINKING`
- `value` (StringVellumValue, required, nullable) — A value representing a string.

### PromptNodeResultData

- `output_id` (string, required)
- `execution_meta` (PromptNodeExecutionMeta, optional, nullable) — The subset of the metadata tracked by Vellum during prompt execution that the request opted into with `expand_meta`.
- `array_output_id` (string, optional, nullable)
- `execution_id` (string, optional, nullable)
- `text` (string, optional, nullable)
- `delta` (string, optional, nullable)

### SearchNodeResultData

- `results_output_id` (string, required)
- `results` (list of SearchResult, required) — The results of the search. Each result represents a chunk that matches the search query.
- `text_output_id` (string, required)
- `text` (string, optional, nullable)

### TemplatingNodeResultData

- `output` (TemplatingNodeResultOutput, required)

### CodeExecutionNodeResultData

- `output` (CodeExecutionNodeResultOutput, required)
- `log_output_id` (string, optional, nullable)

### ConditionalNodeResultData

- `source_handle_id` (string, optional, nullable)

### ApiNodeResultData

- `text_output_id` (string, required)
- `json_output_id` (string, required)
- `status_code_output_id` (string, required)
- `status_code` (integer, required)
- `json` (map from string to any, optional, nullable)
- `text` (string, optional, nullable)

### TerminalNodeResultData

- `output` (TerminalNodeResultOutput, required)

### MergeNodeResultData

- `paused_node_data` (map from string to any, optional, nullable)

### SubworkflowNodeResultData

- `execution_id` (string, optional, nullable)

### MapNodeResultData

- `execution_ids` (list of string, required)
- `iteration_state` (enum, optional, nullable) — * `INITIATED` - INITIATED * `FULFILLED` - FULFILLED * `REJECTED` - REJECTED
  - Allowed values: `INITIATED`, `FULFILLED`, `REJECTED`

### VellumSecret

- `name` (string, required)

### StringChatMessageContent

A string value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required)

### FunctionCallChatMessageContent

A function call value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCallChatMessageContentValue, required) — The final resolved function call value.

### ArrayChatMessageContent

A list of chat message content items.

- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of ArrayChatMessageContentItem, required)

### AudioChatMessageContent

An audio value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `AUDIO`
- `value` (VellumAudio, required)

### VideoChatMessageContent

A video value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `VIDEO`
- `value` (VellumVideo, required)

### ImageChatMessageContent

An image value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `IMAGE`
- `value` (VellumImage, required)

### DocumentChatMessageContent

A document value that is used in a chat message.

- `type` (enum, required)
  - Allowed values: `DOCUMENT`
- `value` (VellumDocument, required)

### SearchResultMetaSource

### PromptNodeExecutionMeta

The subset of the metadata tracked by Vellum during prompt execution that the request opted into with `expand_meta`.

- `usage` (MLModelUsage, optional, nullable)
- `cost` (Price, optional, nullable)
- `model_name` (string, optional, nullable)

### TemplatingNodeResultOutput

### CodeExecutionNodeResultOutput

### TerminalNodeResultOutput

### FunctionCallChatMessageContentValue

The final resolved function call value.

- `name` (string, required)
- `arguments` (map from string to any, required)
- `id` (string, optional, nullable)

### ArrayChatMessageContentItem

### PdfSearchResultMetaSource

The source of a search result from a PDF document.

- `document_type` (enum, required)
  - Allowed values: `PDF`
- `start_page_num` (integer, required, nullable) — The 1-indexed page number where the chunk starts in the document. Only available for supported chunking strategies and document types.
- `end_page_num` (integer, required, nullable) — The 1-indexed page number where the chunk ends in the document. Only available for supported chunking strategies and document types.

### MLModelUsage

- `output_token_count` (integer, optional, nullable)
- `input_token_count` (integer, optional, nullable)
- `input_char_count` (integer, optional, nullable)
- `output_char_count` (integer, optional, nullable)
- `compute_nanos` (integer, optional, nullable)
- `cache_creation_input_tokens` (integer, optional, nullable)
- `cache_read_input_tokens` (integer, optional, nullable)

### Price

- `value` (double, required)
- `unit` (enum, required) — * `USD` - USD
  - Allowed values: `USD`

### TemplatingNodeStringResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required, nullable)

### TemplatingNodeNumberResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required, nullable)

### TemplatingNodeJsonResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)

### TemplatingNodeChatHistoryResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessage, required, nullable)

### TemplatingNodeSearchResultsResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `SEARCH_RESULTS`
- `value` (list of SearchResult, required, nullable)

### TemplatingNodeErrorResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `ERROR`
- `value` (VellumError, required, nullable)

### TemplatingNodeArrayResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of VellumValue, required, nullable)

### TemplatingNodeFunctionCallResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCall, required, nullable) — The final resolved function call value.

### CodeExecutionNodeStringResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required, nullable)

### CodeExecutionNodeNumberResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required, nullable)

### CodeExecutionNodeJsonResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)

### CodeExecutionNodeChatHistoryResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessage, required, nullable)

### CodeExecutionNodeSearchResultsResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `SEARCH_RESULTS`
- `value` (list of SearchResult, required, nullable)

### CodeExecutionNodeErrorResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `ERROR`
- `value` (VellumError, required, nullable)

### CodeExecutionNodeArrayResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of VellumValue, required, nullable)

### CodeExecutionNodeFunctionCallResult

- `id` (string, required)
- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCall, required, nullable) — The final resolved function call value.

### TerminalNodeStringResult

- `name` (string, required) — The unique name given to the terminal node that produced this output.
- `type` (enum, required)
  - Allowed values: `STRING`
- `value` (string, required, nullable)
- `id` (string, optional, nullable)

### TerminalNodeNumberResult

- `name` (string, required) — The unique name given to the terminal node that produced this output.
- `type` (enum, required)
  - Allowed values: `NUMBER`
- `value` (double, required, nullable)
- `id` (string, optional, nullable)

### TerminalNodeJsonResult

- `name` (string, required) — The unique name given to the terminal node that produced this output.
- `type` (enum, required)
  - Allowed values: `JSON`
- `value` (any, required, nullable)
- `id` (string, optional, nullable)

### TerminalNodeChatHistoryResult

- `name` (string, required) — The unique name given to the terminal node that produced this output.
- `type` (enum, required)
  - Allowed values: `CHAT_HISTORY`
- `value` (list of ChatMessage, required, nullable)
- `id` (string, optional, nullable)

### TerminalNodeSearchResultsResult

- `name` (string, required) — The unique name given to the terminal node that produced this output.
- `type` (enum, required)
  - Allowed values: `SEARCH_RESULTS`
- `value` (list of SearchResult, required, nullable)
- `id` (string, optional, nullable)

### TerminalNodeErrorResult

- `name` (string, required) — The unique name given to the terminal node that produced this output.
- `type` (enum, required)
  - Allowed values: `ERROR`
- `value` (VellumError, required, nullable)
- `id` (string, optional, nullable)

### TerminalNodeArrayResult

- `name` (string, required) — The unique name given to the terminal node that produced this output.
- `type` (enum, required)
  - Allowed values: `ARRAY`
- `value` (list of VellumValue, required, nullable)
- `id` (string, optional, nullable)

### TerminalNodeFunctionCallResult

- `name` (string, required) — The unique name given to the terminal node that produced this output.
- `type` (enum, required)
  - Allowed values: `FUNCTION_CALL`
- `value` (FunctionCall, required, nullable) — The final resolved function call value.
- `id` (string, optional, nullable)

## Examples

**Request**

```json
{
  "inputs": [
    {
      "name": "string",
      "type": "STRING",
      "value": "string"
    }
  ]
}
```

**Response**

```json
[
  {
    "type": "json",
    "value": {
      "execution_id": "string",
      "run_id": "string",
      "external_id": "string",
      "type": "WORKFLOW",
      "data": {
        "id": "string",
        "state": "INITIATED",
        "ts": "2024-01-15T09:30:00Z",
        "output": {
          "id": "string",
          "name": "string",
          "state": "INITIATED",
          "node_id": "string",
          "delta": "string",
          "type": "STRING",
          "value": "string"
        },
        "error": {
          "message": "string",
          "raw_data": {},
          "code": "WORKFLOW_INITIALIZATION",
          "stacktrace": "string"
        },
        "outputs": [
          {
            "id": "string",
            "name": "string",
            "type": "STRING",
            "value": "string"
          }
        ],
        "inputs": [
          {
            "id": "string",
            "name": "string",
            "type": "STRING",
            "value": "string"
          }
        ]
      }
    }
  }
]
```

**SDK Code**

```python
import requests

url = "https://predict.vellum.ai/v1/execute-workflow-stream"

payload = { "inputs": [
        {
            "name": "string",
            "type": "STRING",
            "value": "string"
        }
    ] }
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```typescript
import { VellumClient } from "vellum-ai";

const client = new VellumClient({ apiKey: "YOUR_API_KEY", apiVersion: "YOUR_API_VERSION" });
const response = await client.executeWorkflowStream({
    inputs: [{
            name: "x",
            type: "STRING",
            value: "value"
        }, {
            name: "x",
            type: "STRING",
            value: "value"
        }]
});
for await (const item of response) {
    console.log(item);
}

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://predict.vellum.ai/v1/execute-workflow-stream"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"name\": \"string\",\n      \"type\": \"STRING\",\n      \"value\": \"string\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://predict.vellum.ai/v1/execute-workflow-stream")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"name\": \"string\",\n      \"type\": \"STRING\",\n      \"value\": \"string\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://predict.vellum.ai/v1/execute-workflow-stream")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"name\": \"string\",\n      \"type\": \"STRING\",\n      \"value\": \"string\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://predict.vellum.ai/v1/execute-workflow-stream', [
  'body' => '{
  "inputs": [
    {
      "name": "string",
      "type": "STRING",
      "value": "string"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://predict.vellum.ai/v1/execute-workflow-stream");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"name\": \"string\",\n      \"type\": \"STRING\",\n      \"value\": \"string\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["inputs": [
    [
      "name": "string",
      "type": "STRING",
      "value": "string"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://predict.vellum.ai/v1/execute-workflow-stream")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```