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

# 生成视频 【免费接口】

> 上传自己的音频，并对上传的音频进行后续处理



## OpenAPI

````yaml openapi/cn/producer.json POST /producer/v1/generate-video
openapi: 3.1.0
info:
  title: Producer API DOCS
  version: 1.0.0
  description: TTAPI Producer API 接口服务，目前集成了市场上最为领先的视频大模型sora2。
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /producer/v1/generate-video:
    post:
      description: 上传自己的音频，并对上传的音频进行后续处理
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeneratevideoRequest'
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - 'PENDING_QUEUE '
                      - ON_QUEUE
                      - SUCCESS
                      - FAILED
                  message:
                    type: string
                    description: 响应信息
                  data:
                    type: object
                    description: 任务结果
                    properties:
                      videoUrl:
                        type: string
                        description: 视频地址。有效期详见[存储与持久化](/grids/cn/faq/storage)
                      status:
                        type: string
                        description: 状态
                example:
                  status: SUCCESS
                  message: success
                  data:
                    videoUrl: >-
                      https://storage.googleapis.com/corpusant-app-public/song-videos/77ce096c-22c2-442b-a868-4100867a45df:0835e01ecc5ae00a000cc5a9b8f3035dea48508645a6142cbd1d7e5b72e0d4d7.mp4
                    status: complete
                required:
                  - status
                  - message
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  schemas:
    GeneratevideoRequest:
      type: object
      properties:
        music_id:
          type: string
          description: 父任务的musicId
        preset:
          type: string
          enum:
            - modern
            - player
            - simple
          default: simple
          description: 预设三种生成视频类型
      required:
        - music_id
  responses:
    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 密钥。

````