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

# Seedance Video: Unified Request Parameters

> Shared request fields, media role arrays, and complete examples for every Seedance route

> [!NOTE]
>
> **Key points for AI agents**
>
> * Endpoint: `POST https://1788.love/v1/videos` with `Authorization: Bearer YOUR_1788_API_KEY` and `Content-Type: application/json`.
> * Required: `model` and `prompt` (`prompt` may be omitted when promoting a Draft task). Always pass `duration`, `resolution`, and `aspect_ratio` explicitly.
> * Pass media as role arrays: `image_with_roles`, `video_with_roles`, `audio_with_roles`, each item `{ "url": "...", "role": "..." }`.
> * When attaching reference videos, pass `reference_video_duration` (total integer seconds across all reference videos).
> * Media URLs must be public HTTPS URLs—use [Upload media](https://docs.1788.love/en/api-reference/upload-image.md) for local files. On H routes (`seedance-hc-*`), pass public HTTPS URLs directly; the server handles compliance screening automatically.
> * Unsupported media types or counts above a route's limit return an immediate 4xx error (never silently truncated).

## Request fields

| Field | Type | Required | Description |
| - | - | - | - |
| `model` | string | Yes | Route model ID from [Overview](https://docs.1788.love/en/video/seedance/overview.md), e.g. `seedance-hc-2.5` |
| `prompt` | string | Yes | Scene description; put spoken dialogue inside quotes for best results |
| `duration` | integer | Recommended | Output length in seconds (JSON number, not string). Typically 4–30 for 2.5, 4–15 for 2.0 |
| `resolution` | string | Recommended | `480p` / `720p` / `1080p` / `4k` (default `720p`), subject to route support |
| `aspect_ratio` | string | Recommended | `16:9` / `9:16` / `1:1` / `4:3` / `3:4` / `21:9`; official routes also support `adaptive`. Alias `ratio` is accepted |
| `image_with_roles` | object\[] | No | Image items with `role`: `first_frame`, `last_frame`, or `reference_image` (default) |
| `video_with_roles` | object\[] | No | Reference videos with `role: "reference_video"` |
| `audio_with_roles` | object\[] | No | Reference audio with `role: "reference_audio"` |
| `reference_video_duration` | integer | When using ref videos | Total duration (rounded up, integer seconds) of all reference videos |
| `generate_audio` | boolean | No | Generate synchronized audio (default `true`). Ignored on routes that do not expose this toggle |
| `draft` | boolean | No | `true` to generate a 480p Draft preview (`seedance-hc-2.5` only) |
| `draft_task_id` | string | No | Task ID from a completed Draft preview to render the 1080p final (`seedance-hc-2.5` only) |

> [!NOTE]
>
> Legacy compatibility: plain URL arrays (`image_urls`, `video_urls`, `audio_urls`) are still accepted (images are treated as `reference_image`). Use `*_with_roles` in new integrations so you can specify `first_frame` and `last_frame`.

## Three image modes

Choose only one mode per request (do not mix `first_frame`/`last_frame` with reference media):

| Mode | Payload | Behavior |
| - | - | - |
| First frame | 1 × `first_frame` | Video starts from this image |
| First + last frame | 1 × `first_frame` + 1 × `last_frame` | Video transitions from first frame to last frame |
| Multimodal reference | Multiple `reference_image`, optionally with `video_with_roles` and `audio_with_roles` | References subjects, products, style, motion, or audio |

> [!NOTE]
>
> On `seedance-hc-2.5`, first-frame and first+last-frame requests always follow the first frame's aspect ratio (`adaptive`); provide a vertical first frame if you want vertical output.

## Examples

### Text-to-video

```bash theme={null}
curl https://1788.love/v1/videos \
  -H "Authorization: Bearer YOUR_1788_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-hc-2.5",
    "prompt": "A girl running barefoot along a beach at sunrise, slow motion, cinematic lighting",
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }'
```

### First and last frame

```json theme={null}
{
  "model": "seedance-hc-2.0",
  "prompt": "Slow push-in as the flower bud gradually blooms open",
  "duration": 5,
  "resolution": "1080p",
  "aspect_ratio": "adaptive",
  "image_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_XXX.png", "role": "first_frame" },
    { "url": "https://ruyi6.cn/r/EXAMPLE_YYY.png", "role": "last_frame" }
  ]
}
```

### Multimodal reference (image + video + audio)

```json theme={null}
{
  "model": "seedance-hc-2.5",
  "prompt": "The model from image 1 wearing the outfit from image 2 walks the runway following the motion in video 1, with audio 1 as background music",
  "duration": 10,
  "resolution": "720p",
  "aspect_ratio": "9:16",
  "image_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_A.png", "role": "reference_image" },
    { "url": "https://ruyi6.cn/r/EXAMPLE_B.png", "role": "reference_image" }
  ],
  "video_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_C.mp4", "role": "reference_video" }
  ],
  "audio_with_roles": [
    { "url": "https://ruyi6.cn/r/EXAMPLE_D.mp3", "role": "reference_audio" }
  ],
  "reference_video_duration": 6
}
```

### Full Python workflow (create -> poll -> download)

```python theme={null}
import time
import requests

BASE = "https://1788.love"
HEADERS = {"Authorization": "Bearer YOUR_1788_API_KEY"}

task = requests.post(f"{BASE}/v1/videos", headers=HEADERS, json={
    "model": "seedance-2.0-req-b",
    "prompt": "An orange tabby cat stretching on a windowsill in afternoon sunlight",
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9",
}).json()
task_id = task["id"]

while True:
    info = requests.get(f"{BASE}/v1/videos/{task_id}", headers=HEADERS).json()
    status = info.get("status")
    if status == "completed":
        break
    if status == "failed":
        raise RuntimeError(info.get("error"))
    time.sleep(5)

video = requests.get(f"{BASE}/v1/videos/{task_id}/content", headers=HEADERS)
video.raise_for_status()
open("result.mp4", "wb").write(video.content)
```

> [!NOTE]
>
> **Progress, previews, and output URLs**:
>
> * On official routes (`seedance-hc-*`, `seedance-n-*`, `seedance-ma-*`, `seedance-f-*`, `seedance-nsfw-*`), poll by `status` (`queued` / `in_progress` / `completed` / `failed`). Volcengine Ark's native API does not emit intermediate percentage progress or live in-progress previews, so `progress` stays `0` until completion and jumps directly to `100` (for low-cost 480p preview renders before 1080p finals, use `draft` on `seedance-hc-2.5`).
> * Download completed videos via `GET /v1/videos/{id}/content`. Official routes are backed by Volcengine official direct links (valid for 24 hours—download and store promptly).
> * On token-billed official routes (`seedance-hc-*`, `seedance-n-*`, `seedance-ma-*`, `seedance-f-*`, `seedance-nsfw-*`), the completed `GET /v1/videos/{id}` response includes `"usage": { "completion_tokens": ..., "total_tokens": ... }` for exact token reconciliation.

See [Async tasks](https://docs.1788.love/en/guides/async-tasks.md) for polling status values and download details.


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