Claude Text Generation
The plainest way to put an LLM in your graph
- client
- response
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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Text prompt for Claude | |
| seed | INT | -1-1–2147483647 | Seed for cache control. Randomizes by default to ensure fresh results each run. |
| clientopt | CLAUDE_API_CLIENT | Claude API client from Claude API Client node (optional if API key is configured in Settings) | |
| system_promptopt | STRING | Optional system prompt to guide Claude's behavior | |
| temperatureopt | FLOAT | 0.700–1 | Creativity level (0.0=focused, 1.0=creative) |
| max_tokensopt | INT | 1024256–8192 | Maximum length of response |
| use_streamingopt | BOOLEAN | false | Enable streaming responses |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |