03 / 端點
Thumbnails
輪詢最新的 ThumbnailSet
需要 API KeyGET/api/enterprise/v1/generated-videos/{videoId}/thumbnails/latest
取得影片最新的 ThumbnailSet。
- 尚無 set 時,會以
{ status: "pending" }回傳 200(請繼續輪詢)。 - 帶入
after查詢參數 (ISO 8601) 後,只會將該時點之後產生的 set 視為候選。可在新的 generate 請求之後,用來忽略先前的結果。
路徑參數
| 欄位 | 型別 | 必填 | 說明 |
|---|---|---|---|
| videoId | string | 必填 | 生成短影音 ID範例: gsv_001 |
查詢參數
| 欄位 | 型別 | 必填 | 說明 |
|---|---|---|---|
| after | string | 選填 | ISO 8601 時間點。只將其後產生的 set 視為候選。範例: 2026-05-27T03:00:00.000Z |
請求內容
此端點不需要請求內容。
回應
| 狀態 | 意義 |
|---|---|
| 200 | 查詢成功(pending 或 ready)LatestThumbnailSetResponse |
| 400 | 查詢格式有誤ErrorResponse |
| 401 | 驗證失敗ErrorResponse |
| 404 | 找不到影片ErrorResponse |
回應 200LatestThumbnailSetResponse
沒有內容。
export 一張縮圖(不計費)
需要 API KeyPOST/api/enterprise/v1/generated-videos/{videoId}/thumbnails/export
從最新的 ThumbnailSet 中選一張並 export。
- 不計費。 由於 2026-09-14 改為預付,計費已移到生成時點(
POST .../thumbnails)。export 已包含在當時支付的費用中。 - 因此回應中的
credit.previousBalance與credit.currentBalance永遠相同。原本以兩者差額計算使用量的整合會得到 0,請改以生成回應為基準。 thumbnailUrl必須存在於GET .../thumbnails/latest的 set 之中。- set 不存在時回傳
THUMBNAIL_SET_NOT_FOUND(404),所選 URL 不符時回傳THUMBNAIL_NOT_FOUND(404)。
路徑參數
| 欄位 | 型別 | 必填 | 說明 |
|---|---|---|---|
| videoId | string | 必填 | 生成短影音 ID範例: gsv_001 |
請求內容ExportThumbnailRequest
| 欄位 | 型別 | 必填 | 說明 |
|---|---|---|---|
| thumbnailUrl | string | 必填 | 要選擇的縮圖。必須是 GET /thumbnails/latest 中 thumbnails[].imageUrl 的其中之一。範例: https://cdn.fikaclip.com/thumbnails/abc.jpg |
請求範例
{
"thumbnailUrl": "https://cdn.fikaclip.com/thumbnails/abc.jpg"
}回應
| 狀態 | 意義 |
|---|---|
| 200 | export 成功ExportThumbnailResponse |
| 400 | 內容有誤 / thumbnailUrl 格式有誤ErrorResponse |
| 401 | 驗證失敗ErrorResponse |
| 402 | 點數不足ErrorResponse |
| 404 | 影片 / ThumbnailSet / 所選縮圖不存在ErrorResponse |
回應 200ExportThumbnailResponse
| 欄位 | 型別 | 必填 | 說明 |
|---|---|---|---|
| requestId | string | 必填 | |
| video | object | 必填 | |
| id | string | 必填 | |
| thumbnailSet | object | 必填 | |
| id | number | 必填 | |
| status | enum | 必填 | 可用值: EXPORTED |
| selectedThumbnailUrl | string | 必填 | |
| credit | object | 必填 | |
| previousBalance | number | 必填 | 餘額(export 不計費 — 與 currentBalance 相同)範例: 300 |
| currentBalance | number | 必填 | 餘額(export 不計費 — 與 previousBalance 相同)範例: 300 |
| exportedAt | string | 必填 | export 時間 (ISO 8601) |
回應範例
{
"requestId": "string",
"video": {
"id": "string"
},
"thumbnailSet": {
"id": 0,
"status": "EXPORTED",
"selectedThumbnailUrl": "string"
},
"credit": {
"previousBalance": 300,
"currentBalance": 300
},
"exportedAt": "string"
}


