Nodes/ComfyUI-relayapi/Relay Video Generator
ComfyUI Node

Relay Video Generator

Grok and Veo Video, Straight From Your ComfyUI Queue

By flywhale-666·Created 5 months ago·Updated 3 months ago· 49
Relay Video Generator
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • image7
  • video
  • task_id
  • response
  • video_url
prompt
ratio16:9
size720P
duration10
seed0
info
enhance_prompttrue
enable_HDfalse

Veo and Grok video have no open weights. There is no local version, at any VRAM. RelayVideoGenerator is the API wrapper that puts them inside your workflow anyway: type a prompt, hit queue, and the node submits the job to your relay, polls until it's done, downloads the clip, and hands it back as a VIDEO object your preview node can play. It feels like magic until you get the bill - video is where a relay-API session gets expensive fast.

If that's the honest price of the capability, the pack's framing is smart: same Settings node, same info wire, and four endpoint formats to match whichever relay you use. And because video renders are slow (minutes, not seconds), the node does real work on error handling - showing you the exact endpoint, HTTP status and response snippet when a job fails, so you can tell "my key is wrong" from "the relay's backend is down" from "the model refused."

How it works

The Settings info JSON carries platform (Grok or Veo), model, api_base, api_format, and the key. Then it's an async submit-and-poll loop:

  • runninghub-/openapi/v2 - RunningHub's flow: upload any reference images, POST to /openapi/v2/{model}/text-to-video (or image-to-video), then poll /openapi/v2/query.
  • v1/video / v1/videos / v2/videos - three generic relay video formats for Grok and Veo, differing in submit and query endpoints (/v1/video/create + /v1/video/query?id=, /v1/videos + /v1/videos/{id}, and the BLT-style /v2/videos/generations). If v1/videos finishes without a URL it retries /v1/videos/{task_id}/content.

When the poll succeeds the node downloads the clip to a temp file and returns it as a video object. Models: Grok takes grok-video-3 / grok-videos (or RunningHub's rhart-video-g); Veo takes veo3.1 / veo3.1-fast / veo_3_1-lite / -4K variants / rhart-video-v3.1-fast.

Inputs and outputs that matter

  • prompt - what you want on screen.
  • ratio - Grok gets the wide set (auto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3); Veo is locked to 16:9 / 9:16.
  • size - 720P / 1080P. 4K isn't a size here: it's a model-name suffix (*-4K), because relays only honor 4K through the dedicated model.
  • duration - seconds. Grok: 6 / 10 / 15 / 30. Veo: 4 / 6 / 8.
  • enhance_prompt / enable_HD - Veo-only toggles (both true/false).
  • image1image7 - optional IMAGE inputs for image-to-video; fed to RunningHub as uploaded URLs.

Outputs: video (the loaded clip - wire it to a video preview node), task_id (grab this to re-query the job outside ComfyUI), response (trimmed JSON: URL, platform, format, and a redacted request payload), and video_url (the raw URL, if you'd rather download it yourself).

Installing the pack

cd ComfyUI/custom_nodes
git clone https://github.com/flywhale-666/ComfyUI-relayapi

…or search "ComfyUI-relayapi" in ComfyUI Manager and restart. No extra dependencies, no model files - the pack leans on requests, Pillow, and ComfyUI's built-in IO.VIDEO handling.

Gotchas

The README's troubleshooting table is worth quoting from experience. Expecting value: line 1 column 1 means the relay returned empty or non-JSON - almost always a key/base/endpoint mismatch. PUBLIC_ERROR_UNSAFE_GENERATION is the model's safety filter doing its job; no node or relay setting bypasses it. Pick Grok 1080P and get 720 back? The node did send resolution: 1080p - the relay or channel simply ignored the tier, and there's nothing you can do but switch channels. And "当前分组上游负载已饱和" ("current group upstream saturated") is the relay's backend being congested - switch keys/groups or wait. The poller also bails out after ~30 seconds of consecutive query failures rather than burning ten minutes on a dead endpoint. Video is the slow, expensive, occasionally frustrating corner of the pack - but it's the only way to get Grok or Veo clips into your graph at all.

CategoryRelayAPI

Inputs (15)

NameTypeDefaultDescription
promptSTRING
ratioCOMBO16:98 options: auto, 16:9, 9:16, 1:1, 4:3, 3:4, +2
sizeCOMBO720P2 options: 720P, 1080P
durationCOMBO106 options: 6, 10, 15, 30, 4, 8
seedINT00–18446744073709550000
infooptSTRING
enhance_promptoptCOMBOtrue2 options: true, false
enable_HDoptCOMBOfalse2 options: true, false
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
image5optIMAGE
image6optIMAGE
image7optIMAGE

Outputs (4)

NameTypeDescription
videoVIDEO
task_idSTRING
responseSTRING
video_urlSTRING