跳轉到主要內容
GET
cURL
取得 request_id 後,請使用此端點。它會告訴您 xAI 工作是否仍在執行,並在準備就緒時傳回最終影片中繼資料。

請先檢查這些欄位

  • request_id 當工作已接受但結果尚未準備好時
  • status 用於查看 xAI 工作狀態;當其為 pending 時持續輪詢,並在 done、failed 或 expired 時停止
  • progress 用於查看傳回時的完成百分比
  • video.url 當轉譯完成時

輪詢迴圈

1

請先建立或編輯影片

先從 建立 xAI 影片 或 建立 xAI 影片編輯,然後複製傳回的 request_id。
2

輪詢直到工作進入終止狀態

如果回應只回傳 request_id,請等候幾秒後再次輪詢。當 status 為 pending 時繼續;在 done、failed 或 expired 時停止。
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日