Text Nodes
Text nodes handle text input, prompt creation, and text processing for your workflows. There are three text nodes: Text Prompt, Prompt Expander, and Text Preview.
Text Prompt
Define text content for your workflow
The Text Prompt node is the primary way to input text into your workflow. Use it for AI prompts, descriptions, or any text data that downstream nodes consume.
| Property | Description |
|---|---|
| Inputs | input (flow) |
| Outputs | output (text) |
Configuration:
- Prompt - The text content (supports multi-line)
Variable substitution:
When used inside a batch loop (connected to a BatchProcessor), the Text Prompt node automatically substitutes variables from the current batch item using {{fieldName}} syntax:
A photo of {{subject}} in {{style}} style
If the current batch item ($item) is:
{
"subject": "a cat",
"style": "watercolor"
}
Result: A photo of a cat in watercolor style
Variables that don't match any field in the batch item are left unchanged.
Best practices:
- Be specific and detailed for AI prompts
- Use variable substitution with batch processing for reusable prompt templates
- Include style, mood, and quality descriptors for image/video generation
Prompt Expander
Enhance and expand prompts using AI
Takes the current prompt text from the flow context and expands it into a more detailed, effective prompt using the OpenRouter chat API in prompt expansion mode.
| Property | Description |
|---|---|
| Inputs | input (text) |
| Outputs | output (text) |
Configuration:
| Setting | Description |
|---|---|
| Style Preset | Expansion style (e.g., cinematic, photographic, artistic) |
| Length | Target output length (default: 50) |
How it works:
The Prompt Expander calls the openrouter-chat edge function in prompt_expand mode. It sends the current prompt text along with the configured style preset and length, then receives an expanded version of the prompt.
Example:
Input:
A sunset over mountains
Output (cinematic style):
A breathtaking sunset over majestic mountain peaks,
with warm golden and orange hues painting the sky,
dramatic clouds catching the last rays of light,
snow-capped summits silhouetted against the vibrant
horizon, serene alpine lake reflecting the colors below
Use cases:
- Improve simple prompts before image or video generation
- Add artistic or cinematic detail automatically
- Maintain consistent quality across prompts
Credit cost: Uses credits for the AI expansion call.
Text Preview
Visualize text at any point in a workflow
A passthrough node that displays text content without performing any transformations or API calls. Useful for debugging or inspecting prompt text mid-workflow.
| Property | Description |
|---|---|
| Inputs | input (text) |
| Outputs | output (text) |
How it works:
- Accepts text as a direct string input or extracts
promptTextfrom a FlowContext object - If no input is connected, falls back to the current
promptTextin the flow context - Passes the text through unchanged -- no API calls, no transformations
Use cases:
- Inspect prompt text between nodes during workflow design
- Debug variable substitution results
- Preview expanded prompts before generation
Text Processing Tips
Combining Text Nodes
Build complex prompts by combining nodes:
Text Prompt → Prompt Expander → Text to Image
Or use Characteristics to add character details:
Text Prompt → Characteristics → Brain → Text to Image
Using Variables with Batch Processing
Create reusable templates by connecting a DataFeed to a BatchProcessor, then using variable substitution in Text Prompt:
DataFeed → BatchProcessor → Text Prompt → Text to Image → BatchEnd
With the prompt template: Product: {{name}}, Style: {{style}}
Prompt Quality
For best AI generation results:
- Be specific - Include details about subject, style, lighting
- Use descriptors - Add quality terms (professional, high-quality, detailed)
- Specify composition - Mention camera angle, framing, background
- Use Prompt Expander - Let AI enhance your prompts with a style preset
Example high-quality prompt:
Professional product photography of a sleek smartwatch,
centered composition, soft studio lighting, white
background with subtle gradient, sharp focus on the
watch face, premium feel, 4K quality, commercial
photography style