メインコンテンツへスキップ
GET
/
grok
/
v1
/
videos
/
{request_id}
Query an xAI video job
curl --request GET \
  --url https://api.cometapi.com/grok/v1/videos/{request_id} \
  --header 'Authorization: Bearer <token>'
{ "request_id": "f5f35814-953e-b094-5a2c-4a90014a58cb" }

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
  • xAI ジョブの状態を示す statusdone に達するまでポーリングを続けます
  • 返される場合の完了率を示す progress
  • レンダリング完了時の video.url

ポーリングループ

1

まず動画を作成または編集します

動画生成 または 動画編集 から始めて、返された request_id をコピーします。
2

status が done になるまでポーリングを続けます

レスポンスが request_id を返すだけの場合は、数秒待ってから再度ポーリングしてください。status が表示されたら、それを停止条件として使用します。
3

完成したファイルを保存します

xAI のドキュメントでは生成された URL は一時的なものとされているため、最終的な video.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
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.