Edit video
Last updated September 13, 2026
Rewrite an existing video from a text instruction with x-ai/grok-imagine-video. This capability is unique to this model.
Rewrite an existing video from a text instruction with x-ai/grok-imagine-video,
using the native xAI request shape.
https://gateway.amux.ai/v1/videos/editsAuthorization
headerAuthorizationstringRequiredBearer <your Amux key> An API key issued by this site.
Request
application/jsonmodelstringRequiredFixed to x-ai/grok-imagine-video.
promptstringRequiredRequired: describes what the video should become.
videoobjectRequiredThe source video to edit; at most 8.7 seconds.
›videoobject
urlstringSource video address (mp4); must be a publicly reachable URL.
moderation"low" | "auto" | "high"Moderation strength. The upstream default applies when omitted.
userstringEnd-user identifier for abuse tracing. Send a hash rather than the raw value.
Response
200responseThe task was created.
400responseInvalid request (missing prompt or source video, or source video too long).
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 editing.
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.
Differences from the generation endpoint
| Generate | Edit | |
|---|---|---|
prompt | Optional | Required; describes the change |
video | Not accepted | Required |
duration | 1–15s | Not accepted |
| Aspect ratio / resolution / audio | Accepted | Not accepted |
Output length, aspect ratio and resolution all follow the source video.
⚠️ The source video may be at most 8.7 seconds; longer input is rejected upstream.
Billing
cost = output seconds × resolution tier rate
+ source video seconds × input-video per-second rate
An edit's output length always equals the source length, so the two second counts are identical. The tier follows the source video: a 1080p source is billed at the 720p tier on this model.
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, editing a 5-second 480p video is roughly 5 × 0.05 + 5 × 0.01 = 0.30.
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/edits \
-H "Authorization: Bearer $AMUX_API_KEY" \
-d '{
"model": "x-ai/grok-imagine-video",
"prompt": "Make it start snowing",
"video": {
"url": "https://…/source.mp4"
}
}'{
"request_id": "<string>"
}