---
title: Seedance Text-to-Video
url: https://runapi.ai/zh-CN/docs/api/seedance/text-to-video.md
canonical: https://runapi.ai/zh-CN/docs/api/seedance/text-to-video
locale: zh-CN
---

# Seedance Text-to-Video

## 概览

使用支持的模型创建异步文生视频任务。使用返回的任务 ID 查询状态，或提供 callback_url 接收终态投递。

### 快速开始

1. 创建 API Key，并将其设置为 RUNAPI_API_KEY。
2. 选择一个支持的模型，并发送与该模型 Schema 匹配的 POST 请求。
3. 保存返回的任务 ID，随后轮询到终态，或处理终态回调。

## 端点

POST /api/v1/seedance/text_to_video

基础 URL: https://runapi.ai

API 版本: v1

身份验证: Authorization: Bearer YOUR_API_TOKEN

## 支持的模型

打开模型页可查看当前价格、限流和商业使用详情。

- [seedance-1.5-pro](/models/seedance/1.5-pro)
- [seedance-2-mini](/models/seedance/2-mini)
- [seedance-2.0](/models/seedance/2.0)
- [seedance-2.0-fast](/models/seedance/2.0-fast)
- [seedance-v1-lite](/models/seedance/v1-lite)
- [seedance-v1-pro](/models/seedance/v1-pro)
- [seedance-v1-pro-fast](/models/seedance/v1-pro-fast)

## 请求 Schema

字段和允许的取值取决于所选模型。提供 callback_url 后，它会收到任务终态投递。

### seedance-1.5-pro

```json
{
  "aspect_ratio": {
    "enum": [
      "1:1",
      "4:3",
      "3:4",
      "16:9",
      "9:16",
      "21:9"
    ],
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "duration_seconds": {
    "max": 12,
    "min": 4,
    "required": true,
    "type": "integer"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "generate_audio": {
    "type": "boolean"
  },
  "lock_camera": {
    "type": "boolean"
  },
  "model": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "480p",
      "720p",
      "1080p"
    ],
    "type": "string"
  },
  "prompt": {
    "type": "string"
  },
  "seed": {
    "max": 2147483647,
    "min": -1,
    "type": "integer"
  },
  "source_image_urls": {
    "max_items": 2,
    "type": "array"
  }
}
```

### seedance-2-mini

```json
{
  "aspect_ratio": {
    "enum": [
      "1:1",
      "4:3",
      "3:4",
      "16:9",
      "9:16",
      "21:9",
      "auto"
    ],
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "duration_seconds": {
    "max": 15,
    "min": 4,
    "type": "integer"
  },
  "first_frame_image_url": {
    "type": "string"
  },
  "generate_audio": {
    "type": "boolean"
  },
  "last_frame_image_url": {
    "type": "string"
  },
  "model": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "480p",
      "720p"
    ],
    "type": "string"
  },
  "prompt": {
    "type": "string"
  },
  "reference_audio_urls": {
    "max_items": 3,
    "type": "array"
  },
  "reference_image_urls": {
    "max_items": 9,
    "type": "array"
  },
  "reference_video_urls": {
    "max_items": 3,
    "type": "array"
  },
  "web_search": {
    "type": "boolean"
  }
}
```

### seedance-2.0

```json
{
  "aspect_ratio": {
    "enum": [
      "1:1",
      "4:3",
      "3:4",
      "16:9",
      "9:16",
      "21:9",
      "auto"
    ],
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "duration_seconds": {
    "max": 15,
    "min": 4,
    "type": "integer"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "type": "string"
  },
  "generate_audio": {
    "type": "boolean"
  },
  "last_frame_image_url": {
    "type": "string"
  },
  "model": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "480p",
      "720p",
      "1080p",
      "4k"
    ],
    "type": "string"
  },
  "prompt": {
    "type": "string"
  },
  "reference_audio_urls": {
    "max_items": 3,
    "type": "array"
  },
  "reference_image_urls": {
    "max_items": 9,
    "type": "array"
  },
  "reference_video_urls": {
    "max_items": 3,
    "type": "array"
  },
  "web_search": {
    "type": "boolean"
  }
}
```

### seedance-2.0-fast

```json
{
  "aspect_ratio": {
    "enum": [
      "1:1",
      "4:3",
      "3:4",
      "16:9",
      "9:16",
      "21:9",
      "auto"
    ],
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "duration_seconds": {
    "max": 15,
    "min": 4,
    "type": "integer"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "type": "string"
  },
  "generate_audio": {
    "type": "boolean"
  },
  "last_frame_image_url": {
    "type": "string"
  },
  "model": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "480p",
      "720p"
    ],
    "type": "string"
  },
  "prompt": {
    "type": "string"
  },
  "reference_audio_urls": {
    "max_items": 3,
    "type": "array"
  },
  "reference_image_urls": {
    "max_items": 9,
    "type": "array"
  },
  "reference_video_urls": {
    "max_items": 3,
    "type": "array"
  },
  "web_search": {
    "type": "boolean"
  }
}
```

### seedance-v1-lite

```json
{
  "aspect_ratio": {
    "enum": [
      "1:1",
      "4:3",
      "3:4",
      "16:9",
      "9:16",
      "9:21"
    ],
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "duration_seconds": {
    "enum": [
      5,
      10
    ],
    "required": true,
    "type": "integer"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "type": "string"
  },
  "last_frame_image_url": {
    "type": "string"
  },
  "lock_camera": {
    "type": "boolean"
  },
  "model": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "480p",
      "720p",
      "1080p"
    ],
    "type": "string"
  },
  "prompt": {
    "type": "string"
  },
  "seed": {
    "type": "integer"
  }
}
```

### seedance-v1-pro

```json
{
  "aspect_ratio": {
    "enum": [
      "1:1",
      "4:3",
      "3:4",
      "16:9",
      "9:16",
      "21:9"
    ],
    "type": "string"
  },
  "callback_url": {
    "type": "string"
  },
  "duration_seconds": {
    "enum": [
      5,
      10
    ],
    "required": true,
    "type": "integer"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "type": "string"
  },
  "lock_camera": {
    "type": "boolean"
  },
  "model": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "480p",
      "720p",
      "1080p"
    ],
    "type": "string"
  },
  "prompt": {
    "type": "string"
  },
  "seed": {
    "type": "integer"
  }
}
```

### seedance-v1-pro-fast

```json
{
  "callback_url": {
    "type": "string"
  },
  "duration_seconds": {
    "enum": [
      5,
      10
    ],
    "required": true,
    "type": "integer"
  },
  "enable_safety_checker": {
    "type": "boolean"
  },
  "first_frame_image_url": {
    "required": true,
    "type": "string"
  },
  "model": {
    "type": "string"
  },
  "output_resolution": {
    "enum": [
      "720p",
      "1080p"
    ],
    "type": "string"
  },
  "prompt": {
    "type": "string"
  },
  "seed": {
    "max": 2147483647,
    "min": -1,
    "type": "integer"
  }
}
```

## 创建已接受

HTTP 202 - POST /api/v1/seedance/text_to_video

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## 轮询处理中

HTTP 200 - GET /api/v1/seedance/text_to_video/:id

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## 轮询已完成

HTTP 200 - GET /api/v1/seedance/text_to_video/:id

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "completed",
  "videos": [
    {
      "url": "https://file.runapi.ai/reference-video.mp4"
    }
  ]
}
```

## 轮询失败

HTTP 200 - GET /api/v1/seedance/text_to_video/:id

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "error": "Task processing failed.",
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## 客户回调：已完成

HTTP 200 - POST callback_url

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "id": "tsk_reference_demo",
  "status": "completed",
  "videos": [
    {
      "url": "https://file.runapi.ai/reference-video.mp4"
    }
  ]
}
```

## 客户回调：失败

HTTP 200 - POST callback_url

```json
{
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "error": {
    "code": "generation_failed",
    "message": "Task processing failed."
  },
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## 错误

HTTP 400

```json
{
  "error": {
    "code": "invalid_request",
    "message": "A required request field is missing."
  }
}
```

## 生成的代码示例

直接使用 cURL，或安装所用语言的 SDK。每个示例都会提交本参考中经过验证的请求。

### curl

```curl
curl -X POST https://runapi.ai/api/v1/seedance/text_to_video \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"model":"seedance-1.5-pro","duration_seconds":5,"prompt":"A time-lapse of clouds moving over a mountain lake."}'
```

## 相关指南

- [API 身份验证](/docs/guides/authentication)
- [Task API 快速开始](/docs/guides/task-api/quickstart)
