Nodes/ComfyUI-relayapi/Relay Text Generator
ComfyUI Node

Relay Text Generator

An LLM That Lives in Your Graph (and Runs in Someone Else's Cloud)

By flywhale-666·Created 5 months ago·Updated 3 months ago· 49
Relay Text Generator
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • image7
  • image8
  • text
  • response
prompt
seed0
info

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/models or v1/chat/completions) with models like gemini-3.1-flash-lite-preview / gemini-3-pro-preview.
  • OpenaiText - restricted to v1/chat/completions (or the RunningHub LLM route), with claude-opus-4-6, grok-4.1, or whatever you add.
  • runninghub-/v1 - the RunningHub LLM aggregator, which auto-points the base URL at https://llm.runninghub.ai and offers slashed model names like anthropic/claude-opus-4.6 and openai/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.

CategoryRelayAPI

Inputs (11)

NameTypeDefaultDescription
promptSTRING
seedINT00–18446744073709550000
infooptSTRING
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
image5optIMAGE
image6optIMAGE
image7optIMAGE
image8optIMAGE

Outputs (2)

NameTypeDescription
textSTRING
responseSTRING