KIE Grok Imagine (T2I)
KIE Grok Imagine (T2I)
- image
- task_id
Grok Imagine is xAI's image model - the one that's notable for being the most permissive of the big closed labs' offerings, with a "spicy" mode the others won't touch. This node puts it in ComfyUI: prompt in, image batch out. But the real reason to pick this over the pack's other image nodes is the second output - a task_id that lets you chain straight into Grok's video pipeline without ever round-tripping through your disk.
The pack's README is explicit about the intended shape: Grok T2I produces the image and its server-side task reference, and the Grok I2V node can consume that task_id directly. That's the workflow this node was built for.
How it works
Standard KIE job lifecycle, image edition. The node POSTs a createTask with the grok-imagine/text-to-image model id, your prompt (up to 5000 chars), and the aspect ratio, then polls recordInfo every 10 seconds (300-second timeout, automatic retry on transient failures). On success it downloads the image(s) into a ComfyUI batch and returns them alongside the task id from the server.
The inputs that matter
- prompt - the only required input, default empty. Grok Imagine leans on clear prose; describe the shot.
- aspect_ratio -
1:1default; options are 2:3, 3:2, 1:1, 9:16, 16:9. No resolution knob here - the model handles it, and you get whatever batch of images comes back.
Two outputs, and don't sleep on the second:
- image - the generated batch, a normal
IMAGEfor preview/save/upscale. - task_id - a
STRING. Feed this into KIE Grok Imagine (I2V) to animate one of the generated frames server-side, and pair it with theindexfield there (0–5) to pick which image in the batch moves.
Installing
One install for the whole pack. ComfyUI Manager: search "ComfyUI Kie API". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/gateway/ComfyUI-Kie-API
# restart ComfyUI
No model files. API key at config/kie_key.txt in the pack folder (copy from kie_key.example.txt).
Where people get burned
The task_id is only useful if you use it in the same session while the task is still valid - don't treat it as a permanent asset handle. And remember what you're signing up for: Grok is the permissive one, but permissive is not unrestricted, and the "spicy" content modes on Grok's video side only work when you're chaining from a Grok task_id (the pack's docs flag exactly that). If an image job fails, the console state log and kie.ai/logs show the server-side reason; the usual suspects are a dead balance or a prompt tripping a content filter. Check credits before a long batch - Grok image runs add up fast.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| aspect_ratioopt | COMBO | 1:1 | 5 options: 2:3, 3:2, 1:1, 9:16, 16:9 |
| logopt | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| task_id | STRING | — |