Amux

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.

POSThttps://gateway.amux.ai/v1/videos/edits

Authorization

header
AuthorizationstringRequired

Bearer <your Amux key> An API key issued by this site.

Request

application/json
modelstringRequired

Fixed to x-ai/grok-imagine-video.

promptstringRequired

Required: describes what the video should become.

videoobjectRequired

The source video to edit; at most 8.7 seconds.

videoobject
urlstring

Source video address (mp4); must be a publicly reachable URL.

moderation"low" | "auto" | "high"

Moderation strength. The upstream default applies when omitted.

userstring

End-user identifier for abuse tracing. Send a hash rather than the raw value.

Response

200response

The task was created.

400response

Invalid request (missing prompt or source video, or source video too long).

402response

Insufficient 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

GenerateEdit
promptOptionalRequired; describes the change
videoNot acceptedRequired
duration1–15sNot accepted
Aspect ratio / resolution / audioAcceptedNot 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.

TierOutput (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
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>"
}