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.
What it stores
prompt— the instruction text, either typed into the node or supplied by a connected upstream node.providerandmodel— 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, andtextVerbosity. - Result and run state:
generatedText,status,error, and the activeexecutionId.
{ "type": "text-gen", "data": { "prompt": "Summarize the key risks in this proposal.", "provider": "google", "model": "...", "temperature": 0.7, "maxTokens": 2048 }}Configure and run
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.
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.
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.”
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
| Parameter | Range | Notes |
|---|---|---|
| Temperature | 0–2 | Controls randomness. Leave blank for the provider default (“Auto”). |
| Max tokens | 1 up to the model limit | Caps 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. |
| Reasoning | Model-dependent | Shown only when the selected model supports reasoning effort. Set to “Auto” to defer to the model. |
| Verbosity | Model-dependent | Shown only when the selected model supports text verbosity. Set to “Auto” to defer to the model. |
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-outport as atextvalue, so it can drive other text-aware nodes. - Generation streams via the
/api/generate-textroute. The node reflectsstreamingandcompletestatus 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?