Amux

Extend xAI video

Last updated September 13, 2026

Continue an existing video with a newly generated segment. Supported only on x-ai/grok-imagine-video.

Continue an existing video with a newly generated segment, using the native xAI request shape.

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

Authorization

header
AuthorizationstringRequired

Bearer <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/json
modelstringRequired

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

promptstringRequired

Required: describes what happens in the continuation.

videoobjectRequired

The source video to extend; its length must be between 2 and 15 seconds.

videoobject
urlstring

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

durationintegerDefault 6

Length of the added segment in seconds, 2-10, defaulting to 6.

⚠️ This is not the total length — the result is the source length

plus this value.

Response

200response

The task was created.

400response

Invalid request (model does not support extension, source length out of range, or duration outside 2-10).

402response

Insufficient 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 extension 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.

🔴 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. Billing also counts the added segment, matching the upstream's own basis.

To obtain the total length, add the source length to duration.

⚠️ The source video must be between 2 and 15 seconds; shorter input is rejected upstream. duration accepts 2–10 seconds and defaults 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.

TierOutput (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.

cURL
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>"
}