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

# Data Types

> Every data type Runchat understands (text, image, video, audio, mesh, etc.), how casting works between types, and the colour code on edges and parameters.

Every value flowing between nodes has a type. Runchat colour-codes parameters and edges by type so you can see at a glance what kind of data is moving. When you connect parameters of different types, Runchat automatically casts the value, and you'll see a gradient edge to indicate the cast.

## Files and URLs

Images, videos, audio, 3D meshes, PDFs and other binary files are always uploaded to Runchat's storage and represented as URL strings. This keeps workflow file sizes small and latency low. When you wire a file output into another node, what flows is the URL, not the file content.

## Objects

JSON objects are key-value structures used to represent properties of things. Many third-party APIs (language models, YouTube, Maps, etc.) return data as objects, so Runchat works with them natively.

```json theme={null}
{
  "key": "value",
  "nested": {
    "another": "object"
  }
}
```

The Object input lets you build keys and values directly, including nested objects.

## Lists and arrays

All parameter data is stored internally as an array. When a parameter holds more than one item, the node shows pagination controls so you can step through inputs and outputs. List behaviour (each, all, flatten) is controlled by **depth**, not by a separate "list" type. See [Data Structure](/concepts/data/data-structure) for how depth works.

## Casting between types

You can connect any two parameters. Runchat casts the value automatically using these rules:

* **To text**: numbers and booleans stringify; messages and contexts extract their text content; images use their flattened URL.
* **To number**: text parses to a number (0 if not parseable); booleans become 1 or 0.
* **To boolean**: text "true" (case-insensitive) becomes true, anything else false.
* **To object**: messages and contexts extract as JSON; images become `{ imageUrl, layers }`; text is parsed as JSON.
* **To message or context**: URL strings become image messages; PDFs become file data.
* **To URL**: extracts the URL from messages or images; text passes through.
* **To code, markdown or HTML**: extracts code blocks or text from messages.

Cast edges render as a gradient between the source and target type colours.

## Type reference

The full list of types Runchat understands. Connect any two and casting is automatic.

### Text

| Colour                                                                                                                                                                 | Type       | Notes                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ----------------------- |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 260)" }} /> | `string`   | Plain text              |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 260)" }} /> | `markdown` | Markdown-formatted text |

### Numbers and logic

| Colour                                                                                                                                                                 | Type      | Notes                             |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | --------------------------------- |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 300)" }} /> | `number`  | Numeric value, integer or decimal |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 300)" }} /> | `boolean` | True or false                     |

### Code and markup

| Colour                                                                                                                                                                 | Type     | Notes                                        |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------- |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 280)" }} /> | `code`   | Source code, any language                    |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 280)" }} /> | `html`   | HTML markup                                  |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 280)" }} /> | `format` | JSON schema or other formatting instructions |

### Media

| Colour                                                                                                                                                                 | Type    | Notes                              |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ---------------------------------- |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.75 0.17 80)" }} />  | `image` | URL string, optionally with layers |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 25)" }} />  | `video` | URL string                         |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 0)" }} />   | `audio` | URL string                         |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 170)" }} /> | `mesh`  | 3D model URL (.glb, .ply, etc.)    |

### Files and identifiers

| Colour                                                                                                                                                                | Type    | Notes                       |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------------------------- |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 55)" }} /> | `file`  | Generic file URL            |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 55)" }} /> | `pdf`   | PDF document URL            |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 55)" }} /> | `model` | Generative model identifier |

### Chat

| Colour                                                                                                                                                                 | Type      | Notes                                       |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------------------------- |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 200)" }} /> | `message` | A single chat message with role and content |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 200)" }} /> | `context` | A collection of messages                    |

### Collections

| Colour                                                                                                                                                                | Type     | Notes         |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------- |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 70)" }} /> | `object` | JSON object   |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 70)" }} /> | `array`  | List of items |

### UI and control

| Colour                                                                                                                                                                 | Type          | Notes                                       |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------------- |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 145)" }} /> | `instruction` | Instructional text passed to an agent       |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 145)" }} /> | `select`      | A list of choices and the current selection |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.17 145)" }} /> | `trigger`     | Signal to fire a downstream action          |
| <span style={{ display: "inline-block", width: "1rem", height: "1rem", borderRadius: "0.25rem", verticalAlign: "middle", backgroundColor: "oklch(0.55 0.05 0)" }} />   | `null`        | Absence of a value                          |

## Next steps

* [Data Structure](/concepts/data/data-structure): how depth, "each" and "all" control list behaviour
* [Data Matching](/concepts/data/data-matching): how Runchat lines up multiple inputs across runs
* [Connecting Nodes](/concepts/editor/connecting-nodes): drawing edges, references, and published parameters
