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

# Расширение видео

> Расширение видео путём генерации продолжения контента. Это асинхронная операция, возвращающая jobId для запроса результата.

Это конечная точка расширения видео **видео API Grok**, которая расширяет видео путём генерации продолжения.

Если вы хотите увидеть полный каталог API, рекомендуемый процесс интеграции и связанные возможности, пожалуйста, прочитайте [Обзор видео API Grok](/api/ru/grok).


## OpenAPI

````yaml openapi/ru/grok.json POST /grok/extensions
openapi: 3.1.0
info:
  title: Документация видео API Grok
  version: 1.0.0
  description: видео API Grok обеспечивает эффективный анализ и создание видео.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /grok/extensions:
    post:
      description: >-
        Расширение видео путём генерации продолжения контента. Это асинхронная
        операция, возвращающая jobId для запроса результата.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtensionRequest'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    ExtensionRequest:
      type: object
      properties:
        prompt:
          type: string
          description: Промпт, описывающий, что должно произойти дальше в видео.
        video:
          type: object
          description: >-
            Объект ввода видео. Принимает публичный URL, URL данных в кодировке
            base64 или file_id. Максимальная длительность входного видео — 15
            секунд.
          properties:
            url:
              type: string
              description: Публичный URL или URL данных в кодировке base64 видео.
        duration:
          type: integer
          description: >-
            Длительность расширяемого сегмента в секундах (1-10). По умолчанию —
            6 секунд.
          default: 6
          minimum: 1
          maximum: 10
        model:
          type: string
          description: Модель для использования.
          enum:
            - grok-imagine-video
          default: grok-imagine-video
          example: grok-imagine-video
      required:
        - prompt
        - video
  responses:
    SuccessResponse:
      description: Запрос выполнен успешно
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: jobId
            required:
              - status
              - message
              - data
    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>.

````