grok-imagine-video
Grok Imagine Video creates short clips from text descriptions with selectable duration and aspect ratio. The xAI model itself also supports image animation and directed video editing.
About the model
This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.
From a description to a video
Grok Imagine Video creates video from text. The xAI model itself also has modes using a source image or video. Ailoot's published generation method takes a text description as input and returns a video.
Generation is asynchronous: a task is created first, then its status and completed result are obtained through its identifier. According to xAI, creating a video can take several minutes; time depends on scene complexity, duration, resolution and selected mode.
Duration and frame
Video creation supports durations from 1 to 15 seconds. Aspect ratios include 1:1, 16:9, 9:16, 4:3, 3:4, 3:2 and 2:3; the standard format is 16:9. This version provides 480p and 720p, while 1080p belongs to version 1.5.
Animating a source image
In xAI's image mode, the image becomes the initial frame and a text instruction specifies movement. By default, the video's shape follows the source image's proportions. An explicitly specified aspect ratio changes this shape and may stretch the image.
Directed editing
When working with an existing video, the model applies the described changes while retaining the rest of the scene's content. This mode helps change the required element while preserving the original video's staging. Duration and proportions are inherited from the original; a new duration or frame shape is not specified.
A source video for editing is limited to 8.7 seconds, and output to resolution no higher than 720p. Material at 1080p is downscaled to 720p. Text-to-video generation settings do not automatically apply to editing.
Extending an existing video
In a separate xAI mode, this version extends a source video from its last frame. The source MP4 must be 2 to 15 seconds long; the added portion is 2 to 10 seconds, with 6 as the default. The result combines the source video and its extension. Proportions and resolution are inherited from the source, with a 720p limit; they cannot be changed separately in this mode. This manufacturer capability differs from Ailoot's published text-based generation.
References and version boundaries
xAI provides visual references to guide the appearance of people, clothing and objects in a scene. A reference specifies visual characteristics rather than the exact image of the first frame. Classic Grok Imagine Video cannot combine an initial frame with references.
This version does not accept precise fixation of a last frame or intermediate keyframes. These capabilities belong to Grok Imagine Video 1.5. Generation, animation of a source image and modification of an existing video are different modes; Ailoot's published method here describes generation from text.
Ailoot · Video POST /v1/videos/generations grok-imagine-video
grok-imagine-videoOverview
Grok Imagine Video creates short clips from text descriptions with selectable duration and aspect ratio. The xAI model itself also supports image animation and directed video editing.
- Accepted inputs
- Text
- Results
- Video
Available in Ailoot · inputs & methods
Ailoot · Video POST /v1/videos/generations
- Input types
text- Output types
video- Output format
- mp4
| Field | Type | Requirement | Values & limits | Default |
|---|---|---|---|---|
Fieldmodel | Typestring | RequirementRequired | Values & limits grok-imagine-video | Default— |
Fieldprompt | Typestring | RequirementOptional | Values & limits Minimum length: 1 | Default— |
Fieldduration | Typeinteger | RequirementOptional | Values & limits Minimum: 1 Maximum: 15 Conditions: Do not supply bothdurationandseconds Unit: seconds | Default1 |
Fieldseconds | Typeinteger|integer_string | RequirementOptional | Values & limits Minimum: 1 Maximum: 15 Alternative: duration | Default— |
Fieldresolution | Typestring | RequirementOptional | Values & limits 480p, 720p | Default480p |
Fieldaspect_ratio | Typestring | RequirementOptional | Values & limits 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 Conditions: Ifimageinputsuppliedandratioomitted,providerinheritsimageaspect | Default16:9 |
Fieldsize | Typestring | RequirementOptional | Values & limits 1280x720, 720x1280, 1920x1080, 1080x1920 Conditions: Mustagreewithresolution/aspect_ratioifbothspecified | Default— |
Fieldimage | Typeobject | RequirementOptional | Values & limits Conditions: Actualsupportedinputimage; permitsomittingprompt | Default— |
Input material combinations
Text to video · Required: prompt
Image to video · Required: image
Method parameters and lifecycle
| Parameter | Contract |
|---|---|
Parametermaterial_types | Contracttext |
Parameterrequired | Contractnull |
Parameteroptional_controls | Contractnull |
Lifecycle: submit_once_poll_original
GET /v1/videos/{request_id}
GET /v1/videos/generations/{request_id}
GET /v1/videos/{request_id}/content
GET /v1/videos/generations/{request_id}/content
Method shapes and IDs are exact; supplier capability is separate from admission.
Pricing
Ailoot method rates
POST /v1/videos/generations- Input
- $0.002 per input image
- Input
- $0.01 per second of input video
- Output
- $0.05 per second at 480p
- Output
- $0.07 per second at 720p
Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →
Example requests
Ailoot · Video
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
curl https://api.ailoot.ai/v1/videos/generations \
-H "Authorization: Bearer $AILOOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "grok-imagine-video", "prompt": "A person walks slowly through a quiet garden as the camera tracks from the side."}'Receive and save results
Ailoot · Video
mp4
GET /v1/videos/{request_id}GET /v1/videos/generations/{request_id}GET /v1/videos/{request_id}/contentGET /v1/videos/generations/{request_id}/content
Check job status
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_VIDEO_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_VIDEO_ID
video_id=$(python3 -c 'import os, urllib.parse; print(urllib.parse.quote(os.environ["AILOOT_VIDEO_ID"], safe=""))') || exit 1
curl "https://api.ailoot.ai/v1/videos/generations/$video_id" \
-H "Authorization: Bearer $AILOOT_API_KEY"Other content reads
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_VIDEO_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_VIDEO_ID
video_id=$(python3 -c 'import os, urllib.parse; print(urllib.parse.quote(os.environ["AILOOT_VIDEO_ID"], safe=""))') || exit 1
curl "https://api.ailoot.ai/v1/videos/generations/$video_id/content" \
-H "Authorization: Bearer $AILOOT_API_KEY" \
--output video.mp4Keep all completed results
Save every completed video or returned file; retrieve every actual returned asset URL.
Keep the complete status JSON and the actual request_id. A completed response with status=done contains video.url with an owned content URL. Preserve the reported duration and every returned result field.
If the original response needs checking
Read existing original job; never resubmit unknown send.
Response fields
| Field | Type |
|---|---|
Fieldrequest_id | Typestring |
Fieldid | Typestring |
Fieldstatus | Typestring |
Fieldvideo.url | Typeowned signed content URL |
Fieldvideo.duration | Typenumber |
Fieldvideo.respect_moderation | Typeboolean |
Errors and next steps
| Response | Condition | Next step |
|---|---|---|
Response400 · invalid_request_error | ConditionInvalid required fields, material representation or parameter value | Next stepCorrect the indicated fields before a new creation request. |
Response409 · video_not_ready | ConditionOriginal result content is not yet available | Next stepPoll the original returned ID and respect Retry-After. |
Responseserver_error | ConditionThe returned response says the operation or result requires a check | Next stepKeep the original returned operation/task ID, request headers and response; continue supported reads of that original operation. Do not resubmit the creation request. |
Aliases
Model aliases
Ailoot grok-imagine-video
Method path aliases
Use the method paths shown above.
Related caller IDs
FAQ · grok-imagine-video
- What inputs and results are available?
POST /v1/videos/generations·grok-imagine-video:text→video- Which fields does the request use?
POST /v1/videos/generations·grok-imagine-video:model,prompt,duration,seconds,resolution,aspect_ratio,size,image- What limits apply?
POST /v1/videos/generations·grok-imagine-video:duration.minimum:1;duration.maximum:15;seconds.minimum:1;seconds.maximum:15