Grok Imagine - Video Extend
Add seconds to a clip you already paid for
- video
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
What it is
A continuation node. You don't feed it a video - you feed it the task ID of a video KIE already generated, plus a prompt describing what happens next, and it returns a longer clip. KIE Next / Video / xAI / Grok Imagine.
This is the node that makes the pack's task_id outputs worth wiring up. In the Grok Imagine folder, Text to Video, Image to Video and Video 1.5 Preview all emit a task ID and a VIDEO; this node wants the task ID. That asymmetry trips people up constantly, because the graph has a perfectly good video sitting right there and the extend node will not accept it.
Why bother extending instead of generating a longer clip up front? Because continuation is cheaper than re-rolling: you keep the motion, the lighting and the framing you already got, and ask the model to carry on from where it stopped. It's the difference between a director saying "keep going" and "start over".
How it works
The node submits a task referencing the source task ID, the continuation prompt, and the extension settings, then polls until complete and downloads the resulting video as a native VIDEO. All of it happens on KIE's side; the source clip is never re-uploaded from your machine, because KIE already has it - which is exactly why only KIE-generated task IDs work here.
The inputs
Required:
- task_id - the source. Per the tooltip it must come from a Kie AI video generation task, the original must have completed successfully, and only KIE-generated task IDs are supported. Wire it from the
task_idoutput of one of the Grok Imagine video nodes. A local render's ID means nothing to this endpoint. - prompt - the continuation. KIE's guidance is to be specific about camera movement, scene changes and object actions, and English or Chinese both work. Vague here produces a video that just drifts.
Optional:
- extend_at - float, default
2. The starting position for the extension, per the tooltip "the starting position of the video extension". - extend_times - float, default
0, documented as the duration of the extension in seconds with6or10as the intended values. Treat the 0 like the video nodes' other loose defaults: set it deliberately to 6 or 10, or don't be surprised by what comes back. Longer extensions take longer to generate. - timeout_seconds (default 1200) and callback_url - the usual plumbing; leave the callback empty for normal ComfyUI use.
Outputs
video is the extended clip. url and all_urls_json give the hosted files; task_id is the new task, which means you can chain extends to keep adding seconds, and it's also the input for the folder's Video Upscale node. raw_json is the provider response - the place to look when an extend fails, because "the task ID was from the wrong model" is a common and entirely invisible failure otherwise. credits_consumed and credits_left report the cost as a pair of floats, and the node also draws them on itself after a successful run.
Install
ComfyUI 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 light dependencies, no model files, no VRAM. Restart ComfyUI and set your KIE.ai key once at Settings → KIE.ai Nodes Next → Connection; it's checked against KIE before saving, stored backend-side, and shown back to you only as a masked fingerprint. The pack builds its node library from KIE's API docs on first launch and re-checks it roughly daily - expect one frontend reload during the first sync, and refresh the catalog rather than reinstalling if a node is missing.
Gotchas
- Task IDs only, and only KIE's. Your local video can't be extended by this node. No upload field exists, and that's by design.
- The
extend_timesdefault is not a duration. 0 is a placeholder in a field whose docs describe 6 and 10. - Extends cost like generations, because they are generations - you're paying for six more seconds of compute, not for a cheap slice.
- Success depends on the source task, so if the original task was deleted or failed upstream, expect an error that reads like a bad ID.
- Cross-model IDs are the classic mistake. A task from a different video model won't continue the clip you pinned to your graph.
- No key →
No KIE API key configured.Settings, one time.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| task_id | STRING | task_grok_12345678 | Task ID from a previously successful video generation task. Required field. - Must be from a Kie AI video generation model (e.g., grok-imagine/text-to-video) - The original video generation must have completed successfully - Only Kie AI–generated task IDs are supported |
| prompt | STRING | Text instructions describing the required movement of the video. Required field. - Provide a detailed description of how you would like the video to expand and continue. - You can specify camera movements, scene changes, object actions, etc. - The more specific the prompt words are, the more likely the generated effect will match your expectations. - Supports input in both Chinese and English. | |
| extend_at | FLOAT | 2.002–10000 | The starting position of the video extension. Optional field. |
| extend_times | FLOAT | 0.00-10000–10000 | Duration of video extension (in seconds). Required field. - `6`: Expand 6 seconds of video content - `10`: Expand 10 seconds of video content - The longer the extension duration, the longer the time required for generation - Select the appropriate duration based on the complexity of the scene |
| 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 | — |