Grok Imagine Image to Video
Animate a still, and the @image1 trick most people miss
- image_urls
- video
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
What it is
Take a still, say what should happen, get a video. xAI's Grok Imagine image-to-video, wrapped as a single node at KIE Next / Video / xAI / Grok Imagine. It's the API answer to the local image-to-video question - the same slot Wan and LTX occupy on your own card - with the usual trade: no VRAM, better motion coherence on hard shots, and a bill every time you press Queue.
Practical placement in a graph: still goes in from LoadImage or from an image node in the same pack (the Grok Imagine image nodes and the Image 2.0 node all emit tensors this accepts), video comes out as a native VIDEO you can SaveVideo or push into another node. If you're comparing against local: a local I2V pass is free and private, Grok's is fast and doesn't need a 24GB card. Use it for hero shots and client work, keep your local model for the 40 exploratory rolls.
How it works
Your image (or batch - this socket takes a ComfyUI image batch, and KIE documents up to seven references, though only one when you ask for 1080p) is uploaded to KIE's upload endpoint, and the resulting URLs go into the create-task request alongside prompt, mode, duration and resolution. The node then polls until the task succeeds, downloads the MP4, and returns it as a VIDEO object.
One genuinely non-obvious mechanism: you can refer to your uploaded references in the prompt by writing @image1, @image2 and so on - KIE's own documentation for this endpoint says so - so "@image1 a sunset over the ocean" tells the model which picture you mean when you've sent more than one.
The inputs
Required: image_urls (the IMAGE socket) and prompt (up to 5000 characters, English). The prompt here is motion direction, not scene description - KIE's wording is "describe movement, action sequences, camera work, and timing". The author's placeholder is a POV coffee handoff, which is exactly the right register: physical, sequential, specific.
The optionals that matter:
- mode -
normal,fun, orspicy, defaultnormal.funloosens the interpretation,spicypushes motion intensity. Read the tooltip before you plan around it: spicy is documented as unavailable for external image inputs, so with this node's upload path it's effectively off the table. - duration - a string, default
6, documented 6–30 seconds. Longer costs more and takes longer. - resolution -
480p(default),720p,1080p. 1080p restricts you to a single reference image. - task_id + index - the alternative input path. Instead of uploading, point at a previous Grok image task and select which of its images to animate (
index, 0-based 0–5, because Grok's image tasks return six images). Only works with KIE-generated tasks. - aspect_ratio - the tooltip is explicit that this only applies to multi-image generation; in single-image mode the video inherits the source image's dimensions.
- nsfw_checker - off by default, with the same honest caveat the rest of the family carries.
- timeout_seconds (1200 default) and callback_url (leave empty).
Outputs
video is the deliverable - a native VIDEO object. url and all_urls_json give the hosted result URLs, task_id is the handle you feed into Grok Imagine - Video Extend if you want more seconds, raw_json is the provider response, and credits_consumed / credits_left show what the clip cost.
Install
Manager → KIE.ai Nodes Next, or:
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
python -m pip install -r ComfyUI-KIE-Nodes-Next/requirements.txt
Four small dependencies, no weights. Restart, then set your KIE.ai key once under Settings → KIE.ai Nodes Next → Connection (or KIE_API_KEY on a server). Note for video specifically: the pack builds VIDEO outputs via ComfyUI's newer comfy_api input helper, so on an old ComfyUI build you'll get an explicit "update ComfyUI" error rather than a mystery. Keep your install reasonably current.
Gotchas
- Video jobs are the expensive ones. Everything in this category costs per call and video costs the most per call. Timeouts default to 1200 seconds for a reason.
spicywith an upload does nothing. Documented as external-image-incompatible.- 1080p + several references doesn't fit. One image, or drop to 720p.
- Extend only takes KIE task IDs. You can't extend a locally rendered clip here.
- Missing key →
No KIE API key configured.One-time Settings fix.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image_urls | IMAGE | — | |
| prompt | STRING | POV hand comes into frame handing the girl a cup of take away coffee, the girl steps out of the screen looking tired, then takes it and she says happily: "thanks! Back to work" she exits the frame and walks right to a different part of the office. | Text prompt describing the desired video motion. Optional field. - Should be detailed and specific about the desired visual motion - Describe movement, action sequences, camera work, and timing - Include details about subjects, environments, and motion dynamics - Maximum length: 5000 characters - Supports English language prompts |
| task_idopt | STRING | task_grok_12345678 | Task ID from a previously generated Grok image. Use with index to select a specific image. Do not use with image_urls. - Use task ID from grok-imagine/text-to-image generations - Supports all modes including Spicy - Maximum length: 100 characters |
| modeopt | COMBO | normal | Specifies the generation mode affecting the style and intensity of motion. Note: Spicy mode is not available for external image inputs. - **fun**: More creative and playful interpretation - **normal**: Balanced approach with good motion quality - **spicy**: More dynamic and intense motion effects (not available for external images) Default: normal |
| durationopt | STRING | 6 | The duration of the generated video (in seconds) (6-30). (Minimum: 6, Maximum: 30, Step: 1) |
| resolutionopt | COMBO | 480p | The resolution of the generated video. |
| aspect_ratioopt | COMBO | 16:9 | Image ratio selection only applies to multi-image generation mode. In single-image mode, the video width and height are referenced to the image width and height. |
| indexopt | INT | 00–5 | When using task_id, specify which image to use (Grok generates 6 images per task). Only works with task_id. - 0-based index (0-5) - Ignored if image_urls is provided - Default: 0 |
| nsfw_checkeropt | BOOLEAN | false | Defaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself. Note: There is no guarantee that everything can be filtered out; if you are not satisfied with the results, you will need to make your own arrangements. |
| timeout_secondsopt | INT | 120030–7200 | — |
| callback_urlopt | STRING | Optional KIE callback URL. Leave empty for normal ComfyUI use. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| video | VIDEO | — |
| url | STRING | — |
| all_urls_json | STRING | — |
| task_id | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| credits_left | FLOAT | — |