메인 콘텐츠로 건너뛰기
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 작업 상태를 나타내는 status; done에 도달할 때까지 계속 폴링하세요
  • 반환되는 경우 완료 비율을 나타내는 progress
  • 렌더링이 완료되었을 때의 video.url

폴링 루프

1

먼저 비디오를 생성하거나 편집하세요

Video Generation 또는 Video Edit로 시작한 뒤, 반환된 request_id를 복사하세요.
2

status가 done이 될 때까지 계속 폴링하세요

응답이 request_id만 그대로 반환한다면 몇 초 기다렸다가 다시 폴링하세요. status가 나타나면 이를 중지 조건으로 사용하세요.
3

완료된 파일을 저장하세요

생성된 URL은 xAI 문서에서 임시라고 안내하므로, 최종 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.