Create video task (xAI shape)
The vendor-shaped entry point for Grok Imagine. If you already have xAI code, point base_url at this site — the request body and response shape match what your client sends today.
This endpoint is asynchronous: submitting returns a task id, and the result is retrieved by polling. That is the upstream API's own contract, not a limitation of this site.
Task id
The returned request_id is the Amux task id, not the upstream task handle. The upstream handle is not exposed: it would reveal which service fulfilled the call, and no endpoint on this site accepts it.
All retrieval paths accept only this id. GET /v1/tasks/{id} and the xAI-shaped alias below read the same task.
Four generation modes
The mode is determined by the material supplied; no separate declaration is needed:
| Mode | Required fields |
|---|---|
| Text to video | prompt only |
| Image to video | image (first frame) |
| Reference to video | reference_images |
| First and last frame | image + last_frame |
prompt is optional when any material is supplied. This is the inverse of the MiniMax endpoint on this site, so no placeholder prompt is required when migrating from it.
Request
- Base URL: https://gateway.amux.ai
- URL: https://gateway.amux.ai/v1/videos/generations
- Auth: HTTP bearer
Request body
Example request
{
"model": "x-ai/grok-imagine-video-1.5",
"prompt": "A red paper boat drifting down a rain puddle, camera slowly pans out",
"duration": 8,
"aspect_ratio": "16:9",
"resolution": "480p"
}Response
The task was created.
Changes
No recorded changes to this operation across all 1 revision of this API.