> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orisu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Switch

> Route a value into one of several outputs based on natural-language conditions.

Switch is an LLM-powered multi-way router. It evaluates the value connected to its input against a list of cases and sends it through the matching case output, or through the default output if nothing matches. The value flows through unchanged; Switch only decides the route.

The case list controls how many output ports the node has. Three cases create three case outputs plus a default. Each output inherits its data type from the input, so downstream nodes receive the same kind of data.

## When to use

* Classify images by subject and route each class to a different generator
* Categorize customer feedback into support, sales, or bug channels
* Branch a workflow into format-specific tracks (square, vertical, landscape)
* Pick a prompt strategy based on the input asset type

## Inputs

<ParamField body="Input" type="dynamic" required>
  The value to route. Required. Its type determines the type of every output port.
</ParamField>

<ParamField body="Evaluation context" type="any">
  Extra context the model may consider when matching cases: text, images, or any mix. This context is not routed. Optional, accepts multiple inputs and an array.
</ParamField>

## Outputs

<ParamField body="Case" type="dynamic">
  One output port per case. The input value flows through the port whose condition matches.
</ParamField>

<ParamField body="Default" type="dynamic">
  Receives the input value when no case condition matches.
</ParamField>

## Configuration

<ParamField body="cases" type="array" default="[{ label, condition }]">
  The list of cases. Each case has a `label` (used to name its output port) and a `condition` (a natural-language rule the model evaluates). Add up to 16 cases. Every case must have a non-empty label and condition.
</ParamField>

<Note>
  Switch runs on a selectable model (default Gemini 2.5 Flash) to evaluate conditions and consumes credits when it runs.
</Note>
