Nodes/KIE.ai Nodes Next/Grok Imagine Text to Video
ComfyUI Node

Grok Imagine Text to Video

Watch out, the duration default is 0

By felipederosilva·Created about a month ago·Updated about 22 hours ago· 3
Grok Imagine Text to Video
    • video
    • url
    • all_urls_json
    • task_id
    • raw_json
    • credits_consumed
    • credits_left
    ◄promptA couple of doors open to the right one by one randomly and stay open, to show the inside, each is either a living room, or a kitchen, or a bedroom or an office, with little people living inside.►
    ◄aspect_ratio2:3►
    ◄modenormal►
    ◄duration0.00►
    ◄resolution480p►
    ◄nsfw_checkerfalse►
    ◄timeout_seconds1200►
    ◄callback_url►

    What it is

    Prompt in, video out, nothing in between. Grok Imagine's text-to-video model at KIE Next / Video / xAI / Grok Imagine - the sibling of the Image-to-Video node in the same folder, minus the image socket. You'd pick this one when the shot exists only in your head, or when your reference still is too specific and you want the model to compose the frame itself.

    In workflow terms it's a clip generator you can bolt onto the end of anything: write the prompt with a local LLM or a Grok LLM node, generate here, then extend the result with the Video Extend node using the task_id this node emits.

    How it works

    The node posts your prompt plus the motion settings to KIE's create-task endpoint, polls until the task completes, downloads the MP4 and returns it as a native VIDEO. The whole generation is remote; your machine contributes a prompt and a wait. Results are archived under your ComfyUI output folder, which is why the preview still works after a restart.

    The inputs

    prompt (required) - up to 5000 characters, English. KIE's guidance for this endpoint is unusually concrete, and it's worth following instead of describing a still image: describe movement, action sequences, camera work and timing. "Doors open to the right one by one" beats "a room with many doors".

    Then:

    • aspect_ratio - 2:3 (default), 3:2, 1:1, 16:9, 9:16. Note the default is portrait; if you're making anything for a screen wider than a phone, change it.
    • resolution - 480p (default), 720p, 1080p.
    • duration - and here's the trap. The widget defaults to 0 while KIE documents 6–30 seconds for this model. Nothing in the schema enforces that range either; the widget's own bounds are numeric and enormous. Set the value explicitly. A run with duration 0 is not a shortcut to a fast clip.
    • mode - normal, fun, spicy. fun interprets more playfully, spicy pushes motion intensity. Nothing in this node's path restricts spicy, unlike the image-to-video node, because there's no external image involved.
    • nsfw_checker - off by default, and the tooltip's caveat is honest: filtering off means results come back as the model produced them, with no guarantee anything gets filtered. It's not a promise of anything, and provider policy still applies upstream.
    • timeout_seconds (default 1200) and callback_url (empty for normal use).

    Outputs

    video is the clip as a ComfyUI VIDEO - hand it to SaveVideo or the pack's own download/utility nodes. url is the primary result URL, all_urls_json carries every URL the task returned, task_id is the handle for chaining (Video Extend, Video Upscale, Get Task Details), raw_json is the full provider response for debugging, and credits_consumed / credits_left are floats the node also draws 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
    

    requests, Pillow, numpy, PyYAML - nothing heavy, no checkpoints. Restart ComfyUI, then paste your KIE.ai API key once under Settings → KIE.ai Nodes Next → Connection. The pack validates it before saving, keeps the full key backend-side, and supports KIE_API_KEY for headless installs. On first launch it reads KIE's docs index and generates the node menu; it re-checks that catalog about once a day, so a node that appears in other people's screenshots may simply not be in your synced list yet.

    Gotchas

    • Duration 0. The default is wrong for this endpoint - set 6 seconds or more.
    • Portrait by default. 2:3 is a choice someone made for you; override it.
    • Long clips cost and take longer, and the node blocks the queue while it waits. Don't chain five of these in one run without thinking about the timeout.
    • Video outputs need a reasonably current ComfyUI. The pack materialises VIDEO through ComfyUI's newer comfy_api helper and raises an explicit "update ComfyUI" error if your build predates it.
    • No key → No KIE API key configured. Settings step, not a graph problem.
    • Prompt shape matters more than length. Motion words, not adjectives.
    CategoryKIE Next/Video/xAI/Grok Imagine

    Inputs (8)

    NameTypeDefaultDescription
    promptSTRINGA couple of doors open to the right one by one randomly and stay open, to show the inside, each is either a living room, or a kitchen, or a bedroom or an office, with little people living inside.Text prompt describing the desired video motion. Required 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
    aspect_ratiooptCOMBO2:3Specifies the width-to-height ratio of the generated video. Controls the aspect ratio of the output. - **2:3**: Portrait orientation (vertical) - **3:2**: Landscape orientation (horizontal) - **1:1**: Square format - **16:9**: Wide screen format - **9:16**: Tall screen format Default: 2:3
    modeoptCOMBOnormalSpecifies the generation mode affecting the style and intensity of motion. - **fun**: More creative and playful interpretation - **normal**: Balanced approach with good motion quality - **spicy**: More dynamic and intense motion effects Default: normal
    durationoptFLOAT0.00-10000–10000The duration of the generated video (in seconds) (6-30). (Minimum: 6, Maximum: 30, Step: 1)
    resolutionoptCOMBO480pThe resolution of the generated video.
    nsfw_checkeroptBOOLEANfalseDefaults 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_secondsoptINT120030–7200—
    callback_urloptSTRINGOptional KIE callback URL. Leave empty for normal ComfyUI use.

    Outputs (7)

    NameTypeDescription
    videoVIDEO—
    urlSTRING—
    all_urls_jsonSTRING—
    task_idSTRING—
    raw_jsonSTRING—
    credits_consumedFLOAT—
    credits_leftFLOAT—