查詢影片生成
從原始碼生成 GET /video-generations/{job_id} 的鑑權、欄位、響應、錯誤與安全呼叫參考。
本頁目錄
操作
GET /video-generations/{job_id}
operationId: get_video_generation_v1_video_generations__job_id__get
讀取所屬任務。遵循 Retry-After 並設定輪詢截止時間。queued、running、cancelling 非終態;succeeded、failed、cancelled 為終態。後續階段失敗仍可能有可用產物,進度不代表精確時間。
鑑權與副作用
使用可信環境中的 Bearer API Key。所需權限:animations:read
此操作不啟動付費生成,其他狀態變化見上文說明。
引數
| 引數 | 位置 | 型別 | 必填 | 約束 / 預設值 | 含義 |
|---|---|---|---|---|---|
job_id |
path |
string |
是 | format: uuid |
所屬公共資源 UUID;任務、資產、檔案 ID 不能互換。 |
響應
| HTTP | 正文 | 含義 |
|---|---|---|
200 |
TaskResponse | 成功的公開響應,示例數值僅用於說明。 |
400 |
APIErrorEnvelope | 輸入錯誤,修正請求後再嘗試。 |
401 |
APIErrorEnvelope | API Key 缺失、到期或被撤銷。 |
403 |
APIErrorEnvelope | 帳戶資格、帳戶狀態或 Key 權限不允許此操作。 |
404 |
APIErrorEnvelope | 資源不可用、不屬於當前使用者,或簽名無效/過期。 |
429 |
APIErrorEnvelope | 觸發帳戶級速率或佇列限制,遵循 Retry-After 等待。 |
500 |
APIErrorEnvelope | 內部錯誤,保留任務 ID 和冪等鍵,僅標記可重試時重試。 |
503 |
APIErrorEnvelope | 服務或供應商不可用,僅 error.retryable 為 true 時重試。 |
響應頭
| HTTP | 響應頭 | 型別 | 含義 |
|---|---|---|---|
200 |
Retry-After |
integer |
建議等待秒數,遵循服務值並設定總體截止時間。 |
429 |
Retry-After |
integer |
建議等待秒數,遵循服務值並設定總體截止時間。 |
503 |
Retry-After |
integer |
建議等待秒數,遵循服務值並設定總體截止時間。 |
響應示例
{
"created_at": "2026-08-30T00:00:00Z",
"credits": {
"charged": 0,
"held": 1,
"quoted": 1
},
"error": null,
"finished_at": null,
"id": "00000000-0000-4000-8000-000000000002",
"metadata": {},
"normalized_input": {},
"object": "video_generation",
"outputs": [
{
"byte_size": 1024,
"created_at": "2026-08-30T00:00:00Z",
"download_expires_at": "2026-08-30T01:00:00Z",
"download_url": "https://downloads.example.invalid/illustrative-asset",
"format": "clip_video",
"id": "00000000-0000-4000-8000-000000000003",
"media": {
"duration_seconds": 5.04,
"fps": 25,
"frame_count": 126,
"height": 512,
"width": 512
},
"mime_type": "video/mp4",
"object": "asset"
}
],
"progress": 1,
"stage": "completed",
"started_at": null,
"status": "succeeded"
}
相關教程
這篇文件有幫助嗎?
不收集搜尋字詞、程式碼或自由文字。此開關僅控制文件互動事件。 隱私權政策