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

# 从视频中移除物体

> Remove an object from a specific area of the video using a mask.
White areas in the mask indicate the object to remove.
**imageMask is required** for removal operations.

## 概述

使用蒙版图像从之前生成的视频中移除特定区域的物体。

<Warning>
  * 移除操作**必须**提供 `imageMask`
  * 需要来自之前生成视频的有效 `videoId`（mediaId）
</Warning>

<Tip>
  `imageMask` 应为 base64 编码的 JPEG 图像，其中**白色区域**表示要移除的物体。AI 会使用上下文合适的内容填充移除区域。
</Tip>


## OpenAPI

````yaml POST /gemini/video/object/remove
openapi: 3.0.0
info:
  title: Google Gemini - Video, Image & SDK Compat
  description: >-
    Google Gemini services: video generation (Veo 2/3/3.1), image generation
    (Nano Banana), and Gemini Compat API for the official @google/genai SDK.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: gemini
    description: >-
      Video generation (Veo 2/3/3.1) and image generation (Nano Banana)
      endpoints
  - name: gemini-compat
    description: >-
      Gemini Compat API - drop-in replacement for Google's official
      @google/genai SDK. Supports generateContent / streamGenerateContent for
      text and image generation.
paths:
  /gemini/video/object/remove:
    post:
      tags:
        - gemini
      summary: Remove object from video
      description: |-
        Remove an object from a specific area of the video using a mask.
        White areas in the mask indicate the object to remove.
        **imageMask is required** for removal operations.
      operationId: ApiPublicController_removeObject
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoObjectRemovalDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIdDto'
      security:
        - bearerAuth: []
components:
  schemas:
    VideoObjectRemovalDto:
      type: object
      properties:
        videoId:
          type: string
          description: Video ID (mediaId) from a previously generated video
          example: CAUSJD...
        prompt:
          type: string
          description: Prompt describing what to remove (can be empty string)
          example: remove the white cloud
        imageMask:
          type: string
          description: >-
            Base64 encoded JPEG image mask (required). White areas indicate the
            object to remove.
          example: /9j/4AAQSkZJRg...
      required:
        - videoId
        - imageMask
    TaskIdDto:
      type: object
      properties:
        taskId:
          type: string
          description: task id, used to get task result later
      required:
        - taskId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````