Edit xAI video
Last updated September 13, 2026
Rewrite an existing video from a text instruction. Supported only on x-ai/grok-imagine-video.
Rewrite an existing video from a text instruction, using the native xAI request shape.
https://gateway.amux.ai/v1/videos/editsAuthorization
headerAuthorizationstringRequiredBearer <your Amux key> An Amux key created in the console. If you lose it, you can view it again on the keys page.
Request
application/jsonmodelstringRequiredFixed to x-ai/grok-imagine-video.
promptstringRequiredRequired: describes what the video should become.
videoobjectRequiredThe source video to edit.
›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 (model does not support editing, missing prompt or source video, or source video too long).
402responseInsufficient balance to reserve the cost of this task.
Supported only on x-ai/grok-imagine-video
x-ai/grok-imagine-video-1.5 has no editing capability and returns a 400 on this
endpoint.
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; output length follows the source |
| Aspect ratio / resolution / audio | Accepted | Not accepted; all follow the source |
⚠️ 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.
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>"
}