Retrieve task
Video / grok-imagine-video
Retrieve video task
Retrieve the status and result URL of a video generation task.
GET
Retrieve task
Video and image tasks share
If your product displays videos to end users, proxy this download through your server: use the key to retrieve the video, then deliver it under your own authentication so the DimiLinks key is never exposed to the browser.
/v1/tasks/{task_id}. After submitting /v1/videos/generations, retrieve the returned task_id and poll this endpoint.
Request
In-progress response
Successful response
After the task reachescompleted, retrieve the resulting video from /v1/videos/{task_id}/content with Bearer authentication.
Failed response
Status values
| Status | Meaning | Recommended caller action |
|---|---|---|
queued, pending, submitted | Waiting to be processed | Continue polling |
processing, in_progress, running | Generating | Continue polling |
completed, success | Completed | Retrieve /v1/videos/{task_id}/content |
failed, error, cancelled | Failed | Display the error and allow the user to retry |
Polling recommendations
- Poll every three to five seconds, slightly less frequently than for image tasks.
- Poll an individual task for at most ten minutes. After the timeout, tell the user the task failed and allow a retry.
- Stop polling immediately on
404; the task ID is probably incorrect or does not belong to the current key.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Image or video task