Skip to main content
Lesson 7 of 12 · Grok for Marketing & Competitive Intelligence

Marketing Videos with Grok Imagine Video

Lesson 7 of 12 Updated November 2, 2026 Intermediate
On this page
  1. Video, the dominant format in digital marketing
  2. Understanding Grok’s video model
  3. Three video generation modes
  4. Practical marketing use cases
  5. Extend and edit videos
  6. Marketing video production pipeline
  7. Manage video costs
  8. Key takeaways

Updated November 2, 2026. Based on xAI video documentation and SDK xai-sdk 1.21.0: generation uses client.video.generate from the xAI SDK (the OpenAI SDK has no videos.generate method), the video plays from url, reference images show a product or person (and are no longer incompatible with image on grok-imagine-video-1.5), and rate limits count as requests per second. Sources: Video Generation · Reference-to-Video · Pricing.

Video, the dominant format in digital marketing

Video dominates every social media algorithm. On average, a video post generates several times more engagement than static content. But traditional video production remains costly and slow. With grok-imagine-video, you can produce marketing clips in minutes, at a controlled cost.

This lesson teaches you how to leverage Grok’s video generation for your marketing needs: product teasers, brand animations, stories, and social content.

Understanding Grok’s video model

The grok-imagine-video model works differently than image generation:

  • Cost: $0.05 per second of generated video ($0.08 for grok-imagine-video-1.5, $0.02 for its -lite version)
  • Duration: 1 to 15 seconds per request, 8 by default
  • Resolution: 480p or 720p, and up to 1080p in image-to-video with grok-imagine-video-1.5
  • Async process: you submit a request and retrieve the result later
  • Rate limit: 10 requests per second at the entry tier, higher at upper tiers

Async workflow

Unlike images, video generation requires processing time. The xAI Python SDK (pip install xai-sdk) hides this wait: client.video.generate submits the request, polls the status every second, and returns the video when it’s ready (10 minutes wait max by default).

import os

import xai_sdk

client = xai_sdk.Client(api_key=os.getenv("XAI_API_KEY"))

video = client.video.generate(
    prompt="Animated logo of a tech brand forming from blue light particles on a black background",
    model="grok-imagine-video",
    duration=5,
    aspect_ratio="16:9",
    resolution="720p",
)

print(f"Video available: {video.url}")

With the REST API, the same operation happens in two steps: a POST /v1/videos/generations returns a request_id, which you poll via GET /v1/videos/{request_id} until the status is done.

Three video generation modes

1. Text-to-Video: Create from scratch

The simplest mode. You describe the desired scene and Grok generates it.

# Product teaser
video = client.video.generate(
    prompt="""Close-up on a smartphone resting on a wooden desk.
    The screen lights up gradually to reveal an elegant
    interface with animating graphs. Natural side lighting,
    premium ambiance.""",
    model="grok-imagine-video",
    duration=8,
    aspect_ratio="9:16",  # Story/reel format
    resolution="720p",
)

2. Image-to-Video: Animate an existing visual

Turn a static image into an animated clip. Ideal for bringing your campaign visuals to life:

# Animate a campaign visual
video = client.video.generate(
    prompt="""Gently animate this scene: slight camera movement
    forward, light particles float slowly, subtle parallax
    effect on elements.""",
    model="grok-imagine-video",
    image_url="https://votre-cdn.com/visuel-campagne.jpg",
    duration=5,
    aspect_ratio="16:9",
)

3. Reference images: Feature your product

Reference images bring elements the video must show—your product, your mascot, a garment—into a scene described by the prompt. The prompt cites them by their position: <IMAGE_0>, <IMAGE_1>…

video = client.video.generate(
    prompt="The headphones from <IMAGE_0> placed in a collaborative office with holographic screens, slow tracking shot",
    model="grok-imagine-video",
    reference_image_urls=["https://votre-cdn.com/casque-officiel.jpg"],
    duration=10,
)

With grok-imagine-video, a request accepts up to 7 references and 10 seconds; grok-imagine-video-1.5 goes up to 14 references and 15 seconds, and also allows pinning the first image (image_url), the last, or key frames. On grok-imagine-video, choose between animating an image and using references.

Practical marketing use cases

Product teasers

Short 5-8 second clips that show your product in its best light, perfect for Instagram stories or X ads.

Logo animations

Your logo comes to life with particle effects, morphing, or reveal effects. Useful for webinar intros or video signatures.

Animated backgrounds

Subtle animated backgrounds for your presentations, webinars, or web pages. Moving textures, gradients that evolve slowly.

Brand transitions

2-3 second clips used as transitions between sections of your long videos, consistent with your visual identity.

Extend and edit videos

Extend an existing clip

If a 5-second clip is too short, extend it. The source must last 2 to 15 seconds, and the returned video contains the original followed by the extension:

video = client.video.extend(
    prompt="Continue the scene with a slow zoom out revealing the full environment",
    model="grok-imagine-video",
    video_url="https://...",
    duration=5,  # 2 to 10 additional seconds
)

Edit an existing video

Modify a generated video without starting over: editing uses generate, with the source video in video_url.

video = client.video.generate(
    prompt="Change the lighting ambiance to a warmer, golden, sunset tone",
    model="grok-imagine-video",
    video_url="https://...",
)

The source video for an edit must not exceed 8.7 seconds; the result keeps its duration, at 720p max.

Marketing video production pipeline

Here is a complete workflow to produce a marketing video pack from a brief, with the three formats generated in parallel by the async client:

import asyncio
import os

import xai_sdk

client = xai_sdk.AsyncClient(api_key=os.getenv("XAI_API_KEY"))


async def produire_pack_video(brief, ref_produit=None):
    options = {"model": "grok-imagine-video", "resolution": "720p"}
    if ref_produit:
        # The reference product appears in every format
        options["reference_image_urls"] = [ref_produit]
        brief = f"{brief} The product is the one from <IMAGE_0>."

    formats = {
        "principal": ("16:9", 10, "Cinematic style, careful lighting."),
        "story": ("9:16", 8, "Vertical framing, dynamic, engaging."),
        "carre": ("1:1", 6, "Centered framing, square format."),
    }
    taches = [
        client.video.generate(
            prompt=f"{brief} {consigne}",
            aspect_ratio=ratio,
            duration=duree,
            **options,
        )
        for ratio, duree, consigne in formats.values()
    ]
    videos = await asyncio.gather(*taches)
    return {nom: v.url for nom, v in zip(formats, videos)}

Download the three files immediately: the returned URLs are temporary.

Manage video costs

Video is more expensive than image. Plan your budget (rates for grok-imagine-video):

Vidéo 5 secondes : 5 × 0,05 $ = 0,25 $
Vidéo 10 secondes : 10 × 0,05 $ = 0,50 $
Vidéo 15 secondes : 15 × 0,05 $ = 0,75 $

Pack du pipeline ci-dessus (10 + 8 + 6 s) : 1,20 $
10 packs/mois : 12 $/mois

Optimize costs

  • Use short durations (5 to 8 seconds) for social media
  • Validate ideas with grok-imagine-video-1.5-lite ($0.02 per second) when its output is sufficient to decide
  • Generate the base visual as an image first ($0.02 with grok-imagine-image), then animate it as video

Rates as of November 2, 2026 — prices change regularly: before any budget calculation, check the current rates on the official xAI pricing page.

Key takeaways

  • grok-imagine-video costs $0.05 per second; the xAI SDK handles the wait with client.video.generate
  • Three generation modes: text-to-video, image-to-video, and reference images (cited as <IMAGE_0>…)
  • References feature a product or person; on grok-imagine-video-1.5, they combine with a pinned image
  • Clips can be extended (2 to 10 seconds) with client.video.extend or edited with generate and video_url
  • Produce a multi-format pack (16:9, 9:16, 1:1) to cover all platforms
  • Video URLs are temporary: download them immediately