Skip to main content

Grok Video API Documentation

Grok Video API is a developer-facing AI video generation interface that supports generating high-quality videos through text prompts, reference images, keyframe control, and other methods. Through TTAPI unified gateway, you can stably access the latest Grok models (including grok-imagine-video-1.5-fast, grok-imagine-video-1.5, grok-imagine-video-1.5-lite).

Quick Start


Core Features

🎬 AI Video Generation

Generate high-quality videos from text prompts using the latest Grok models, with support for various duration ranges and resolution options.

⚡ Async Workflow

Submit generation tasks asynchronously and retrieve results via polling or webhook callbacks, suitable for production environment integration.

🎯 Precise Keyframe Control

Specify keyframe images in the middle of the video through the keyframes parameter, which can be combined with first_frame and last_frame. Each request supports up to 4 keyframes.

️ First/Last Frame Locking

Strictly specify the start and end images of the video through first_frame and last_frame. When the same image is passed to both, it creates a loop effect.

Reference Images & Voice Roles

Pass reference images (up to 7) through refer_images, or pass voice roles through reference_audios to control character voice characteristics in the video.

Model Differences

Notes:
  • grok-imagine-video-1.5-fast and grok-imagine-video-1.5 support all advanced control features
  • grok-imagine-video-1.5-lite is a lightweight model, only supports basic text-to-video functionality

Authentication & Base URL

For complete setup instructions, see Gateway & Auth.

End-to-End Example

Step 1 — Submit Generation Request

Step 2 — Save jobId

Step 3 — Get Generation Result

The response includes videoUrl and other complete information after task completion.

All Endpoints


Common Workflows


Why Choose TTAPI

  • Unified Gateway — Access Grok and other AI models with a single API Key
  • Latest Model Support — Always support the latest Grok versions
  • Standardized Async Workflow — Consistent task submission, fetch polling, and webhook callback patterns
  • Clear Documentation — Separate overview guide from endpoint references
  • Unified Billing — Unified quota management across all AI APIs

FAQ

Which Grok model should I use?

  • grok-imagine-video-1.5-fast: Suitable for fast generation scenarios requiring advanced controls (keyframes, first/last frames), supports longer input text
  • grok-imagine-video-1.5: Standard quality, balances speed and quality, supports all advanced features
  • grok-imagine-video-1.5-lite: Lightweight, cost-effective, only supports basic text-to-video
See Model Differences table for details.

How do I control first and last frames?

Use the First & Last Frame to Video API, passing both first_frame and last_frame parameters. When both are set to the same image, it creates a loop effect.

How do I insert keyframes in the middle of a video?

Use the Keyframe to Video API, passing a keyframe array through the keyframes parameter. Each keyframe contains image_url and timestamp_s (timestamp). Each request supports up to 4 keyframes.

How do I use reference images or voice roles?

Use the Reference to Video API, passing reference images (up to 7) through refer_images, or passing voice roles through reference_audios.

How do I check task status?

Use the Fetch API with jobId to poll status. While processing, status returns ON_QUEUE; after completion, status returns SUCCESS with complete video URL in the response.

Does Grok Video API support Webhook?

Yes. Pass hookUrl when submitting any Grok task, and TTAPI will POST the result to your endpoint after task completion, eliminating the need for polling.
Last modified on October 14, 2026