# Sub-Workflow Input

> Define the inputs of a workflow that other workflows call as a Sub-Workflow. Each port has a name and a type, and pairs with a Sub-Workflow Output by route.

Source: https://nodaro.ai/docs/nodes/automate/sub-workflow-input

The **Sub-Workflow Input** node defines the inputs of a workflow that other workflows call through a [Sub-Workflow](https://nodaro.ai/docs/nodes/automate/sub-workflow) node. Each port has a name and a type, and becomes an input on the calling node. Inside the workflow, the value that arrives on a port flows to the nodes you connect to it. Pair every Sub-Workflow Input with a [Sub-Workflow Output](https://nodaro.ai/docs/nodes/automate/sub-workflow-output) to complete the route.

- Found in: Automate › Workflows
- Output: data
- API type: `sub-workflow-input`

## When to use it
- You want an image processing pipeline that other workflows can call.
- You want a video composition workflow that accepts different media each time it is called.
- You want several entry points into one workflow, one per route.

## Quick start
### Add the node

Open the workflow that other workflows will call. Press Tab on the canvas and choose **Automate › Workflows › Sub-Workflow Input**. The node receives a route ID automatically.

### Define the ports

Open the settings panel. Under **Ports**, name the first port and choose its type. Click **Add** for each further input, for example "Reference" as an image and "Prompt" as text.

### Connect the ports

Each port has its own output on the right of the node. Connect each one to the nodes that use it.

### Pair it with an output

Add a [Sub-Workflow Output](https://nodaro.ai/docs/nodes/automate/sub-workflow-output), choose this input under **Paired Input Route**, and save the workflow.

When you use **Create empty sub-workflow** in a Sub-Workflow node, the new child workflow already contains a paired Sub-Workflow Input and Sub-Workflow Output.

Workflow: Inside a callable workflow, the Prompt and Reference ports feed Generate Image, and the Sub-Workflow Output returns the image to the caller.

- Sub-Workflow Input → Generate Image (prompt, references)
- Generate Image → Sub-Workflow Output

## Outputs
The node has one output per port, colored by the port's type. When a Sub-Workflow node runs this route, each output carries the value that the caller connected to the matching input.

## Settings
| Setting | What it does |
| --- | --- |
| **Label** | The route's name. The calling Sub-Workflow node shows it in its **Route** list. |
| **Route ID** | The identifier that pairs this input with a Sub-Workflow Output. It is created automatically and cannot be edited. If it is ever empty, click **Generate**. |
| **Ports** | The inputs of the route. Each port has a name and a type: **Text**, **Image**, **Video**, **Audio** or **Any**. A new node has one port, "Input", of type **Any**. **Add** adds another port. The last port cannot be removed. |

A copy of a Sub-Workflow Input receives a new route ID, so the copy starts a separate route.

## Rules

When you save the workflow, Nodaro checks two rules. Every Sub-Workflow Input needs a Sub-Workflow Output with the same route ID, and no two Sub-Workflow Input nodes can share a route ID. A save that breaks a rule is refused, and each problem is listed.

## Credits
The Sub-Workflow Input node is free.

## Tips
- **Name ports for the caller.** "Background Video" or "Narration Text" tells the person who uses the workflow what to connect.
- **Use specific types.** A specific type, such as **Image**, catches a wrong connection early. **Any** accepts everything.
- **One port per value.** When the workflow needs an image and a prompt, give it two ports.

## Frequently asked questions

### What does the Sub-Workflow Input node do?

It defines where a callable workflow starts. Each of its ports becomes an input on the Sub-Workflow node that calls the workflow. Inside, the value that arrives on a port flows to the nodes connected to that port.

### How do I pair a Sub-Workflow Input with a Sub-Workflow Output?

Each Sub-Workflow Input gets a route ID when you add it. In the Sub-Workflow Output, choose that input under Paired Input Route. The pair forms one route through the workflow.

### Can one workflow have several Sub-Workflow Input nodes?

Yes. Each input, paired with its own output, is a separate route through the workflow. The calling Sub-Workflow node chooses which route to use.

### Which port types are there?

Text, Image, Video, Audio and Any. Any is the default. Choose the most specific type so that a wrong connection is caught early.

### Does the Sub-Workflow Input node cost credits?

No. It only passes values into the workflow and is free.
