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

# 视频延伸

> 根据上一条视频结果延伸生成四个视频 <br/> 该接口与midjourney生成图像接口交互方式一致，为**异步任务**

<Note>
  延伸视频会同步父级任务的分辨率
</Note>


## OpenAPI

````yaml openapi/cn/sora.json POST /midjourney/video/extend
openapi: 3.1.0
info:
  title: Sora API DOCS
  version: 1.0.0
  description: TTAPI Sora API 接口服务，目前集成了市场上最为领先的视频大模型sora2。
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /midjourney/video/extend:
    post:
      description: 根据上一条视频结果延伸生成四个视频 <br/> 该接口与midjourney生成图像接口交互方式一致，为**异步任务**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExtendRequest'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    ExtendRequest:
      type: object
      properties:
        jobId:
          type: string
          description: 上一条任务的jobId，注意上一条任务必须为完成状态才能进行视频延续
        index:
          type: int
          description: 选择延续的视频 <br/>在上一条任务重的四个视频中选择一个延续<br/>0代表第一个，1代表第二个，以此类推
          enum:
            - 0-3
        manual:
          type: string
          description: 视频时长,可选值 low 低运动 high高运动
          default: low
        animateMode:
          type: string
          description: 动画模式
          enum:
            - auto
            - manual
          default: auto
        bs:
          type: int
          enum:
            - '1'
            - '2'
            - '4'
          default: '4'
          description: 批量生成视频数量
        hookUrl:
          type: string
          description: >-
            回调通知地址，任务完成或失败将通过请地址进行通知，<a href="fetch"
            target="_self">通知数据结构</a>与fetch结构一致。如果未设置，则需要请求<a href="fetch"
            target="_self">fetch接口</a>进行查询
      required:
        - jobId
        - index
  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: >-
        请前往 <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI 控制台</a>
        获取 API 密钥。

````