Skip to content

文生视频示例

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /volc/v1/contents/generations/tasks:
    post:
      summary: 文生视频示例
      deprecated: false
      description: 官方文档:https://www.volcengine.com/docs/82379/1520757
      tags:
        - 视频模型/豆包 视频生成
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: false
          example: application/json
          schema:
            type: string
        - name: Accept
          in: header
          description: ''
          required: false
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: 您需要调用的模型的 ID
                content:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        description: 输入内容的类型,此处应为 text
                      text:
                        type: string
                        description: >-
                          输入给模型的文本内容,描述期望生成的视频,包括:

                          文本提示词(必填):支持中英文。建议不超过500字。字数过多信息容易分散,模型可能因此忽略细节,只关注重点,造成视频缺失部分元素。
                    x-apifox-orders:
                      - type
                      - text
                    required:
                      - type
                      - text
                  description: 输入给模型,生成视频的信息,支持文本信息和图片信息。
              required:
                - model
                - content
              x-apifox-orders:
                - model
                - content
            example: "{\r\n    \"model\": \"doubao-seedance-1-0-pro-fast-251015\",\r\n    \"content\": [\r\n        {\r\n            \"type\": \"text\",\r\n            \"text\": \"多个镜头。一名侦探进入一间光线昏暗的房间。他检查桌上的线索,手里拿起桌上的某个物品。镜头转向他正在思索。 --ratio 16:9\"\r\n            // text\": \"多个镜头。一名侦探进入一间光线昏暗的房间。他检查桌上的线索,手里拿起桌上的某个物品。镜头转向他正在思索。 --rs 720p --rt 16:9 --dur 5 --fps 24 --wm true --seed 11 --cf false\"\r\n        }\r\n    ]\r\n}"
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                id: cgt-20250918165243-bfpzb
                status: submitted
          headers: {}
          x-apifox-name: 成功
      security:
        - bearer: []
      x-apifox-folder: 视频模型/豆包 视频生成
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5443236/apis/api-350878596-run
components:
  schemas: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://www.anyapi.vip
    description: 正式环境
security:
  - bearer: []

AnyAPI — 专业的 AI 接口聚合服务