Skip to main content
GET
在你已經取得 request_id 之後,使用這個端點。它會告訴你 xAI 工作是否仍在執行中,並在就緒時回傳最終影片中繼資料。

先檢查這些欄位

  • 任務已被接受但結果尚未就緒時,查看 request_id
  • 使用 status 判斷 xAI 工作狀態;持續輪詢直到它變成 done
  • 若有回傳,使用 progress 查看完成百分比
  • 當轉譯完成時,查看 video.url

輪詢迴圈

1

先建立或編輯影片

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

持續輪詢直到 status 為 done

如果回應只回傳 request_id,請等待幾秒後再次輪詢。一旦出現 status,就用它作為停止條件。
3

保存完成的檔案

請盡快下載或複製最終的 video.url,因為 xAI 將生成的 URL 文件化為暫時性連結。

授權

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

路徑參數

request_id
string
必填

Deferred request id returned by the create or edit endpoint.

回應

200 - application/json

Current xAI video task state.

request_id
string

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

model
string

xAI video model id.

usage
object

Billing metadata. cost_in_usd_ticks reports the cost in provider ticks.

video
object

Generated video metadata. Present when the job has completed.

status
enum<string>

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

可用選項:
queued,
processing,
done,
failed,
expired
progress
integer

Completion percentage when returned.

error

Error details when the job fails.