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

> Расширьте завершенную задачу видео Gemini по jobId и получите новый асинхронный jobId.

<Note>
  Расширение видео выполняется асинхронно. Передайте `jobId` успешно завершенной задачи видео Gemini; после отправки API вернет новый `jobId`, который можно проверить через [API получения видео](/api/ru/gemini/video-fetch). Модель `omni-flash` не поддерживает расширение видео.
</Note>


## OpenAPI

````yaml openapi/ru/gemini.json POST /gemini/video/extend
openapi: 3.1.0
info:
  title: Документация Gemini API
  version: 1.0.0
  description: >-
    Сервис TTAPI Gemini API: генерация изображений Nano Banana и генерация видео
    Gemini.
servers:
  - url: https://api.ttapi.org
security: []
paths:
  /gemini/video/extend:
    post:
      description: >-
        Расширяет завершенную задачу видео Gemini и асинхронно возвращает новый
        jobId. Исходная задача должна иметь статус SUCCESS. Модель omni-flash не
        поддерживает расширение.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoExtendRequest'
      responses:
        '200':
          $ref: '#/components/responses/VideoGenerationResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    VideoExtendRequest:
      type: object
      properties:
        jobId:
          type: string
          description: >-
            jobId, возвращенный завершенной задачей генерации или расширения
            видео Gemini
          example: 0ccf0606-3f32-4090-85bd-1786e4593be5
        prompt:
          type: string
          description: Промпт для расширенного видео
          example: >-
            Continue the scene with the camera moving through the futuristic
            city
        aspect_ratio:
          type: string
          description: Соотношение сторон видео. Обязательный параметр.
          enum:
            - '16:9'
            - '9:16'
          example: '16:9'
        resolution:
          type: string
          description: Уровень разрешения.
          enum:
            - 720p
            - 1080p
          example: 720p
        hookUrl:
          type: string
          description: URL обратного вызова для уведомлений о завершении или ошибке
          example: https://example.com/callback
      required:
        - jobId
        - prompt
        - aspect_ratio
  responses:
    VideoGenerationResponse:
      description: Задача успешно отправлена
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                description: Статус задачи
                example: SUCCESS
              message:
                type: string
                description: Сообщение задачи
                example: success
              data:
                type: object
                properties:
                  jobId:
                    type: string
                    description: 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: Ошибка параметров
      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: Ошибка авторизации
      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: >-
        Вы можете получить API-ключ в <a href='https://dashboard.ttapi.io'
        target='_blank'>панель управления TTAPI</a>.

````