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

# Gemini Video Generation API

> Submit an asynchronous Gemini Video API generation job and use the returned jobId to fetch the result.

<Note>
  Video generation is asynchronous. After a successful submission, use the returned `jobId` with the [Video Fetch API](/api/en/gemini/video-fetch).
</Note>


## OpenAPI

````yaml openapi/en/gemini.json POST /gemini/video/generations
openapi: 3.1.0
info:
  title: Gemini API DOCS
  version: 1.0.0
  description: >-
    TTAPI Gemini API service, including Nano Banana image generation and Gemini
    video generation.
servers:
  - url: https://api.ttapi.org
security: []
paths:
  /gemini/video/generations:
    post:
      description: >-
        Submit a Gemini video generation job and receive a jobId asynchronously.
        Supports omni-flash, veo-3.1-fast, veo-3.1-quality, and veo-3.1-lite
        models.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerateRequest'
      responses:
        '200':
          $ref: '#/components/responses/VideoGenerationResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    VideoGenerateRequest:
      type: object
      properties:
        prompt:
          type: string
          description: Video prompt
          example: A cinematic shot of a futuristic city at sunset
        model:
          type: string
          description: Video model.
          default: omni-flash
          enum:
            - veo-3.1-fast
            - veo-3.1-quality
            - veo-3.1-lite
            - omni-flash
        aspect_ratio:
          type: string
          description: Video aspect ratio. Required.
          enum:
            - '16:9'
            - '9:16'
          example: '16:9'
        resolution:
          type: string
          description: Resolution level.
          enum:
            - 720p
            - 1080p
          example: 720p
        duration:
          type: string
          description: >-
            Video duration (seconds). Veo 3.1 models (`veo-3.1-fast`,
            `veo-3.1-quality`, `veo-3.1-lite`) only support `8`.
          enum:
            - '4'
            - '6'
            - '8'
            - '10'
          example: '8'
        generation_type:
          type: string
          description: >-
            Video generation type. `frame`: frame-to-video; `reference`:
            reference-image-to-video. If omitted, auto-detected by image count:
            2 images = frame-to-video, 3 images = reference-to-video.
          enum:
            - frame
            - reference
          example: frame
        reference_images:
          type: array
          description: >-
            Reference images, up to 3. Each item must be an http(s):// URL. JPEG
            and PNG are supported. 
          maxItems: 3
          items:
            type: string
          example:
            - https://cdn.ttapi.io/example/reference-image.png
        reference_videos:
          type: array
          description: >-
            Reference or source video for editing, up to 1 (multiple video
            references are not supported). Each item must be an http(s):// URL.
            Currently available only for the `omni-flash` model.
          maxItems: 1
          items:
            type: string
          example:
            - https://cdn.ttapi.io/example/reference-video.mp4
        hookUrl:
          type: string
          description: Callback URL for completion or failure notifications
          example: https://example.com/callback
      required:
        - prompt
        - model
        - aspect_ratio
  responses:
    VideoGenerationResponse:
      description: Submitted successfully
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                description: Task status
                example: SUCCESS
              message:
                type: string
                description: Task message
                example: success
              data:
                type: object
                properties:
                  jobId:
                    type: string
                    description: Job ID
                    example: 0ccf0606-3f32-4090-85bd-1786e4593be5
                required:
                  - jobId
            required:
              - status
              - message
              - data
            example:
              status: SUCCESS
              message: success
              data:
                jobId: 0ccf0606-3f32-4090-85bd-1786e4593be5
    400Response:
      description: Parameter error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: '"prompt" cannot be empty.'
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: Authorization failed
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        You can obtain your API key from the <a
        href='https://dashboard.ttapi.io' target='_blank'>TTAPI Dashboard</a>.

````