# seedance2.0/文生视频

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /openapi/v2/rhart-video/sparkvideo-2.0/text-to-video:
    post:
      summary: seedance2.0/文生视频
      deprecated: false
      description: >-
        seedance 2.0 文生视频，追求最高生成品质。仅需文本提示词即可生成 4-15
        秒高质量视频，支持多种宽高比、有声视频生成和联网搜索增强。
      operationId: postOpenapiV2RhartVideoSparkvideo20TextToVideo
      tags:
        - 模型API/视频生成与处理/text-to-video/seedance2.0/文生视频
        - 标准模型API/视频生成与处理/text-to-video/seedance2.0
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: false
          example: application/json
          schema:
            type: string
            default: application/json
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Bearer [Your API KEY]
          schema:
            type: string
            default: Bearer [Your API KEY]
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                  minLength: 1
                  maxLength: 20480
                  default: >-
                    一部武侠风格的电影级大片。大雨滂沱的暗夜竹林中，一名白衣剑客与一名披着蓑衣的刺客正在激烈近战。镜头首先是广角全景，展示两人在竹林中高速穿梭和见招拆招的肢体互动；随后镜头平滑且无缝地急推至极限特写，两把利剑在半空中猛烈碰撞，迸发出极其耀眼的火花。雨滴真实地溅落在冰冷的剑刃上并随动作瞬间甩出。人物面部表情清晰，物理运动规律极其准确。
                  description: 视频生成提示词
                resolution:
                  type: string
                  enum:
                    - 480p
                    - 720p
                    - native1080p
                    - native4k
                    - 1080p
                    - 2k
                    - 4k
                  default: 720p
                  description: >-
                    视频分辨率。分为模型原生输出的分辨率（480p、720p、native1080p），与基于 720p
                    原生生成后进行超分放大的分辨率（1080p、2k、4k）。
                  x-option-metadata:
                    - value: 480p
                      description: 480p
                    - value: 720p
                      description: 720p
                    - value: native1080p
                      description: native1080p
                    - value: native4k
                      description: native4k
                    - value: 1080p
                      description: 1080p
                    - value: 2k
                      description: 2k
                    - value: 4k
                      description: 4k
                duration:
                  type: string
                  enum:
                    - '-1'
                    - '4'
                    - '5'
                    - '6'
                    - '7'
                    - '8'
                    - '9'
                    - '10'
                    - '11'
                    - '12'
                    - '13'
                    - '14'
                    - '15'
                  default: '5'
                  description: 视频时长（秒）
                  x-option-metadata:
                    - value: '-1'
                      description: '-1'
                    - value: '4'
                      description: '4'
                    - value: '5'
                      description: '5'
                    - value: '6'
                      description: '6'
                    - value: '7'
                      description: '7'
                    - value: '8'
                      description: '8'
                    - value: '9'
                      description: '9'
                    - value: '10'
                      description: '10'
                    - value: '11'
                      description: '11'
                    - value: '12'
                      description: '12'
                    - value: '13'
                      description: '13'
                    - value: '14'
                      description: '14'
                    - value: '15'
                      description: '15'
                generateAudio:
                  type: boolean
                  default: true
                  description: 是否生成视频音频
                ratio:
                  type: string
                  enum:
                    - adaptive
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                    - '21:9'
                  default: adaptive
                  description: 视频宽高比
                  x-option-metadata:
                    - value: adaptive
                      description: adaptive
                    - value: '16:9'
                      description: '16:9'
                    - value: '4:3'
                      description: '4:3'
                    - value: '1:1'
                      description: '1:1'
                    - value: '3:4'
                      description: '3:4'
                    - value: '9:16'
                      description: '9:16'
                    - value: '21:9'
                      description: '21:9'
                webSearch:
                  type: boolean
                  default: false
                  description: 启用联网搜索增强
                returnLastFrame:
                  type: boolean
                  default: false
                  description: 是否返回视频尾帧图片
                seed:
                  type: integer
                  minimum: -1
                  maximum: 2147483647
                  multipleOf: 1
                  default: -1
                  description: 种子整数，用于控制生成内容的随机性。
              required:
                - prompt
                - resolution
                - duration
              x-apifox-orders:
                - prompt
                - resolution
                - duration
                - generateAudio
                - ratio
                - webSearch
                - returnLastFrame
                - seed
            example:
              prompt: >-
                一部武侠风格的电影级大片。大雨滂沱的暗夜竹林中，一名白衣剑客与一名披着蓑衣的刺客正在激烈近战。镜头首先是广角全景，展示两人在竹林中高速穿梭和见招拆招的肢体互动；随后镜头平滑且无缝地急推至极限特写，两把利剑在半空中猛烈碰撞，迸发出极其耀眼的火花。雨滴真实地溅落在冰冷的剑刃上并随动作瞬间甩出。人物面部表情清晰，物理运动规律极其准确。
              resolution: 720p
              duration: '5'
              generateAudio: true
              ratio: adaptive
              webSearch: false
              returnLastFrame: false
              seed: -1
      responses:
        '200':
          x-apifox-name: 成功
          x-apifox-ordering: 0
          description: <Icon icon="material-outline-info"/> 任务结果查询接口：`/openapi/v2/query`
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskId:
                    type: string
                    description: 任务 ID，用于后续查询任务结果。
                  status:
                    type: string
                    enum:
                      - QUEUED
                      - RUNNING
                      - SUCCESS
                      - FAILED
                    description: 任务状态。
                  errorCode:
                    type: string
                    description: 错误码。
                  errorMessage:
                    type: string
                    description: 错误信息。
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: 输出文件 URL。
                          nullable: true
                        outputType:
                          type: string
                          description: 输出类型或文件扩展名。
                          nullable: true
                        text:
                          type: string
                          description: 文本输出内容。
                          nullable: true
                      x-apifox-orders:
                        - url
                        - outputType
                        - text
                    description: 任务输出结果列表；处理中时可能为 null。
                    nullable: true
                  clientId:
                    type: string
                    description: 客户端标识。
                  promptTips:
                    type: string
                    description: 提示词执行反馈，使用 JSON 字符串承载。
                  failedReason:
                    type: object
                    additionalProperties: true
                    description: 失败详情对象。
                    x-apifox-orders: []
                    nullable: true
                  usage:
                    type: object
                    description: 计费与耗时信息。
                    properties:
                      thirdPartyConsumeMoney:
                        type: string
                        description: 第三方消耗金额。
                        nullable: true
                      consumeMoney:
                        type: string
                        description: 平台消耗金额。
                        nullable: true
                      consumeCoins:
                        type: string
                        description: 平台消耗点数。
                        nullable: true
                      taskCostTime:
                        type: string
                        description: 任务耗时。
                        nullable: true
                    x-apifox-orders:
                      - thirdPartyConsumeMoney
                      - consumeMoney
                      - consumeCoins
                      - taskCostTime
                    nullable: true
                required:
                  - taskId
                  - status
                  - errorCode
                  - errorMessage
                  - results
                  - clientId
                  - promptTips
                x-apifox-orders:
                  - taskId
                  - status
                  - errorCode
                  - errorMessage
                  - results
                  - clientId
                  - promptTips
                  - failedReason
                  - usage
              examples:
                taskSubmitted:
                  summary: 提交任务响应示例
                  value:
                    taskId: '2013508786110730241'
                    status: RUNNING
                    errorCode: ''
                    errorMessage: ''
                    results: null
                    clientId: f828b9af25161bc066ef152db7b29ccc
                    promptTips: >-
                      {"result": true, "error": null, "outputs_to_execute":
                      ["4"], "node_errors": {}}
                taskSucceeded:
                  summary: 任务完成（查询状态接口）响应示例
                  value:
                    taskId: '2013508786110730241'
                    status: SUCCESS
                    errorCode: ''
                    errorMessage: ''
                    failedReason: {}
                    usage:
                      consumeMoney: null
                      consumeCoins: null
                      taskCostTime: '0'
                      thirdPartyConsumeMoney: null
                    results:
                      - url: >-
                          https://rh-images-1252422369.cos.ap-beijing.myqcloud.com/22820eb19d5010de41dbf6856e984340/2026-06-11/8f3f015ae0d53fa76afb2605ee194e78.mp4
                        outputType: mp4
                        text: null
                    clientId: ''
                    promptTips: ''
          headers: {}
      security: []
      x-sku-id: '2034917373414539273'
      x-apifox-folder: 模型API/视频生成与处理/text-to-video/seedance2.0/文生视频
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/7913447/apis/api-448183167-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://www.runninghub.cn
    description: runninghub.cn
security: []

```
