Relay Text Generator
An LLM That Lives in Your Graph (and Runs in Someone Else's Cloud)
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- text
- response
RelayTextGenerator is a language model in your ComfyUI graph that doesn't touch your GPU at all. It takes a prompt, calls a relay station's text API, and returns the reply as a STRING you can feed anywhere - a prompt-enhancement pass before your image node, a caption for a reference image, dialogue for a video, or just a general text generator sitting in the graph. Same shape as the local LLM-in-graph nodes, with one difference: the model lives in the cloud and the job is billed per call.
That difference decides when you reach for it. For prompt rewriting and captioning, the community's center of gravity is a small local LLM - free per call, offline, uncensored, and usually enough for the job (the KB's rule of thumb: the job wants small-and-obedient, not frontier-clever). You use this node when you want actual frontier-chat quality - Gemini or Claude or Grok-size - and you're fine with the tradeoffs that come with it: inputs leave your machine and the API's filters apply. For that use case it's a two-minute setup, because the model is a dropdown, not a download.
How it works
Settings feeds it info, and it dispatches on platform and api_format:
- GeminiText - hits the Gemini endpoints (
v1beta/modelsorv1/chat/completions) with models likegemini-3.1-flash-lite-preview/gemini-3-pro-preview. - OpenaiText - restricted to
v1/chat/completions(or the RunningHub LLM route), withclaude-opus-4-6,grok-4.1, or whatever you add. runninghub-/v1- the RunningHub LLM aggregator, which auto-points the base URL athttps://llm.runninghub.aiand offers slashed model names likeanthropic/claude-opus-4.6andopenai/gpt-5.5. This is the model zoo option - one dropdown, dozens of models.
Your prompt plus up to eight optional images go up as base64 or data URIs, so this doubles as a vision model: feed it a screenshot and ask for a description, and the text output is ready to seed an image-to-video or img2img node. The seed input is local-only, never sent to the API.
Outputs
Two: text - the extracted plain-text reply (the node digs through choices/candidates/message formats and returns clean content), and response - a trimmed JSON with code, text, platform, api_format, model, elapsed time and token usage. The README is explicit that raw Gemini fields like candidates and thoughtSignature are deliberately stripped, because a verbose response can lock up a display node that has to render it. You can pipe response into a JSON-viewer node for usage tracking, but you'll usually only need text.
Installing the pack
cd ComfyUI/custom_nodes
git clone https://github.com/flywhale-666/ComfyUI-relayapi
…or find "ComfyUI-relayapi" in ComfyUI Manager and restart. No dependencies beyond what ComfyUI ships, no models to download - the model is whatever the relay serves.
Gotchas
The key/relay pairing rule applies here harder than anywhere: OpenaiText only accepts v1/chat/completions or runninghub-/v1, and the node errors out loudly if your Settings point at something else. And a security note the whole category earns: a node that holds a key and calls the network is precisely the shape that was weaponized once before in this ecosystem, so only run an open, widely-installed pack you've read. Also keep expectations in line - an LLM node makes text, not images, and its filter is the relay's filter. Use it for the jobs a local model is too small for, and let the local 8B handle the uncensored stuff.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
| infoopt | STRING | — | |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| image5opt | IMAGE | — | |
| image6opt | IMAGE | — | |
| image7opt | IMAGE | — | |
| image8opt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| response | STRING | — |