Skip to main content
Node ReferenceText Generation Node

Text Generation Node

Generate text using AI models with streaming output.

The Text Generation node calls a language model to produce text. Use it for reasoning, chat-style responses, summarization, rewriting, or code output. It streams the model's response into the node as it generates, then emits the final text downstream.

Generation, not static text
Text Generation runs a model on every execution. To pin literal text onto the canvas, use the Text node. To author a reusable instruction that feeds this node, use the Prompt node.

What it stores

  • prompt — the instruction text, either typed into the node or supplied by a connected upstream node.
  • provider and model— the selected language model. Text generation supports Google and the Vercel AI Gateway. The gateway routes additional model families; the node's model list reflects what the selected provider exposes.
  • Optional parameters: temperature, maxTokens, reasoningEffort, and textVerbosity.
  • Result and run state: generatedText, status, error, and the active executionId.
text-gen node datajson
{  "type": "text-gen",  "data": {    "prompt": "Summarize the key risks in this proposal.",    "provider": "google",    "model": "...",    "temperature": 0.7,    "maxTokens": 2048  }}

Configure and run

  1. Add a Text Generation node

    Add the node from the canvas toolbar. It opens with a default provider and model already selected so it is ready to run.

  2. Pick a provider and model

    Choose a provider, then a model from that provider's list. Switching provider resets the model to that provider's default and clears parameters the new model does not support.

  3. Provide the prompt

    Type a prompt in the node, or connect a Promptnode (or any text output) into its prompt input. When a prompt is connected, the node's own text area is disabled and shows “Supplied by connected prompt.”

  4. Generate

    Run the node. The response streams into the node body with a “Streaming...” indicator, and you can cancel an in-flight generation. The final text is shown in the result area and emitted downstream.

Parameters

ParameterRangeNotes
Temperature0–2Controls randomness. Leave blank for the provider default (“Auto”).
Max tokens1 up to the model limitCaps the output length. The allowed maximum depends on the selected provider and model; values above the model limit are rejected. Leave blank for the model default.
ReasoningModel-dependentShown only when the selected model supports reasoning effort. Set to “Auto” to defer to the model.
VerbosityModel-dependentShown only when the selected model supports text verbosity. Set to “Auto” to defer to the model.
Parameters are validated for the model
The reasoning, verbosity, and max-tokens controls only appear or accept values that the chosen provider and model actually support. Changing the model can clear a parameter that the new model does not allow, and the API rejects unsupported combinations.

Prompt input

The node reads its prompt from the connected prompt input first, then from any expression input, then from the stored prompt field. A prompt is required: if no text is resolvable at run time, the node reports that text generation requires a prompt input. Prompt text sent to the generation API is capped at 10,000 characters.

Output and execution

  • The node emits the generated text on its text-out port as a text value, so it can drive other text-aware nodes.
  • Generation streams via the /api/generate-text route. The node reflects streaming and complete status and surfaces provider errors inline.
  • Generation requests are bound to the canvas so the right workspace credentials and access policy apply, and they are subject to a request timeout. If a run exceeds it, the node reports a timeout and suggests reducing the output length or retrying.
  • The model runs against a fixed system prompt, and output is sanitized before it is stored and emitted.

Related

See Prompt for authoring inputs, Edges for how values route between nodes, and Running workflows for execution.

Was this page helpful?