Skip to main content
GET
/
grok
/
v1
/
videos
/
{request_id}
Query an xAI video job
curl --request GET \
  --url https://api.cometapi.com/grok/v1/videos/{request_id} \
  --header 'Authorization: Bearer <token>'
{
  "request_id": "f5f35814-953e-b094-5a2c-4a90014a58cb"
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Use this endpoint after you already have a request_id. It tells you whether the xAI job is still running and returns the final video metadata when ready.

Check these fields first

  • request_id when the task has been accepted but the result is not ready yet
  • status for the xAI job state; keep polling until it reaches done
  • progress for completion percentage when it is returned
  • video.url when the render is complete

Polling loop

1

Create or edit the video first

Start with Video Generation or Video Edit, then copy the returned request_id.
2

Keep polling until status is done

If the response only echoes request_id, wait a few seconds and poll again. Once status appears, use it as the stop condition.
3

Persist the finished file

Download or copy the final video.url promptly, because xAI documents generated URLs as temporary.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Path Parameters

request_id
string
required

Deferred request id returned by the create or edit endpoint.

Response

200 - application/json

Current xAI video task state.

request_id
string

Returned when the request is accepted but result metadata is not ready yet.

model
string

xAI video model id.

usage
object
video
object

Generated video metadata. Present when the job has completed.

status
enum<string>

xAI job state. done means the video metadata is ready.

Available options:
queued,
processing,
done,
failed,
expired
progress
integer

Completion percentage when returned.

error

Error details when the job fails.