Search all guides

Reference · Tools

Grok Video Gen

Generate videos from text descriptions or starting images, with adjustable duration, using xAI Grok.

Action (binary) AI v1 Binary data

Grok Video Gen produces video from a text prompt using the xAI API, with configurable duration and the option of several videos per request, delivered as binary files on the output. Use it to generate short clips inside a content pipeline — turning each approved script line into a draft video without leaving the workflow.

Works as
Action (binary)
Tool name
grok_video_gen
Parameters
5
Outputs
Output, Error
Credentials
xAI
Official docs
xAI docs docs.x.ai

What you can build with Grok Video Gen

  • Generate a video of a space scene using Grok.
  • Create a short vertical-framed video for a social media story by describing the framing in the prompt.
  • Generate a video from a text description.
  • Create a video with a cinematic prompt.
  • Generate a short social-media clip by describing the framing in the prompt.

Each of these runs as a step in a BusyBot workflow or inside an agent, so the result can be routed, filtered and sent on with the core nodes and any of the communication integrations.

Overview

Grok Video Gen submits a video generation job to xAI Grok Imagine from a text prompt, with an optional starting image for image-to-video. By default it then polls until the job is done and downloads the finished video, storing it on the output item as binary data. Set Wait For Completion off to return the job ID straight away and pick the result up later.

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires xAI credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
ModeloptionsNoPlatform defaultThe video generation model to use.
Options: the Grok Imagine video models currently available — the dropdown tracks the model catalog, so it changes as xAI’s line-up changes.
PromptstringYes—Text prompt describing the video to generate. Supports expressions like {{ $json.description }}. Falls back to the input item’s “prompt”, “text” or “description” field when left empty.
OptionscollectionNo{}Optional generation, polling and output settings — add only the fields you want to override.
— Input Image URL (image-to-video)stringNo—Optional. A still image URL (or base64 data URL) to use as the video’s starting frame (image-to-video). Supports expressions. Required for grok-imagine-video-1.5-preview (image-to-video only). Leave empty for text-to-video on grok-imagine-video.
— Input Image Binary Property (image-to-video)stringNo—Optional. Name of an upstream binary property holding an image to use as the starting frame. Used only when Input Image URL is empty. Check the upstream node’s Binary Data panel for the exact name (often “data”).
— DurationoptionsNo5Duration of the generated video in seconds (xAI accepts an integer, max 15).
Options: 5, 10, 15
— Wait For CompletionbooleanNotrueWhether to poll until the video generation is complete. If false, returns the job ID immediately.
— Poll Interval (ms)numberNo10000Milliseconds between poll requests when waiting for completion.
— Max Poll Duration (ms)numberNo600000Maximum total time to spend polling before timing out (default: 10 minutes).
— Binary Property NamestringNodataProperty name for the primary video binary output. Additional videos use video_1, video_2, etc. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
— Response Field NamestringNovideoOutput field name for the API response data.
Include InputbooleanNofalseWhether to include the original input item fields in the output.
Max ConcurrencynumberNo3Maximum number of items to process concurrently. Keep low for video generation due to heavy resource usage.

Output Data

One output item per input item. The rest of the input JSON is carried over only when Include Input is on.

  • jobId — the generation job’s ID, whether or not the node waited for it.
  • model — the model the job was submitted to.
  • status — the job status. pending when Wait For Completion is off; otherwise the terminal status the job reached.
  • video — the job record, under whatever name Response Field Name is set to. When the node waited, this is the full job response; when it did not, it is { "id": "<jobId>", "status": "pending" }.

When the node waits and the job finishes successfully, the finished video is downloaded and attached to the output item as binary data under the name given by Binary Property Name (data by default). If the job returns more than one video, the extras land under video_1, video_2, and so on. Any binary the input item already carried is preserved.

Reference the result downstream by expression, e.g. {{ $json.jobId }} or {{ $json.status }}.

Example Configuration

Generate a short video and wait for it:

{
  "type": "grok_video_gen",
  "parameters": {
    "prompt": "A timelapse of a city skyline at sunset with dramatic clouds"
  }
}

Portrait video from an item field, with a longer polling budget:

{
  "type": "grok_video_gen",
  "parameters": {
    "prompt": "{{ $json.description }}",
    "includeInput": true,
    "maxConcurrency": 1,
    "options": {
      "duration": 10,
      "waitForCompletion": true,
      "pollIntervalMs": 15000,
      "maxPollDurationMs": 1200000,
      "binaryPropertyName": "videoFile"
    }
  }
}

Animate an upstream image (image-to-video):

{
  "type": "grok_video_gen",
  "parameters": {
    "prompt": "Slow push-in with gentle camera drift",
    "options": {
      "inputBinaryPropertyName": "data",
      "duration": 5
    }
  }
}

Submit without waiting and capture the job ID for a later step:

{
  "type": "grok_video_gen",
  "parameters": {
    "prompt": "An abstract swirling galaxy forming from stardust",
    "maxConcurrency": 3,
    "options": {
      "duration": 10,
      "waitForCompletion": false,
      "responseFieldName": "jobInfo"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Grok Video Gen generates videos from text descriptions using the xAI Grok service. This tool is ideal when you need to create a video directly from a natural language prompt, especially for short clips up to 15 seconds. It produces a completed video file, stored as binary data.

Frequently asked questions

Can I set the orientation or dimensions?

No. The API takes no size parameter, so orientation and dimensions are not configurable on the node. Describe the framing you want in the prompt instead — for example asking for a vertical composition.

How do the videos arrive?

As completed video files stored as binary data on the main output, so they can be uploaded, attached or transcoded by later nodes without extra handling.

Can one request produce several videos?

Yes — multiple video outputs per request are supported, which is useful when you want options from a single prompt.

What happens when generation fails?

The failure routes to the Error output rather than stopping the workflow, so a single unsuccessful prompt does not halt a batch of generations.

Build with the Grok Video Gen node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need xAI credentials first.

Open BusyBot

Last reviewed . Spotted something wrong? Tell us.