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

# Veo2/Veo3 视频生成

> Generate video from text or images:
- **TEXT2VIDEO**: Generate video from text prompt
- **IMG2VIDEO**: Generate video from 1-2 images (start frame / start+end frames)

Note: For upscaling (1080P/4K) or GIF generation, use /video/upsample endpoint.



## OpenAPI

````yaml POST /gemini/video/generate
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/generate:
    post:
      tags:
        - gemini
      summary: Create video generation task
      description: >-
        Generate video from text or images:

        - **TEXT2VIDEO**: Generate video from text prompt

        - **IMG2VIDEO**: Generate video from 1-2 images (start frame / start+end
        frames)


        Note: For upscaling (1080P/4K) or GIF generation, use /video/upsample
        endpoint.
      operationId: ApiPublicController_generate
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskIdDto'
      security:
        - bearerAuth: []
components:
  schemas:
    VideoGenerationDto:
      type: object
      properties:
        prompt:
          type: string
          description: Video description/prompt (English recommended for best results)
          example: A fluffy orange cat running through a sunny meadow
        action:
          enum:
            - text2video
            - img2video
            - ingredients2video
          type: string
          description: Video generation action
          example: text2video
        model:
          enum:
            - veo2_fast
            - veo2_quality
            - veo3_fast
            - veo3_quality
            - veo31_fast
            - veo31_quality
            - veo31_fast_ingredients
          type: string
          description: >-
            Video generation model. Note: INGREDIENTS2VIDEO only supports
            veo31_fast
          example: veo31_fast
        imageList:
          description: |-
            Image URLs for image-based video generation:
            - IMG2VIDEO: 1-2 images (start frame, or start + end frames)
            - INGREDIENTS2VIDEO: 1-3 reference images (required)
            - veo31_fast_ingredients model: 1-3 images
          example:
            - https://example.com/image1.jpg
            - https://example.com/image2.jpg
          type: array
          items:
            type: string
        aspectRatio:
          enum:
            - '16:9'
            - '9:16'
          type: string
          description: Video aspect ratio
          example: '16:9'
          default: '16:9'
        translation:
          type: boolean
          deprecated: true
          description: '[已废弃] Enable automatic prompt translation to English'
          example: false
          default: false
      required:
        - prompt
        - action
        - 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

````