xAI
获取视频生成结果
使用 GET /grok/v1/videos/ 轮询 xAI 视频生成状态,并在处理完成后获取最终视频 URL。
GET
Query an xAI video job
在你已经拿到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.
request_id 之后,使用此端点。它会告诉你 xAI 任务是否仍在运行,并在结果就绪时返回最终视频元数据。
先检查这些字段
- 当任务已被接受但结果尚未准备好时,查看
request_id - 用
status查看 xAI 任务状态;持续轮询直到它达到done - 当返回
progress时,用它查看完成百分比 - 当渲染完成时,查看
video.url
轮询循环
授权
Bearer token authentication. Use your CometAPI key.
路径参数
Deferred request id returned by the create or edit endpoint.
响应
200 - application/json
Current xAI video task state.
Returned when the request is accepted but result metadata is not ready yet.
xAI video model id.
Generated video metadata. Present when the job has completed.
xAI job state. done means the video metadata is ready.
可用选项:
queued, processing, done, failed, expired Completion percentage when returned.
Error details when the job fails.