curl --request POST \
--url https://api.modellix.ai/api/v1/xai/grok-imagine-video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A serene lake at sunrise with mist rolling over the water"
}
'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-xai-t2v-001",
"model_id": "xai/grok-imagine-video",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-xai-t2v-001"
}
}
}{
"code": 400,
"message": "Invalid parameters: parameter 'prompt' is required"
}{
"code": 401,
"message": "Authentication failed: invalid API key"
}{
"code": 429,
"message": "Rate limit exceeded: 100 requests per minute, retry after 60 seconds"
}{
"code": 500,
"message": "Internal server error"
}Grok Imagine Video
[Core Function] Grok Imagine Video is xAI’s text-to-video generation model. [Strengths] It excels at generating short, dynamic video clips directly from a text prompt, with controllable duration, aspect ratio, and resolution. [Best For] Highly recommended for: short social clips, animated concepts, and dynamic scene generation from a description. [Limitations] Do NOT use this model when you have a starting image or reference subjects, or when you need resolutions above 720p or clips longer than 15 seconds; it is limited to 480p/720p and 15s. [Routing] Use this model when the user wants a video from text only. If a starting image is provided, route to the Image-to-Video model; for reference-driven character video, use Reference-to-Video.
curl --request POST \
--url https://api.modellix.ai/api/v1/xai/grok-imagine-video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A serene lake at sunrise with mist rolling over the water"
}
'{
"code": 0,
"message": "success",
"data": {
"status": "pending",
"task_id": "task-xai-t2v-001",
"model_id": "xai/grok-imagine-video",
"get_result": {
"method": "GET",
"url": "https://api.modellix.ai/api/v1/tasks/task-xai-t2v-001"
}
}
}{
"code": 400,
"message": "Invalid parameters: parameter 'prompt' is required"
}{
"code": 401,
"message": "Authentication failed: invalid API key"
}{
"code": 429,
"message": "Rate limit exceeded: 100 requests per minute, retry after 60 seconds"
}{
"code": 500,
"message": "Internal server error"
}Authorizations
API Key authentication. Format: Bearer YOUR_API_KEY.
Body
xAI Grok Imagine text-to-video request.
Text description of the video to generate
1"A serene lake at sunrise with mist rolling over the water"
Video duration in seconds
1 <= x <= 158
Video aspect ratio
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 "16:9"
Video resolution
480p, 720p "720p"