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

# Working with Nodes

> Understanding the building blocks of Cordage workflows

Nodes are the fundamental building blocks of Cordage workflows. Each node performs a specific function and can be connected to create complex processing pipelines.

## Node Anatomy

Every node has these common elements:

* **Header**: Shows the node type, name, and settings icon
* **Input Handles**: Connection points on the left side for receiving data
* **Output Handles**: Connection points on the right side for sending data
* **Preview Area**: Shows current state or output (for visual nodes)
* **Status Indicator**: Shows execution state (pending, running, complete, error)

## Node Categories

### Input Nodes

Input nodes provide data to your workflow. They're typically the starting points.

<AccordionGroup>
  <Accordion title="Text Input" icon="font">
    Provides text data like prompts, descriptions, or parameters.

    **Outputs:**

    * `text` - The entered text string

    **Use cases:**

    * AI model prompts
    * Configuration values
    * Labels and metadata
  </Accordion>

  <Accordion title="Image Input" icon="image">
    Upload or reference images for processing.

    **Outputs:**

    * `image` - Image URL or data

    **Use cases:**

    * Source images for transformation
    * Reference images for AI models
    * Images to enhance or edit
  </Accordion>

  <Accordion title="Video Input" icon="video">
    Upload videos for processing pipelines.

    **Outputs:**

    * `video` - Video URL or data

    **Use cases:**

    * Video-to-video AI transformations
    * Frame extraction
    * Video editing workflows
  </Accordion>

  <Accordion title="Audio Input" icon="music">
    Upload audio files for audio-related workflows.

    **Outputs:**

    * `audio` - Audio URL or data

    **Use cases:**

    * Speech-to-text processing
    * Audio enhancement
    * Music generation seed
  </Accordion>
</AccordionGroup>

### AI Model Nodes

Model nodes execute AI models from Replicate's catalog.

<AccordionGroup>
  <Accordion title="Model Node" icon="brain">
    Executes any model with customizable parameters.

    **Features:**

    * Dynamic input schema based on selected model
    * Real-time preview of outputs
    * Run history for each execution

    **Common model types:**

    * Image generation (Flux, SDXL, Stable Diffusion)
    * Image upscaling (Real-ESRGAN, Topaz)
    * Background removal (RemBG)
    * Style transfer
    * Video generation
  </Accordion>

  <Accordion title="LLM Text Node" icon="message-bot">
    Generates or transforms text using language models.

    **Inputs:**

    * `prompt` - The text prompt
    * `system` - Optional system message

    **Outputs:**

    * `text` - Generated text response

    **Use cases:**

    * Prompt enhancement
    * Text summarization
    * Content generation
  </Accordion>

  <Accordion title="Image Describer" icon="eye">
    Analyzes images and generates text descriptions.

    **Inputs:**

    * `image` - Image to analyze

    **Outputs:**

    * `description` - Text description of the image

    **Use cases:**

    * Auto-captioning
    * Content analysis
    * Accessibility metadata
  </Accordion>
</AccordionGroup>

### Tool Nodes

Tool nodes perform deterministic image operations without AI.

<AccordionGroup>
  <Accordion title="Crop Tool" icon="crop">
    Crops images to specified dimensions or aspect ratios.

    **Parameters:**

    * Aspect ratio presets (1:1, 16:9, 4:3, custom)
    * Manual crop region selection
    * Center crop option
  </Accordion>

  <Accordion title="Resize Tool" icon="up-right-and-down-left-from-center">
    Resizes images to target dimensions.

    **Parameters:**

    * Width and height (pixels or percentage)
    * Maintain aspect ratio option
    * Interpolation method
  </Accordion>

  <Accordion title="Blur Tool" icon="droplet">
    Applies blur effects to images.

    **Parameters:**

    * Blur radius/intensity
    * Blur type (gaussian, motion, etc.)
  </Accordion>

  <Accordion title="Filters Node" icon="sliders">
    Applies color and tone adjustments.

    **Parameters:**

    * Brightness, contrast, saturation
    * Hue rotation
    * Color temperature
  </Accordion>

  <Accordion title="Levels Node" icon="chart-line">
    Advanced tonal adjustments.

    **Parameters:**

    * Input/output levels
    * Gamma correction
    * Per-channel adjustments
  </Accordion>

  <Accordion title="Invert Tool" icon="circle-half-stroke">
    Inverts image colors.
  </Accordion>
</AccordionGroup>

### Utility Nodes

<AccordionGroup>
  <Accordion title="Export Node" icon="download">
    Saves workflow outputs to storage.

    **Parameters:**

    * Output format (PNG, JPEG, WebP)
    * Quality settings
    * File naming pattern

    **Features:**

    * Triggers workflow execution
    * Generates downloadable files
    * Required for webhook outputs
  </Accordion>

  <Accordion title="Compositor Node" icon="layer-group">
    Combines multiple images into one.

    **Parameters:**

    * Layer ordering
    * Blend modes
    * Position and scaling
  </Accordion>

  <Accordion title="Prompt Concatenator" icon="code-merge">
    Combines multiple text inputs into one.

    **Use cases:**

    * Building complex prompts
    * Adding style modifiers
    * Combining dynamic parts
  </Accordion>

  <Accordion title="Array Selector" icon="list-ol">
    Selects items from array outputs.

    **Parameters:**

    * Selection index
    * Random selection option
  </Accordion>

  <Accordion title="Comment Node" icon="sticky-note">
    Adds annotations to your canvas.

    **Features:**

    * Resizable text areas
    * No effect on execution
    * Great for documentation
  </Accordion>
</AccordionGroup>

### Iterator Nodes

<AccordionGroup>
  <Accordion title="Text Iterator" icon="repeat">
    Runs workflow for each line of text.

    **Inputs:**

    * Multi-line text (one item per line)

    **Outputs:**

    * Current text item (per iteration)

    **Use cases:**

    * Batch prompt processing
    * Multiple style variations
  </Accordion>

  <Accordion title="Media Iterator" icon="images">
    Runs workflow for each uploaded file.

    **Inputs:**

    * Multiple images/videos

    **Outputs:**

    * Current media item (per iteration)

    **Use cases:**

    * Batch image processing
    * Portfolio enhancement
  </Accordion>
</AccordionGroup>

### Integration Nodes

<AccordionGroup>
  <Accordion title="Webhook Node" icon="webhook">
    Exposes workflow for external triggering.

    **Features:**

    * Unique webhook URL/key
    * Input parameter mapping
    * API access control

    **See also:** [Webhooks Tutorial](/tutorials/webhooks)
  </Accordion>

  <Accordion title="Interface Node" icon="window">
    Creates custom input forms.

    **Features:**

    * Custom field definitions
    * User-friendly input interface
    * Validation rules
  </Accordion>
</AccordionGroup>

## Node Interaction

### Selecting Nodes

* **Click** to select a single node
* **Shift+Click** to add to selection
* **Drag** on empty canvas to box-select multiple nodes
* **Ctrl/Cmd+A** to select all nodes

### Moving Nodes

* **Drag** selected nodes to reposition
* Use arrow keys for precise positioning
* Nodes snap to grid by default

### Duplicating Nodes

* **Right-click** > Duplicate
* **Ctrl/Cmd+D** to duplicate selected
* Duplicated nodes retain connections where possible

### Deleting Nodes

* **Right-click** > Delete
* **Backspace/Delete** key
* Connections are automatically removed

## Node Settings

Click the **Settings** icon (gear) in a node header to open the Inspector Panel, where you can:

* Rename the node
* Configure node-specific parameters
* View execution history
* See input/output details

## Best Practices

<Tip>
  **Name your nodes** - Give descriptive names to make workflows readable.
</Tip>

<Tip>
  **Use comments** - Add Comment nodes to document complex sections.
</Tip>

<Tip>
  **Group related nodes** - Keep related operations close together visually.
</Tip>

<Tip>
  **Test incrementally** - Run partial workflows to verify each step works.
</Tip>
