Generate a video with Grok Imagine (experimental)
grok_generate_videoCreates a short Grok Imagine video from a text prompt, optionally animating a local image, and returns MP4 file paths.
Instructions
EXPERIMENTAL: make a Grok Imagine video (about 6 s) from a prompt, optionally animating a local image (image_path: jpg/png/webp). Videos cost much more quota than images and are capped by max_videos_per_day (see grok_usage). Relies on Grok's current web UI, which changes often. Returns {"files": [mp4 path]}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "grok_generate_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| aspect | No | ||
| prompt | Yes | ||
| out_dir | No | ||
| timeout_s | No | ||
| image_path | No |