All models
xAI
Video
Available
Grok Imagine Video Extend
Output is an MP4 video with an audio track generated together with the video (dialogue written in the prompt is spoken). Audio cannot be turned off.
Video to Video
From 400 credits (≈ ₹400.00) per request.
Parameters
| Parameter | Type | Description |
|---|---|---|
task_idRequired |
string | Task ID from a previously successful video generation task. Required field. - task_id must be a successful grok-imagine/text-to-video or grok-imagine/image-to-video task. - The original video generation must have completed successfully - Only Kie AI–generated task IDs are supported max length 100 |
promptRequired |
string | Text instructions describing the required movement of the video. Required field. - Provide a detailed description of how you would like the video to expand and continue. - You can specify camera movements, scene changes, object actions, etc. - The more specific the prompt words are, the more likely the generated effect will match your expectations. - Supports input in both Chinese and English. |
extend_atRequired |
number | Required. Time point in the source video, in seconds (minimum 2), from which the extension starts. min 2 · default 2 |
extend_timesRequired |
string | 6 or 10 (seconds). one of: "6", "10" |
What you get back
Files arrive in output.files[] as private links that expire, with their type and size.
Use it from your code
# 1. Create the task
curl https://nexus.promptscenes.in/api/v1/tasks \
-H "Authorization: Bearer $NEXUS_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "grok-imagine-video-extend",
"input": {
"task_id": "…",
"prompt": "A cinematic shot of a lighthouse at dawn",
"extend_at": 2,
"extend_times": "6"
},
"callback_url": "https://your-app.com/webhooks/nexus"
}'
# 2. Poll for the result
curl https://nexus.promptscenes.in/api/v1/tasks/TASK_ID \
-H "Authorization: Bearer $NEXUS_API_KEY"
import os, time, uuid, requests
API = "https://nexus.promptscenes.in/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['NEXUS_API_KEY']}"}
task = requests.post(
f"{API}/tasks",
headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
json={
"model": "grok-imagine-video-extend",
"input": {
"task_id": "…",
"prompt": "A cinematic shot of a lighthouse at dawn",
"extend_at": 2,
"extend_times": "6",
},
"callback_url": "https://your-app.com/webhooks/nexus",
},
).json()
while task["status"] not in ("succeeded", "failed", "cancelled"):
time.sleep(3)
task = requests.get(f"{API}/tasks/{task['id']}", headers=HEADERS).json()
print(task["status"], task.get("output"))
const API = "https://nexus.promptscenes.in/api/v1";
const headers = {
Authorization: `Bearer ${process.env.NEXUS_API_KEY}`,
"Content-Type": "application/json",
};
let task = await fetch(`${API}/tasks`, {
method: "POST",
headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
body: JSON.stringify({
"model": "grok-imagine-video-extend",
"input": {
"task_id": "…",
"prompt": "A cinematic shot of a lighthouse at dawn",
"extend_at": 2,
"extend_times": "6"
},
"callback_url": "https://your-app.com/webhooks/nexus"
}),
}).then((r) => r.json());
while (!["succeeded", "failed", "cancelled"].includes(task.status)) {
await new Promise((r) => setTimeout(r, 3000));
task = await fetch(`${API}/tasks/${task.id}`, { headers }).then((r) => r.json());
}
console.log(task.status, task.output);
Request
{
"model": "grok-imagine-video-extend",
"input": {
"task_id": "…",
"prompt": "A cinematic shot of a lighthouse at dawn",
"extend_at": 2,
"extend_times": "6"
}
}
Response
{
"id": "6f1c…",
"object": "task",
"model": "grok-imagine-video-extend",
"status": "succeeded",
"output": {
"files": [
{
"url": "https://…signed…",
"mime": "…",
"size": 0
}
]
},
"estimated_cost": "…",
"charged": "…"
}