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

# 创建去字幕 / 去水印

> 创建异步去字幕 / 去水印任务。

**路径：** `POST https://api.omniall.ai/v1/video/generations`（亦可 `POST /v1/videos`）

- 自动去字幕：不传 `videoName`
- 框选去字幕 / 去水印：`videoName` = `x1_y1_x2_y2`（视频真实像素）

建议每 5–10 秒轮询。成功后下载 `result_url` / `video_url` 并尽快转存。

计费：按 `duration` / `seconds` 按秒计费（范围 1–600）。不传时按 **10** 秒计费。

鉴权：`Authorization: Bearer sk-...`




## OpenAPI

````yaml zh-CN/openapi/video-desub.yaml POST /v1/video/generations
openapi: 3.1.0
info:
  title: Omniall AI — 去字幕 / 去水印
  version: 1.0.0
  description: >
    OmniAll 去字幕 / 去水印（擦除硬字幕或固定角标 / 台标）。


    **创建：** `POST https://api.omniall.ai/v1/video/generations`（亦可 `POST
    /v1/videos`）


    **查询：** `GET /v1/video/generations/{task_id}`


    模型：`omniall-desub-1`。


    用法：不传 `videoName` = 自动去字幕；传 `videoName` 为 `x1_y1_x2_y2` = 框选去字幕或去水印。


    鉴权：`Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/video/generations:
    post:
      tags:
        - 平台
      summary: 创建去字幕 / 去水印
      description: >
        创建异步去字幕 / 去水印任务。


        **路径：** `POST https://api.omniall.ai/v1/video/generations`（亦可 `POST
        /v1/videos`）


        - 自动去字幕：不传 `videoName`

        - 框选去字幕 / 去水印：`videoName` = `x1_y1_x2_y2`（视频真实像素）


        建议每 5–10 秒轮询。成功后下载 `result_url` / `video_url` 并尽快转存。


        计费：按 `duration` / `seconds` 按秒计费（范围 1–600）。不传时按 **10** 秒计费。


        鉴权：`Authorization: Bearer sk-...`
      operationId: videoDesubCreate
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API Key。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
                - video_url
              properties:
                model:
                  type: string
                  description: 固定为 `omniall-desub-1`。
                  example: omniall-desub-1
                prompt:
                  type: string
                  description: 必填；如 `"去字幕"` / `"去水印"`。
                  example: 去字幕
                video_url:
                  type: string
                  format: uri
                  description: |
                    公网 http/https 直链。
                    别名：`url` / `videos[0]`。
                  example: https://cdn.example.com/input.mp4
                duration:
                  type: number
                  description: |
                    视频时长（秒，向上取整），强烈建议传入；按秒计费。
                    范围 **1–600**。不传按 **10** 秒计费。
                  minimum: 1
                  maximum: 600
                  example: 16
                seconds:
                  oneOf:
                    - type: number
                    - type: string
                  description: 与 `duration` 等价。
                  example: 16
                videoName:
                  type: string
                  description: |
                    框选区域：`x1_y1_x2_y2`（**视频真实像素**）。
                    `(x1,y1)` 左上角，`(x2,y2)` 右下角；须 `x2 > x1`、`y2 > y1`。
                    不传 = 自动去字幕。一次请求只处理一个区域。
                  example: 0_600_1280_700
                resolution:
                  type: string
                  description: |
                    可选，视频分辨率 `宽x高`（如 `1920x1080`）。
                    可不传，由服务端读取。
                  example: 1920x1080
            examples:
              desub_auto:
                summary: 自动去字幕
                value:
                  model: omniall-desub-1
                  prompt: 去字幕
                  video_url: https://cdn.example.com/input.mp4
                  duration: 16
              desub_region:
                summary: 框选去字幕
                value:
                  model: omniall-desub-1
                  prompt: 去字幕
                  video_url: https://cdn.example.com/input.mp4
                  duration: 16
                  videoName: 0_600_1280_700
              desub_watermark:
                summary: 去水印
                value:
                  model: omniall-desub-1
                  prompt: 去水印
                  video_url: https://cdn.example.com/input.mp4
                  duration: 30
                  videoName: 1500_20_1900_150
      responses:
        '200':
          description: 已受理
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: task_xxx
                  task_id:
                    type: string
                    example: task_xxx
                  status:
                    type: string
                    example: processing
                  model:
                    type: string
                    example: omniall-desub-1
                  created_at:
                    type: integer
              example:
                id: task_xxx
                task_id: task_xxx
                status: processing
                model: omniall-desub-1
        '400':
          description: 请求无效（缺 video_url / prompt、videoName 非法等）
        '401':
          description: 未授权

````

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