> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# seedance-2.5 樣片模式

> 先用低成本樣片確認效果，再用樣片任務生成 1080p 成稿

<Note>
  **中國大陸用戶請注意：** 中國大陸用戶請使用 `https://toapis.cn` 作為接口地址（Base URL）。文檔示例中的 `https://toapis.com` 請替換為 `https://toapis.cn`。
</Note>

樣片模式把一次生成拆成兩個階段：先按較低成本生成 480p 樣片，確認運鏡和畫面後，再用該樣片生成 1080p 成稿。成稿由上游複用樣片的提示詞和素材，因此第二階段不需要重複提交這些內容。

兩個階段都呼叫 `POST /v1/videos/generations`，並使用同一個 `seedance-2-5` 模型。

## 兩階段流程

1. 提交樣片請求，帶上 `draft: true`，從回應中取得樣片任務 ID。
2. 等待樣片完成，透過[取得影片任務狀態](/docs/zh-Hant/api-reference/tasks/video-status)確認 `status` 為 `completed`。
3. 提交成稿請求，帶上 `draft_task_id` 並填入第 1 步的樣片任務 ID，不要重複傳提示詞或素材。

## 階段對照

| 項目 | 樣片（`draft: true`） | 成稿（`draft_task_id`） |
| - | - | - |
| 支援的模型 | 僅 `seedance-2-5` | 僅 `seedance-2-5` |
| `resolution` | 固定 `480p` | 固定 `1080p` |
| `output_format` | `mp4` | `mp4` 或 `mov` |
| 提示詞與素材 | 與[一般生成](./generation)一致 | 不接受，必須省略 |
| 樣片任務狀態要求 | - | 必須已成功完成 |
| 樣片任務有效期 | - | 自樣片建立起 7 天內 |
| 計費 | 按樣片價結算 | 把樣片作為影片輸入，按含影片輸入的費率結算 |

<Warning>
  成稿必須與樣片使用相同的 `model`，且樣片所在渠道的樣片能力仍然可用。樣片任務未成功完成、建立已超過 7 天、模型不一致或渠道能力已關閉時，成稿會以 `invalid_draft_task` 失敗，需要重新生成樣片。
</Warning>

## Body

<ParamField body="draft" type="boolean" default={false}>
  設為 `true` 提交樣片請求。樣片按 `480p` 生成，其餘參數與[一般生成](./generation)一致。

  僅支援 `seedance-2-5`；用於其他模型時返回 `draft mode is only supported for Seedance 2.5`。
</ParamField>

<ParamField body="draft_task_id" type="string">
  成稿請求必填，填入樣片請求返回的任務 ID（`tsk_vid_...`）。

  不能與 `draft: true` 同時使用。傳入 `draft_task_id` 後不得再傳 `prompt`、`image_urls`、`image_with_roles`、`video_with_roles` 或 `audio_with_roles`，否則返回 `draft requests cannot include prompt or media`。
</ParamField>

<ParamField body="resolution" type="string">
  樣片固定 `480p`，成稿固定 `1080p`。可以省略，省略時按對應階段的固定值生成；明確傳入其他值會被拒絕。
</ParamField>

<ParamField body="output_format" type="string" default="mp4">
  僅成稿請求可指定，支援 `mp4` 和 `mov`。
</ParamField>

<ParamField body="return_last_frame" type="boolean" default={false}>
  成稿不會自動繼承樣片的尾幀設定。成稿也需要返回尾幀時，請在成稿請求中重新傳入 `true`。
</ParamField>

`prompt`、`duration`、`aspect_ratio`、`generate_audio`、參考素材等其餘參數在樣片階段的使用方式與一般生成一致，詳見[Seedance 2.5 影片生成](./generation)。

## 請求範例

下面兩個範例分別是提交樣片和用樣片生成成稿的完整請求，可以依序執行。

<RequestExample>
  ```bash cURL（提交樣片） theme={null}
  curl --request POST \
    --url https://toapis.com/v1/videos/generations \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "seedance-2-5",
      "draft": true,
      "prompt": "電影感產品特寫，鏡頭緩慢推進。",
      "duration": 4,
      "resolution": "480p",
      "return_last_frame": true
    }'
  ```

  ```bash cURL（用樣片生成成稿） theme={null}
  curl --request POST \
    --url https://toapis.com/v1/videos/generations \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "seedance-2-5",
      "draft_task_id": "tsk_vid_xxx",
      "resolution": "1080p",
      "output_format": "mp4",
      "return_last_frame": true
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "tsk_vid_xxx",
    "object": "generation.task",
    "model": "seedance-2-5",
    "status": "in_progress",
    "progress": 10,
    "created_at": 1781577600
  }
  ```
</ResponseExample>

## 計費

樣片和成稿分別計費，各自在任務完成時結算。樣片按樣片價結算；成稿把樣片影片作為影片輸入，按含影片輸入的費率結算，因此單價高於樣片。實際扣費以任務結果和[價格與實際費用](/docs/zh-Hant/api-reference/account/pricing)為準。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.