Skip to content

Grok task query

After a Grok task is submitted, poll status and results by task ID through the query endpoint. The response is an OpenAI-style video object.

http
GET /v1/videos/{task_id}

When the task completes, read the video from the result URL. If a direct download fails, fall back to the content endpoint (see Polling tips below).

Headers

NameTypeRequiredDescription
stringYesRequest authentication. Use a Bearer Token, for example:

Request parameters

NameTypeRequiredDescription
stringYesPath parameter: video task ID, matching the id returned by the generation endpoint

Request example

bash
curl https://octopusx.ai/v1/videos/video_abc123 \
  -H "Authorization: Bearer <token>"

Response example

json
{
  "id": "video_abc123",
  "object": "video",
  "model": "grok-video-3",
  "status": "processing",
  "progress": 42,
  "created_at": 1735689600,
  "completed_at": 0,
  "expires_at": 1735776000,
  "seconds": "6",
  "size": "720P",
  "video_url": ""
}
json
{
  "id": "video_abc123",
  "object": "video",
  "model": "grok-video-3",
  "status": "completed",
  "progress": 100,
  "created_at": 1735689600,
  "completed_at": 1735689900,
  "expires_at": 1735776000,
  "seconds": "6",
  "size": "720P",
  "video_url": "https://example.com/video.mp4"
}
json
{
  "id": "video_abc123",
  "object": "video",
  "model": "grok-video-3",
  "status": "failed",
  "progress": 100,
  "created_at": 1735689600,
  "completed_at": 1735689700,
  "expires_at": 1735776000,
  "seconds": "6",
  "size": "720P",
  "error": {
    "message": "Content policy violation",
    "code": "content_policy"
  },
  "video_url": ""
}

Response fields

NameTypeDescription
stringTask ID
stringAlways
stringTask status: ,,, and others
integerProgress percentage
integerCompletion timestamp
integerResult expiration timestamp
stringOutput duration
stringOutput resolution tier
stringVideo URL. Prefer this field when complete, or also accept
objectFailure reason object

Polling tips

Read the result URL in this order:

If downloading the returned video URL fails, fall back to:

http
GET /v1/videos/{task_id}/content