Skip to main content
POST
Model name compatibility note: This endpoint also accepts the alias grok-imagine-1.5-video-ext, which is equivalent to grok-imagine-1.5-video-apimart. The two are interchangeable and produce identical results.

Authorizations

Authorization
string
required
All APIs require Bearer Token authenticationGet API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:

Request Parameters

model
string
default:"grok-imagine-1.5-video-apimart"
required
Video generation model nameSupported models:
  • grok-imagine-1.5-video-apimart - Grok Video Generation (compatible alias grok-imagine-1.5-video-ext)
Example: "grok-imagine-1.5-video-apimart"
For backward compatibility, the alias grok-imagine-1.5-video-ext (for grok-imagine-1.5-video-apimart) remains usable.
prompt
string
required
Video content description, supports multiple languages
size
string
default:"16:9"
Video sizeOptions:
  • 16:9 - Landscape (default)
  • 9:16 - Portrait
  • 1:1 - Square
  • 3:2 - Landscape
  • 2:3 - Portrait
duration
integer
default:6
Video duration (seconds)Range: 6-30 (minimum 6 seconds, maximum 30 seconds)⚠️ Note: Must be a plain number (e.g. 6), do not add quotes, otherwise an error will occur
quality
string
default:"480p"
Video qualityOptions:
  • 480p - Standard definition (default)
  • 720p - High definition
image_urls
string[]
List of reference image URLsLimits:
  • Maximum 7 images
  • Must be publicly accessible URLs
  • Base64 format is not supported
After uploading a reference image, the aspect ratio will automatically match the reference image’s aspect ratio.

Response

code
integer
Response status code
data
object[]
Response data array
Query Task ResultVideo generation is an async task. After submission, a task_id will be returned. Use the Get Task Status endpoint to query generation progress and results.

Use Cases

Case 1: Text-to-Video

Case 2: Image-to-Video