Skip to main content
GET
cURL
在已获取 request_id 后使用此端点。它会告知 xAI 任务是否仍在运行,并在准备就绪后返回最终视频元数据。

首先检查这些字段

  • request_id 任务已被接受但结果尚未就绪时
  • status 用于查看 xAI 任务状态;当其为 pending 时继续轮询,并在 donefailedexpired 时停止
  • progress 在返回时用于查看完成百分比
  • video.url 渲染完成时

轮询循环

1

先创建或编辑视频

先从 创建 xAI 视频创建 xAI 视频编辑,然后复制返回的 request_id
2

轮询直到任务达到终止状态

如果响应仅回显 request_id,请等待几秒后再次轮询。当 statuspending 时继续;在 donefailedexpired 时停止。
3

保存已完成的文件

请及时下载或复制最终的 video.url,因为 xAI 将生成的 URL 标记为临时 URL。

授权

Authorization
string
header
必填

Use your CometAPI API key as the bearer value.

路径参数

request_id
string
必填

The deferred request ID returned by the create or edit endpoint.

响应

200 - application/json

The current Grok video task state.

request_id
string

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

model
string

The Grok video model ID.

video
object

Generated video metadata. Present when the job has completed.

status
enum<string>

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

可用选项:
pending,
done,
failed,
expired
progress
integer

Completion percentage when returned.

usage
object

Additional usage metadata returned when the job is complete. Its contents can vary by model.

error

Error details when the job fails.

最后修改于 2026年8月21日