Edit video (xAI shape)
Rewrite an existing video from a text instruction. Supported only on x-ai/grok-imagine-video — x-ai/grok-imagine-video-1.5 returns a 400.
This endpoint is asynchronous: submitting returns a task id and the result is retrieved by polling.
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.
post/v1/videos/edits
Request
- Base URL: https://gateway.amux.ai
- URL: https://gateway.amux.ai/v1/videos/edits
- Auth: HTTP bearer
Request body
Example request
{
"model": "x-ai/grok-imagine-video",
"prompt": "Make it start snowing",
"video": {
"url": "https://…/source.mp4"
}
}Response
The task was created.
Changes
No recorded changes to this operation across all 1 revision of this API.