Theme
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
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Request authentication. Use a Bearer Token, for example: |
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Path 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
| Name | Type | Description |
|---|---|---|
| string | Task ID | |
| string | Always | |
| string | Task status: ,,, and others | |
| integer | Progress percentage | |
| integer | Completion timestamp | |
| integer | Result expiration timestamp | |
| string | Output duration | |
| string | Output resolution tier | |
| string | Video URL. Prefer this field when complete, or also accept | |
| object | Failure 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