Nodes/ERPK Collection/Claude Text Generation
ComfyUI Node

Claude Text Generation

The plainest way to put an LLM in your graph

By eRepublik-Labs·Created 12 months ago·Updated 4 days ago· 2
Claude Text Generation
  • client
  • response
◄prompt►
◄seed-1►
◄system_prompt►
◄temperature0.70►
◄max_tokens1024►
◄use_streamingfalse►
◄model(inherit from client)►
◄effort(model default)►

Sometimes you don't need a controlnet or a LoRA - you need a decent writer in the middle of your graph. Claude Text Generation is that: a one-shot text completion node that takes a prompt and hands you back a STRING. It's the backbone you'll use for prompt enhancement, writing captions, summarizing your own workflow's output, or any "generate some text from other text" job where the specific model matters less than the fact that it works.

The model comes from the Claude API Client node (Opus 4.7, Sonnet 4.6, Haiku 4.5, that family), which you wire into the optional client input. Don't want a client node cluttering your canvas? Fine - if your Anthropic key is set in Settings > ERPK > API Keys, it runs standalone and picks up the default. Each generation is a regular Anthropic Messages API call, with prompt caching and streaming support built into the pack.

The inputs that actually matter

  • prompt - the text you're sending. Multiline, so paste away.
  • system_prompt - optional role-setting. "You are a prompt engineer. Expand this into a detailed cinematic description." This is where you get the most leverage for one field.
  • temperature - 0.7 default. 0.0 is focused/repeatable, 1.0 is creative. For prompt work most people drift lower; for story beats, higher.
  • max_tokens - 1024 default, up to 8192. If your output keeps getting cut off, this is the knob.
  • use_streaming - false by default. Streaming makes responses feel faster in the UI but is rarely worth it unless you're chaining something latency-sensitive.
  • seed - cache control again, not a generation seed. Randomizing (-1, the default) forces a fresh call each queue; a fixed value lets ComfyUI reuse the previous result instead of billing you again.

The single output, response, is a plain STRING. Wire it anywhere text goes - most obviously into ERPK's own Preview Anything to read it, or into another node's prompt input.

Installing it

Part of the ERPK Collection pack. ComfyUI Manager → search erpk → install ERPK Custom Nodes, or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/eRepublik-Labs/comfyui-nodes-erpk.git erpk
cd erpk && pip install -r requirements.txt

Restart, then drop in an Anthropic API key via right-click canvas → ERPK Settings (stored in your user settings, not in the workflow). No models download - every call is paid per-token, so the node's cousin Claude Token Counter is worth a glance if you're chaining lots of these.

The usual gotcha: forgetting max_tokens exists and watching long outputs truncate mid-sentence. If that happens, bump it. And if a generation looks "stuck," check your key's billing - Anthropic quietly rate-limits exhausted accounts.

CategoryERPK/Claude

Inputs (9)

NameTypeDefaultDescription
promptSTRINGText prompt for Claude
seedINT-1-1–2147483647Seed for cache control. Randomizes by default to ensure fresh results each run.
clientoptCLAUDE_API_CLIENTClaude API client from Claude API Client node (optional if API key is configured in Settings)
system_promptoptSTRINGOptional system prompt to guide Claude's behavior
temperatureoptFLOAT0.700–1Ignored: current Claude models reject temperature (kept so saved workflows load).
max_tokensoptINT1024256–128000Maximum length of response. Thinking counts toward this limit. Current Claude models allow up to 128K.
use_streamingoptBOOLEANfalseEnable streaming responses
modeloptCOMBO(inherit from client)Override the client's model for this call. Without a client the default is the Claude API client's default model.
effortoptCOMBO(model default)How much effort Claude spends (thinking depth, tool calls, answer length). Higher costs more tokens and time. (model default) leaves the model's own default.

Outputs (1)

NameTypeDescription
responseSTRING—