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

# Генерация видео

> Создайте четыре видеоролика на основе изображений и описаний. Это взаимодействие интерфейса соответствует интерфейсу генерации изображений midjourney, **асинхронной задаче**.



## OpenAPI

````yaml openapi/ru/sora.json POST /midjourney/video/submit
openapi: 3.1.0
info:
  title: Документация Sora API
  version: 1.0.0
  description: TTAPI Sora API сервис
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /midjourney/video/submit:
    post:
      description: >-
        Создайте четыре видеоролика на основе изображений и описаний. Это
        взаимодействие интерфейса соответствует интерфейсу генерации изображений
        midjourney, **асинхронной задаче**.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/videosubmitRequest'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    videosubmitRequest:
      type: object
      properties:
        prompt:
          type: string
          description: Промпт генерации видео
        imageUrl:
          type: string
          description: >-
            Начальное изображение кадра URL. Должно быть **общедоступное
            изображение URL**.
        endingUrl:
          type: string
          description: >-
            Конечный кадр изображения URL. Должно быть **общедоступное
            изображение URL**.
        model:
          type: string
          example: fast
          description: >-
            Режим скорости генерации видео. **В настоящее время поддерживается
            только быстрый режим**
        manual:
          type: string
          description: >-
            Интенсивность движения. low – Низкое движение, high – Высокое
            движение
          default: low
        resolution:
          type: string
          description: >-
            Разрешение видео <br/> **Различные разрешения потребляют разное
            количество квоты**
          enum:
            - hd
            - sd
          default: sd
        bs:
          type: int
          enum:
            - '1'
            - '2'
            - '4'
          default: '4'
          description: Количество видеороликов, создаваемых в пакетном режиме
        hookUrl:
          type: string
          description: >-
            Уведомление об обратном вызове URL. Когда задача будет завершена или
            не выполнена, этот URL будет уведомлен. <a href="fetch"
            target="_self">Структура данных уведомления</a> соответствует
            структуре выборки. Если не установлено, вам необходимо запросить
            интерфейс <a href="fetch" target="_self">получение результата</a>
            для запроса.
      required:
        - prompt
        - imageUrl
  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>.

````