Grok Video Gen (PMS)
The node that hands you a URL
- source_image
- video_url
- status
Most video nodes in ComfyUI decode frames locally - the output is a big tensor you can preview and save. PMS_GrokVideoGen is not that. It hands you a URL to an MP4 sitting on xAI's servers, plus a status string. That feels weird the first time you run it, but it's the whole design: you submit a prompt, xAI renders the video in the cloud, you poll until it's done, and you get a link to download.
If you came here from a local Wan or LTX workflow, reset your expectations. This node burns API credits, not VRAM. It's for when you want Grok's video model specifically - xAI's grok-imagine-video - and you're fine waiting a few minutes and then pulling the result into your pipeline.
How it works
Mechanically: it POSTs to https://api.x.ai/v1/videos/generations with your prompt, duration, aspect ratio, and resolution, gets back a request_id, then polls GET /videos/{id} every 5 seconds for up to 5 minutes until the render is ready. The output is a URL string, not a tensor. To actually use the video, wire video_url into a node like VHS Load Video From URL (from VideoHelperSuite), which downloads and decodes it into frames you can preview, save, or pass downstream.
One honest caveat from reading the source: source_image is advertised as image-to-video, but the code's own comment admits xAI's video API wants a public URL for the start frame, and the node just attaches a data URI and hopes. Treat image-to-video here as experimental - it may silently fall back to text-to-video.
The inputs that matter
- prompt - the scene description. Feed it something structured ("a cinematic shot of…") and it does better than vague vibes.
- duration - 1–15 seconds, default 8. Longer costs more and takes longer to render.
- aspect_ratio - 16:9, 9:16, 1:1, or 4:3.
- resolution - 720p or 1080p.
- source_image - optional IMAGE start frame (see the caveat above).
- api_key - leave blank; use
.env.
The status output doubles as an error channel: on failure it returns "" for the URL and a human-readable error in status instead of crashing your workflow.
Installing it
Same story as every node in this pack: ComfyUI Manager, search "COMFYUI_PROMPTMODELS", install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS
Then put XAI_API_KEY=xai-... in the pack's .env and restart. ComfyUI >= 0.26.0 required; dependencies are just requests and Pillow - no ffmpeg needed because nothing is decoded locally.
The things people trip on
First, it's a paid API. xAI video generation bills per second of output, and there's no free tier that matters. That "100% free" in the pack's marketing? It's free software - the calls are not, and the community called this out directly on the release thread.
Second, the URL output trips up people who expect frames. If your downstream nodes are complaining, you probably connected video_url (a string) to something expecting video tensors. Route it through a video-loading node.
Third, be patient. Polling means the node blocks for however long xAI takes, which can be minutes at 1080p. That's not a hang - that's a render in progress. Let it run.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A cinematic shot of a futuristic neon city. | — |
| duration | INT | 81–15 | Duración del video en segundos (1-15). |
| aspect_ratio | COMBO | 16:9 | 4 options: 16:9, 9:16, 1:1, 4:3 |
| resolution | COMBO | 720p | 2 options: 720p, 1080p |
| source_imageopt | IMAGE | Imagen de inicio para image-to-video (opcional). | |
| api_keyopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video_url | STRING | — |
| status | STRING | — |