> ## 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.

# 延长视频

> Extend the duration of a previously generated video.
- Extended videos can be further extended
- Extended videos cannot be used for insertion/removal/reshoot operations

Requires a valid videoId from a completed video generation task.

## 概述

延长之前生成的视频时长。您可以选择提供一个提示词来引导延长部分的内容。

<Info>
  仅支持 **VEO 3.1** 系列模型（`veo31_fast`、`veo31_quality`）进行视频延长。
</Info>

<Warning>
  * 延长后的视频**可以**继续延长
  * 延长后的视频**不能**用于插入、移除或重拍操作
  * 需要来自已完成视频生成任务的有效 `videoId`
</Warning>


## OpenAPI

````yaml POST /gemini/video/extend
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/extend:
    post:
      tags:
        - gemini
      summary: Extend video duration
      description: >-
        Extend the duration of a previously generated video.

        - Extended videos can be further extended

        - Extended videos cannot be used for insertion/removal/reshoot
        operations


        Requires a valid videoId from a completed video generation task.
      operationId: ApiPublicController_extendVideo
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoExtendDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIdDto'
      security:
        - bearerAuth: []
components:
  schemas:
    VideoExtendDto:
      type: object
      properties:
        videoId:
          type: string
          description: Video ID from a previously generated video task
          example: task-uuid-xxx
        prompt:
          type: string
          description: Prompt text for the extended section
          example: the camera slowly zooms out to reveal more of the landscape
        model:
          enum:
            - veo31_fast
            - veo31_quality
          type: string
          description: Video model (only VEO 3.1 series supported for extend)
          example: veo31_fast
      required:
        - videoId
        - model
    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

````