Extend video
Last updated September 13, 2026
Continue an existing video with a new segment using x-ai/grok-imagine-video. This capability is unique to this model.
Continue an existing video with a newly generated segment using
x-ai/grok-imagine-video, in the native xAI request shape.
https://gateway.amux.ai/v1/videos/extensionsAuthorization
headerAuthorizationstringRequiredBearer <your Amux key> An API key issued by this site.
Request
application/jsonmodelstringRequiredFixed to x-ai/grok-imagine-video.
promptstringRequiredRequired: describes what happens in the continuation.
videoobjectRequiredThe source video to extend; its length must be between 2 and 15 seconds.
›videoobject
urlstringSource video address (mp4); must be a publicly reachable URL.
durationintegerDefault 6Length of the added segment in seconds, 2-10, defaulting to 6. The total length is the source length plus this value.
Response
200responseThe task was created.
400responseInvalid request (missing prompt or source video, source length out of range, or duration outside 2-10).
402responseInsufficient balance to reserve the cost of this task.
This capability is unique to this model
x-ai/grok-imagine-video-1.5 does not support extension.
This is a capability difference of the model itself: the generation endpoint does not
accept a video field either, so editing and extension cannot be performed through
it. Use x-ai/grok-imagine-video when these capabilities are required.
🔴 duration is the length of the added segment, not the total
A 3-second source with duration: 2 yields a 5-second result.
⚠️ video.duration in the response likewise reports the added segment (2 in that
example), not the total length. To obtain the total, add the source length to
duration.
Billing also counts the added segment, matching the upstream's own basis.
Value domains
| Source video length | 2–15 seconds; shorter input is rejected upstream |
duration | 2–10 seconds, defaulting to 6 |
Billing
cost = added segment seconds × resolution tier rate
+ source video seconds × input-video per-second rate
The source segment is not charged again as output — it is counted once at the input-video rate.
Official price reference
The figures below are xAI's public list prices, provided for order-of-magnitude estimation. They are not this site's charges — the authoritative rates are on the model detail and pricing pages.
| Tier | Output (per second) | Input video (per second) |
|---|---|---|
| 480p | $0.05 | $0.01 |
| 720p | $0.07 | $0.01 |
On that basis, extending a 3-second 480p video by 2 seconds is roughly
2 × 0.05 + 3 × 0.01 = 0.13.
Retrieval
The returned request_id is the Amux task id; retrieval works exactly as for
generation tasks, via the
xAI shape or the
unified shape.
curl https://gateway.amux.ai/v1/videos/extensions \
-H "Authorization: Bearer $AMUX_API_KEY" \
-d '{
"model": "x-ai/grok-imagine-video",
"prompt": "The boat drifts further into the distance",
"duration": 5,
"video": {
"url": "https://…/source.mp4"
}
}'{
"request_id": "<string>"
}