Video Generation
Grok Imagine Video 1.5
Animate a still image into video with xAI's Grok Imagine Video 1.5 model.
POST /v2/videos/generate — model: "grok-imagine-video-1.5"
xAI's latest Grok Imagine video model. It is image-to-video only: supply a source image and describe the motion. Compared with Grok Imagine Video, 1.5 delivers better motion, physics, and temporal consistency. Resolution is fixed at 720p.
See Video Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
grokImagineVideo15Params.image | string | Yes | — | URL of the still image to animate. Supports jpg, jpeg, png, webp |
grokImagineVideo15Params.duration | number | No | 6 | Video duration in seconds: 6, 10, or 15 |
grokImagineVideo15Params.aspect_ratio | string | No | "auto" | Aspect ratio: "auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3". "auto" keeps the source image's native ratio |
Credit cost
| Variant | Credits |
|---|---|
6s | 144 |
10s | 240 |
15s | 360 |
Example result
Once the job is COMPLETED, the result object on GET /v2/jobs/:id looks like:
{
"videoUrl": "https://cdn2.apiframe.ai/videos/b2c3d4e5-f6a7-8901-bcde-f23456789012.mp4"
}See Result format for field details.
Code examples
curl -X POST https://api.apiframe.ai/v2/videos/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "slow cinematic push-in as embers drift across the scene",
"model": "grok-imagine-video-1.5",
"grokImagineVideo15Params": {
"image": "https://example.com/still.jpg",
"duration": 10
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/videos/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "slow cinematic push-in as embers drift across the scene",
"model": "grok-imagine-video-1.5",
"grokImagineVideo15Params": {
"image": "https://example.com/still.jpg",
"duration": 10,
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "slow cinematic push-in as embers drift across the scene",
model: "grok-imagine-video-1.5",
grokImagineVideo15Params: {
image: "https://example.com/still.jpg",
duration: 10,
},
}),
});
console.log(await response.json());body := `{
"prompt": "slow cinematic push-in as embers drift across the scene",
"model": "grok-imagine-video-1.5",
"grokImagineVideo15Params": {
"image": "https://example.com/still.jpg",
"duration": 10
}
}`
req, _ := http.NewRequest("POST", "https://api.apiframe.ai/v2/videos/generate",
strings.NewReader(body))
req.Header.Set("X-API-Key", "afk_your_api_key_here")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)Choosing between 1.5 and the base model
| Grok Imagine Video | Grok Imagine Video 1.5 | |
|---|---|---|
| Text-to-video | Yes | No — image required |
| Image-to-video | Yes (up to 7 reference images) | Yes (one source image) |
| Motion and physics | Good | Best in the family |
| Cost (6s) | 54 credits | 144 credits |
Use the base model for text-only prompts and cheaper drafts; use 1.5 when you have a hero still and want the highest-fidelity motion.
Try it
POST
/v2/videos/generateTry it