Video
Grok Imagine Video video
xAI Grok Imagine — text/image-to-video. 6s/10s. Style modes (fun/normal/spicy).
Category: Create · grok-imagine-video
How to use & limits
- Text-to-video and image-to-video (1 reference image).
- prompt: up to 5,000 characters.
- Duration: 6 or 10 seconds.
- aspect_ratio applies to text-to-video only; ignored when an image is supplied.
- mode sets the style: fun, normal or spicy.
Capabilities
What this model supports, straight from the schema — no pricing, no infrastructure detail.
| Capability | Value |
|---|---|
billing_unit Billing unit | per_video |
text_to_video Text-to-video | Yes |
image_to_video Image-to-video | Yes |
allowed_durations Allowed durations | 6, 10 |
max_prompt_length Max prompt length | 5000 |
Parameters
Fields accepted in params (or first-class, where applicable) for POST /generations.
| Name | Label | Type | Required | Default | Options | Min / Max | Description |
|---|---|---|---|---|---|---|---|
duration | Duration | select | Optional | 6 | — | — | Video duration: 6 or 10 seconds (default 6). |
aspect_ratio | Aspect ratio | select | Optional | 16:9 | 1:1 · 2:3 · 3:2 · 16:9 · 9:16 | — | Aspect ratio (text-to-video only): 1:1, 2:3, 3:2, 16:9 or 9:16. |
image_urls | Reference image (max 1) | multi_select | Optional | — | — | — – 1 | One reference image for image-to-video (max 1). |
mode | Mode | select | Optional | normal | fun · normal · spicy | — | Generation style: fun, normal or spicy. |
prompt | Prompt | textarea | Required | — | — | — | Motion/scene description; up to 5,000 characters. |
Example request
curl -X POST https://caranguejo.art/api/v1/dev/generations \
-H "Authorization: Bearer $CK" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video",
"prompt": "A sequence of doors opens revealing rooms with residents inside, camera slowly pushing in.",
"params": {
"aspect_ratio": "16:9",
"mode": "normal",
"duration": 6
}
}'
const res = await fetch("https://caranguejo.art/api/v1/dev/generations", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.CK,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "grok-imagine-video",
"prompt": "A sequence of doors opens revealing rooms with residents inside, camera slowly pushing in.",
"params": {
"aspect_ratio": "16:9",
"mode": "normal",
"duration": 6
}
}),
});
const { data } = await res.json();
Example response
{
"id": "9f0c1a7e-…",
"object": "generation",
"model": "grok-imagine-video",
"type": "video",
"status": "completed",
"output": {
"assets": [
{
"url": "https://media.caranguejo.art/outputs/example.mp4",
"type": "video"
}
]
}
}
The job's real cost is returned as credits_charged on the completed response — check GET /balance for the account balance.
Common errors for this job type:
insufficient_credits | Account balance can't cover the job cost. |
content_policy_violation | Prompt or media rejected by content policy. |
generation_timeout | The job exceeded the maximum processing time. |
rate_limited | Too many requests per minute. |
invalid_input | A required parameter is missing or outside the model's schema. |
generation_failed | Generic processing failure. |