Grok Submit
Queue a Grok image-to-video job without blocking your whole graph
- image
- request_id
GrokSubmit is the fire-and-forget half of the Grok video pair: it takes the same image, prompt, and duration settings as Grok Generate, sends the job to x.ai, records it in the pack's jobs.lock, and returns immediately with a request_id - without waiting for the clip to render. Grok Collect is the other half, and it picks the finished mp4 up on a later queue.
Why bother with the two-step dance when Grok Generate does it all in one node? Because cloud video generation is slow, and if you're churning out frames locally you don't want your queue to sit parked for ten minutes waiting on one clip. Submit gets the request into x.ai's hands and frees your graph to do other work. It's the same pattern the pack's API nodes use, and it's the right one for anything with a long cloud round-trip.
How it works
The mechanics mirror Grok Generate exactly - image tensor to data URL, request body built from prompt / duration / resolution / model, credentials resolved from node inputs or the GROK_ACCESS_TOKEN / GROK_REFRESH_TOKEN / GROK_CLIENT_ID env vars. The differences are in what happens after.
GrokSubmit is an output node, so it runs even if nothing consumes its output. On each queue it re-submits (its change-detection always fires), but only if the "grok" slot in the shared jobs.lock is free. If a Grok job is already in flight, it skips and returns an empty request_id. One job of this kind at a time - an API job and a Grok job can run concurrently, but not two Grok jobs.
One genuinely nice detail: the mp4 output path is reserved at submit time and recorded in the lock, so when Collect eventually writes the clip it lands at a stable, predictable path rather than wherever the download happens to land. Your optional label is stored with the job and handed back by Grok Collect later, so you can tell which clip you just collected in a loop.
The single output is request_id - a STRING, empty when a Grok job is already queued.
Inputs
Same required set as Grok Generate: image, prompt, duration, resolution, model, filename_prefix. The optional extras are the three credential inputs and label. Notably there's no timeout or poll_interval - nothing to wait on.
Install
Part of ComfyUI-Alchemine-Pack:
cd ComfyUI/custom_nodes
git clone https://github.com/alchemine/comfyui-alchemine-pack
pip install -r requirements.txt
Or via ComfyUI Manager (search "ComfyUI-Alchemine-Pack"). Only dependency is python-dotenv; no model downloads. Your Grok credentials are the actual requirement.
Common issues
Empty request_id is the thing that will confuse you first - it means a Grok job is already in flight, and the submit was intentionally skipped. That's queue discipline, not a bug. If you're not seeing the clip ever arrive, make sure you actually run the graph again with Grok Collect downstream; submit alone just parks the job in the lock file. And the same credential gotchas as Grok Generate apply: a revoked refresh token or client_id surfaces as Grok token refresh failed (...), and the fix is re-authenticating at x.ai, not poking the node.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt | STRING | — | |
| duration | INT | 51–15 | — |
| resolution | COMBO | 2 options: 720p, 480p | |
| model | STRING | grok-imagine-video-1.5-preview | — |
| filename_prefix | STRING | grok/GrokVideo | — |
| access_tokenopt | STRING | — | |
| refresh_tokenopt | STRING | — | |
| client_idopt | STRING | — | |
| labelopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| request_id | STRING | — |