跳到主要内容

Grok Imagine API

Use every xAI Grok Imagine model online in the browser or through one REST API, on one balance. Images from $0.01, video from $0.01 per second — billed per generation, no subscription. Each model has its own page with a live playground, full parameter docs, and current rates, and every new account starts with a $0.50 signup balance to try them. For 30-second clips with stereo audio on the same key, see the Kling 4.0 API.

Try Grok Imagine online

Generate directly in the browser — no code needed. Pick a model, type a prompt, and pay only for what you generate.

Model logo

Grok Imagine 1.5 Fast Video API

    先在上方上传图片/视频,然后在提示词中输入 @ 引用它们

    点击上传PNG, JPG, WEBP, GIF · 最大 100MB
    点击上传PNG, JPG, WEBP, GIF · 最大 100MB
    输出

    您生成的video将显示在此处

    Grok Imagine 2.0 — current image generation

    Grok Imagine 1.5 — video

    Grok Imagine 1.0 — image

    Video tools

    What is the Grok Imagine API and how do you call it?

    The Grok Imagine API is xAI's image and video generation family exposed as REST endpoints. On UnificAlly every model is one POST /v1/tasks call with a model ID and an input object; you get a task ID back and poll it, or pass a callback URL. The clip below is a real output, not a demo reel: one text prompt sent to Grok Imagine 1.5 Lite Video on 19 October 2026 at the cheapest settings, billed $0.05 ($0.01 per second).

    Model
    xai/grok-imagine-1.5-lite-video
    Prompt
    A young woman in a yellow raincoat stands in a sunlit studio facing the camera, full body visible, and does a slow energetic dance: raises both arms, sways side to side, then spins once. Plain white backdrop, steady camera, no cuts.
    Settings
    duration 5, resolution 480p, aspect_ratio 9:16, audio on (default)
    What we saw
    Every beat of the prompt is in the clip: arms out, arms up, the sway, a full spin with hair motion on the back view, and a return to the starting pose. Subject, raincoat and backdrop held for all five seconds. The 480p tier shows on the face during the spin and the model added an open-mouth singing expression the prompt did not ask for. Draft on Lite at this price, then re-run the keeper on 1.5 Video at 1080p for the final cut.
    import requests, time
    
    API = "https://api.unifically.com"
    H = {"Authorization": "Bearer YOUR_API_KEY"}
    
    start = requests.post(f"{API}/v1/tasks", headers=H, json={
        "model": "xai/grok-imagine-1.5-lite-video",
        "input": {
            "prompt": "A young woman in a yellow raincoat does a slow energetic dance in a sunlit studio",
            "duration": 5,
            "resolution": "480p",
            "aspect_ratio": "9:16",
        },
    }).json()
    task_id = start["data"]["task_id"]
    
    while True:
        task = requests.get(f"{API}/v1/tasks/{task_id}", headers=H).json()["data"]
        if task["status"] in ("completed", "failed"):
            break
        time.sleep(3)
    
    print(task["output"]["video_url"])

    Grok Imagine video vs Veo 3.1 Fast and Kling 4.0

    The two video APIs people search alongside Grok Imagine. All four run on the same key; rates are UnificAlly's and refresh with the price list.

    Grok Imagine 1.5 VideoGrok Imagine 1.5 LiteVeo 3.1 FastKling 4.0
    Model IDxai/grok-imagine-1.5-videoxai/grok-imagine-1.5-lite-videogoogle/veo-3.1-fastkuaishou/kling-4.0-video
    Billingper secondper secondper video (4, 6 or 8 s)per second
    Rate$0.04 (480p) to $0.125 (1080p) per second$0.01 (480p) to $0.07 (1080p) per second$0.30 (720p) to $0.90 (4K) per video$0.1134 (std) to $0.1701 (pro) per second
    5 s clip at the lowest tier$0.20$0.05$0.30 (flat, 4 to 8 s)$0.567
    Text-to-videoYesYesYesYes
    Max duration per call15 s15 s8 s30 s
    Top resolutionnative 1080p1080p4K (upscaled in-task)1080p
    Audio in the same passYes, up to 3 preset voicesYesYesYes, stereo
    Reference imagesUp to 14, plus end frame and keyframesStart frame onlyUp to 3 (not on Quality)Start frame, elements

    Pick Grok Imagine 1.5 Video when you need references, an end frame or preset voices at native 1080p; Lite when you are drafting; Veo 3.1 Fast when a flat per-video rate and 4K matter more than length; Kling 4.0 when a single call has to run past 15 seconds.

    Grok Imagine API FAQ

    How much does the Grok Imagine API cost?
    On UnificAlly, Grok Imagine images cost $0.01 (speed model) or from $0.02 (2.0 quality model) each. Video costs $0.04 per second at 480p, $0.07 at 720p, or $0.125 at 1080p. Upscaling a video is a flat $0.05. Billing is per generation with no subscription; live rates are on the pricing page.
    Which Grok Imagine model should I use?
    Use Grok Imagine 2.0 Image for final-quality images and 1.0 Image for $0.01 drafts. For video, 1.5 Video is the official API build with text-to-video, up to 14 references, end frames, keyframes and preset voices at native 1080p; 1.5 Fast Video is the grok.com build with NSFW, presets, characters and clips up to 30 seconds; 1.5 Lite Video is the cheapest tier at $0.01 per second. All three reach 1080p.
    What is the difference between Grok Imagine 1.5 Video and 1.5 Fast Video?
    Both run Grok Imagine 1.5. The 1.5 Video route is the official API build: text-to-video, image-to-video or up to 14 references, end frame, keyframes, preset voices, 1–15 seconds at native 1080p, safe-for-work. The Fast build is the grok.com version: NSFW and style presets, saved characters, 1–30 second clips, and the only build that Extend by task ID and Upscale accept.
    Which model is xAI's grok-imagine-video-1.5-preview?
    xAI publishes its Grok Imagine 1.5 video model in its own API as grok-imagine-video-1.5-preview. On UnificAlly that official build is Grok Imagine 1.5 Video, model ID xai/grok-imagine-1.5-video: text-to-video, image-to-video or up to 14 references, end frame, keyframes and preset voices, 1 to 15 seconds at native 1080p, with sound generated in the same pass. Grok Imagine 1.5 Fast Video is the grok.com build with NSFW, presets, characters, 30 second clips, extend by task ID and upscale.
    What changed in the Grok Imagine model names?
    On 18 October 2026 xai/grok-imagine-video became xai/grok-imagine-1.5-fast-video, and the old key is rejected with a message naming the new one. xai/grok-imagine-image became xai/grok-imagine-1.0-image and xai/grok-imagine-video-extend became xai/grok-imagine-1.5-fast-video-extend, both rejected on the old name the same way. Parameters and prices did not change.
    Can I use Grok Imagine online without coding?
    Yes. Every Grok Imagine model on UnificAlly has a browser playground: type a prompt, adjust settings like duration and resolution, and generate. No code or SDK is required, and there is no subscription — each generation is billed at the same pay-per-use rate as the API.
    Is the Grok Imagine API free?
    There is no free Grok Imagine API. Every new UnificAlly account gets a $0.50 signup balance with no subscription, enough for 50 images on the 1.0 speed model or 25 on Grok Imagine 2.0, in the playground or through the API. After that you top up and pay per generation, and your balance never expires.
    Is Grok Imagine still free on X?
    No. xAI restricted free Grok Imagine generation in January 2026 and moved it fully behind a paid subscription in March 2026. The API route here needs no X or Grok subscription: new UnificAlly accounts get a $0.50 signup balance, then pay per generation at the rates above.
    Do I need an X or Grok subscription to use the API?
    No. UnificAlly is pay-per-use: you top up a balance and each generation deducts its exact cost. There is no monthly fee or seat license, and your balance never expires.
    How do I call the Grok Imagine API in Python?
    POST to https://api.unifically.com/v1/tasks with your UnificAlly key, a model such as xai/grok-imagine-1.5-lite-video and an input object holding the prompt, duration, resolution and aspect ratio; you get a task_id back, then poll GET /v1/tasks/{task_id} until status is completed and read output.video_url. The working example on this page took 5 seconds of 480p video from one prompt. Any HTTP client works; there is no xAI SDK to install and no xAI account needed.
    Where do I get a Grok Imagine API key?
    Create a UnificAlly account and copy the key from the dashboard. That one key calls every Grok Imagine route here (2.0 and 1.0 image, 1.5 video in all three builds, edit, extend, upscale) plus Grok TTS and the rest of the catalog. You do not need an X Premium subscription or an xAI console key; the key starts with a $0.50 signup balance and tops up from there.
    What did the sample Grok Imagine video on this page cost?
    The 5 second 480p clip above ran on Grok Imagine 1.5 Lite Video and was billed $0.05 ($0.01 per second). The same prompt on Grok Imagine 1.5 Video at 480p would be $0.20, and at native 1080p $0.625. Failed tasks are not billed.