> ## Documentation Index
> Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Video Watermark Remover API：去除單個影片中的水印

> APIXO 影片浮水印去除 API 用於單影片清理：去除覆蓋物和徽標，同時保持原始運動品質。

## 概覽

Video Watermark Remover 是非同步影片到影片 API，用於從一個來源影片中刪除浮水印。計費基於計費影片時長。

| 功能 | 值 |
| - | - |
| 模型 ID | `video-watermark-remover` |
| 模式 | `video-to-video` |
| 輸入影片 | 正是 1 公開影片 URL |
| 最短計費期限 | 5秒 |
| 計費 | 每秒 |

## 端點與身分驗證

API 基底網址：

```text theme={null}
https://api.apixo.ai/api/v1
```

| 方法 | 端點 | 用途 |
| - | - | - |
| `POST` | `/generateTask/video-watermark-remover` | 提交去浮水印任務 |
| `GET` | `/statusTask/video-watermark-remover?taskId={taskId}` | 查詢任務狀態並取得結果 |

每個請求都必須附上 APIXO API 金鑰：

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

送出任務時，還需設定以下請求標頭：

```http theme={null}
Content-Type: application/json
```

## 非同步請求範例

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/video-watermark-remover" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "video-to-video",
      "video_urls": [
        "https://example.com/input.mp4"
      ]
    }
  }'
```

成功回應：

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678"
  }
}
```

請保留 `taskId`，後續輪詢結果時會用到。

## 輪詢結果

```bash theme={null}
curl -X GET "https://api.apixo.ai/api/v1/statusTask/video-watermark-remover?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

成功回應：

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/clean-video.mp4\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965652317,
    "costTime": 41388
  }
}
```

等 `state` 變為 `success` 後，再解析 `resultJson`：

```javascript theme={null}
const payload = JSON.parse(data.resultJson);
const videoUrls = payload.resultUrls;
```

## 請求體

```json theme={null}
{
  "request_type": "async",
  "callback_url": "https://your-server.com/webhooks/apixo",
  "input": {
    "mode": "video-to-video",
    "video_urls": [
      "https://example.com/input.mp4"
    ]
  }
}
```

## 參數

**request\_type** `string` *required* (default: async)

取得結果的方式。選擇 `async` 時，透過 `statusTask` 輪詢結果；選擇 `callback` 時，透過 Webhook 接收結果。

**callback\_url** `string`

當`request_type`為`callback`時需要。必須是可以接收最終任務負載的回呼URL。請參閱 [Webhooks](https://apixo.ai/docs/zh-hant/api-reference/webhooks.md)。

**input** `object` *required*

Video Watermark Remover 的輸入參數。

**屬性**

**mode** `string` (default: video-to-video)

水印去除模式。唯一支援的值為 `video-to-video`。如果省略，則後端預設為 `video-to-video`。

**video\_urls** `string[]` *required*

來源影片 URL。必須恰好包含 1 個非空公共 MP4、MOV 或 WEBM 影片 URL。輸入影片不得超過 600 秒。

## 回應格式

### 送出任務時的回應

任務受理後，`POST /generateTask/video-watermark-remover` 會傳回任務 ID：

**code** `integer`

API 狀態碼。`200` 表示任務已受理。

**message** `string`

狀態說明。

**data.taskId** `string`

任務的唯一 ID，用於查詢任務狀態。

### 狀態回應欄位

**taskId** `string`

任務的唯一識別碼。

**state** `string`

目前的任務狀態，可能的值為 `pending`、`processing`、`success`、`failed`。

**resultJson** `string`

JSON 字串包含已清理影片的 URL 位於 `resultUrls`，僅在 `state` 為 `success` 時出現。

**failCode** `string`

供程式判讀的錯誤碼，僅在 `state` 為 `failed` 時傳回。

**failMsg** `string`

失敗原因說明，僅在 `state` 為 `failed` 時傳回。

**createTime** `integer`

任務建立時的 Unix 時間戳記，單位為毫秒。

**completeTime** `integer`

任務完成時的 Unix 時間戳記，單位為毫秒。任務完成後才會傳回。

**costTime** `integer`

處理時間，以毫秒為單位。有計時資料時才會傳回。

## Webhook 回呼模式

若希望後端自動收到最終結果，可使用回呼模式，無須輪詢。

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/video-watermark-remover" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/webhooks/apixo",
    "input": {
      "mode": "video-to-video",
      "video_urls": [
        "https://example.com/input.mp4"
      ]
    }
  }'
```

Webhook 的接收條件與重試規則請見 [Webhook 文件](https://apixo.ai/docs/zh-hant/api-reference/webhooks.md)。

## 計費

新提交的非 LLM 請求按 **1 點 = `$0.001`** 計費。先依用量和加購項目計算總額，再套用帳戶折扣，最後將請求總額無條件進位至整數點數。若已約定固定單價，則保留該單價的精度，不再使用標準價或另行打折；最終點數仍須進位。詳見[積分換算與進位](https://apixo.ai/docs/zh-hant/pricing.md#credit-conversion-and-rounding)。

Video Watermark Remover 按計費秒計費。計費持續時間為 `max(5 seconds, actual input video duration)`。

| 計費維度 | 值 |
| - | - |
| 單位 | `PER_SECOND` |
| APIXO 價格 | `$0.010 / second` |
| 最短計費期限 | `5`秒 |

計費行為：

```text theme={null}
billable_seconds = max(5, actual_video_seconds)
precharge = billable_seconds * 0.010
```

最新的美元費率請見 [API 價目表](https://apixo.ai/pricing/api)。

## 耗時與輪詢

Video Watermark Remover 任務為異步處理。實際延遲會因來源影片長度、檔案下載速度及佇列負載而異。

| 使用案例 | 建議首次查詢時間 | 輪詢間隔 |
| - | - | - |
| 短片 | 任務建立 30 秒後 | 10s-20s |
| 較長或生產級工作負載 | 偏好回呼模式 | 如果輪詢，請使用 20s 或更長時間 |

> [!TIP]
>
> 對於製作佇列或較長的影片，請使用回呼模式以避免頻繁輪詢。

請求頻率與並行數上限會依帳戶、API 金鑰和路由而異。收到 `429` 時，請降低請求頻率，並逐步拉長重試間隔。帳戶層級的限制請見[系統 API](https://apixo.ai/docs/zh-hant/api-reference/system.md)。

## 錯誤與排查

### HTTP 錯誤

| 代碼 | 含義 | 處理方式 |
| - | - | - |
| `400` | 請求內容、模式或影片 URL 格式不正確 | 修正請求後再試 |
| `401` | 缺少 API 金鑰，或金鑰無效 | 檢查 `Authorization` 請求標頭 |
| `402` | 餘額或配額不足 | 充值或更換帳號或金鑰 |
| `403` | 金鑰或路由無權訪問該模型 | 檢查權限和路由策略 |
| `404` | 未找到任務 | 驗證 `taskId` 和模型 ID |
| `429` | 已達到速率或並行限制 | 以指數退避方式重試 |
| `500` | 伺服器錯誤或未知任務失敗 | 逐步拉長間隔後重試 |
| `502` | 模型服務錯誤 | 逐步拉長間隔後重試 |
| `504` | 模型服務逾時 | 重新嘗試；耗時較長的任務可改用回呼模式 |

### 請求驗證

| 條件 | 後端行為 |
| - | - |
| 缺少 `input` | 傳回`The required parameter {{input}} is missing.` |
| `mode` 無效 | 傳回`Invalid mode type. Supported: video-to-video` |
| 缺少 `video_urls` | 傳回`The required parameter {{video_urls}} is missing.` |
| `video_urls` 不是陣列 | 傳回`The parameter {{video_urls}} must be Array type.` |
| `video_urls`長度不是1 | 傳回`The parameter {{video_urls}} must contain exactly 1 video.` |
| `video_urls[0]` 不是字串 | 傳回`The parameter {{video_urls}} Array elements must be String type.` |
| `video_urls[0]` 為空 | 傳回`The parameter {{video_urls}} cannot contain empty string.` |

完整列表見[錯誤碼](https://apixo.ai/docs/zh-hant/api-reference/errors.md)。

## MCP 整合

[完整模型 Schema](https://apixo.ai/docs/models/schemas/video/video-watermark-remover.json) 中的 `mcp.result` 指定結果的解析方式，`mcp.attachments` 列出可繫結檔案的欄位。這些中繼資料供用戶端整合使用，無須當作生成參數提交。附件欄位為 `video_urls`。請保留使用者指定的檔案順序。模型參數由 API 驗證。

## 相關連結

* [生成 API 總覽](https://apixo.ai/docs/zh-hant/models.md)
* [影片模型](https://apixo.ai/docs/zh-hant/models/video)
* [送出生成任務](https://apixo.ai/docs/zh-hant/api-reference/generate-task.md)
* [查詢任務狀態](https://apixo.ai/docs/zh-hant/api-reference/status-task.md)
* [Webhook](https://apixo.ai/docs/zh-hant/api-reference/webhooks.md)
* [錯誤碼](https://apixo.ai/docs/zh-hant/api-reference/errors.md)
* [參數規範](https://apixo.ai/docs/zh-hant/api-reference/parameters.md)
* [API定價](https://apixo.ai/pricing/api)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.