> ## 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.

# Doubao SeeDance 비디오 생성

> Generate videos using ByteDance Doubao SeeDance model

> [!NOTE]
>
> **중국 본토 사용자 안내:** 중국 본토 사용자는 `https://toapis.cn` 를 API 엔드포인트(Base URL)로 사용해 주세요. 본 문서의 예시에서 `https://toapis.com` 을 `https://toapis.cn` 로 바꿔 주세요.

* ByteDance Doubao video generation model
* Use model parameter to select `doubao-seedance-1-0-pro-fast` or `doubao-seedance-1-0-pro-quality` model
* Supports text-to-video generation
* Supports first frame / last frame / reference image control
* Async task management, query results by task ID

> [!WARNING]
>
> **Important Change**: For better performance and cost control, we no longer support passing base64 image data directly in `image_urls`. Please use the [Upload 이미지 API](https://docs.toapis.com/docs/ko/api-reference/uploads/images.md) first to upload images and get URLs, then call this endpoint.

## Authorizations

**Authorization** `string` *required*

All endpoints require Bearer Token authentication

Get your API Key from the [API Key Management Page](https://toapis.com/console/token)

Add to request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Body

**model** `string` *required* (default: doubao-seedance-1-0-pro-fast)

Video generation model name

Available models:

* `doubao-seedance-1-0-pro-fast` - Fast version (40-90 seconds generation)
* `doubao-seedance-1-0-pro-quality` - Quality version (90-300 seconds generation)

**prompt** `string` *required*

Video content description

Describe scenes, actions, styles in detail for better generation results

Example: `"Sunset at the beach, golden sunlight on the sea, waves gently hitting the sand"`

**duration** `integer` (default: 5)

Video duration (seconds)

Supported range: `2` \~ `12` seconds

Default: `5`

**aspect\_ratio** `string` (default: 16:9)

Video aspect ratio

Options:

* `16:9` - Landscape
* `9:16` - Portrait
* `1:1` - Square
* `4:3` - Traditional ratio
* `3:4` - Vertical traditional ratio
* `21:9` - Ultra-wide

Default: `16:9`

**resolution** `string` (default: 720p)

Video resolution

Options:

* `480p` - Standard definition
* `720p` - High definition
* `1080p` - Full HD

Default: `720p`

**1080p Limitation**: When using reference images (`role: reference` in `image_with_roles`), 1080p resolution is not supported

## Resolution and Aspect Ratio Combinations

| Resolution | Supported Aspect Ratios | Notes |
| - | - | - |
| 480p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | All supported |
| 720p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | All supported |
| 1080p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | Reference image not supported |

**image\_urls** `string[]`

First frame image URL array for image-to-video generation

**⚠️ URL format only (base64 no longer supported)**

* Publicly accessible image URL (http\:// or https\://)
* You can use the [Upload 이미지 API](https://docs.toapis.com/docs/ko/api-reference/uploads/images.md) to upload local images and get URLs

Example: `["https://example.com/cat.png"]`

`image_urls` and `image_with_roles` cannot be used together

**image\_with\_roles** `array`

Image array with roles for more precise control

**Field 설명**

**url** `string` *required*

Image URL address

**role** `string` *required*

Image role

Options:

* `first_frame` - First frame image, as video starting frame (only one supported)
* `last_frame` - Last frame image, as video ending frame (**quality version only**, only one supported)
* `reference` - Reference image, for guiding video style (only one supported)

Example:

```json theme={null}
[
  {"url": "https://example.com/start.png", "role": "first_frame"},
  {"url": "https://example.com/end.png", "role": "last_frame"}
]
```

> [!WARNING]
>
> * `image_urls` and `image_with_roles` cannot be used together
> * Only one image per role is supported
> * `last_frame` is only supported by `doubao-seedance-1-0-pro-quality` version, fast version does not support first and last frame together

**metadata** `object`

Extended parameters (optional)

**Field 설명**

**seed** `integer`

Seed integer for controlling generation randomness

Range: `-1` \~ `2^32-1`

Same seed value produces similar results, but not guaranteed to be identical

## 소재 심사

요청에 이미지가 있으면 일부 채널은 생성 제출 전에 이미지를 자동으로 심사합니다. 추가 파라미터는 필요 없으며 기존 이미지 필드에 이미지 URL을 전달하면 됩니다.

* 요청이 접수되면 즉시 동영상 작업을 반환합니다. 심사가 필요하면 작업은 `queued` 상태를 유지하며, 요청의 모든 소재가 통과한 뒤에 생성을 제출합니다. 최초 심사에는 몇 분이 걸릴 수 있으며, 같은 사용자가 같은 채널에서 같은 URL을 다시 사용하면 심사 결과를 재사용합니다.
* 소재 준비는 라운드당 기본 최대 20분입니다. 심사 거부 또는 준비 시간 초과 시 작업은 `failed`로 종료되며 사유는 `error.message`에서 확인할 수 있습니다. 심사를 통과하지 못하면 동영상 생성 요금은 청구되지 않습니다.
* 이미지는 공개 HTTP(S) URL이어야 하며 Base64와 로컬 경로는 지원하지 않습니다. 이미지는 20 MB 이하(일부 채널은 최대 30 MB)로 준비하세요. 모델의 기존 형식 제한은 그대로 적용됩니다.
* 심사를 진행하는 채널은 접수 시 이미지 URL을 검증합니다. URL에 인증 정보가 있거나 2048바이트를 넘으면 HTTP 400을 반환하며 `error.code`는 `invalid_private_assets`입니다.
* 소재는 URL로 식별합니다. 파일 내용이 바뀌면 새 URL을 사용하세요.
* 기존 `asset://` 참조는 폐지되었으며 HTTP 400을 반환합니다.

## 응답

**id** `string`

Unique task identifier for status queries

**object** `string`

Object type, always `generation.task`

**model** `string`

모델 name used

**status** `string`

Task status

* `queued` - Queued for processing
* `in_progress` - Processing
* `completed` - Successfully completed
* `failed` - Failed

**progress** `integer`

Task progress percentage (0-100)

**created\_at** `integer`

Task creation timestamp (Unix timestamp)

**metadata** `object`

Task metadata

```bash cURL (Quick Preview Landscape Video) theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-1-0-pro-fast",
    "prompt": "Sunset at the beach, golden sunlight on the sea, waves gently hitting the sand",
    "duration": 5,
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'
```

```bash cURL (High-Quality Portrait Short Video) theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-1-0-pro-quality",
    "prompt": "A girl spinning under cherry blossom trees, petals falling with the wind",
    "duration": 5,
    "aspect_ratio": "9:16",
    "resolution": "1080p"
  }'
```

```bash cURL (Dynamic Transition Effect - First/Last Frame) theme={null}
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-1-0-pro-quality",
    "prompt": "Scene transitions from day to night, city lights gradually turning on",
    "duration": 5,
    "image_with_roles": [
      {"url": "https://example.com/day.png", "role": "first_frame"},
      {"url": "https://example.com/night.png", "role": "last_frame"}
    ]
  }'
```

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

response = requests.post(
    "https://toapis.com/v1/videos/generations",
    headers={
        "Authorization": "Bearer your-ToAPIs-key",
        "Content-Type": "application/json"
    },
    json={
        "model": "doubao-seedance-1-0-pro-fast",
        "prompt": "Sunset at the beach, golden sunlight on the sea, waves gently hitting the sand",
        "duration": 5,
        "aspect_ratio": "16:9",
        "resolution": "720p"
    }
)

task = response.json()
print(f"Task ID: {task['id']}")
print(f"Status: {task['status']}")
```

```javascript JavaScript theme={null}
const response = await fetch('https://toapis.com/v1/videos/generations', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer your-ToAPIs-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    model: 'doubao-seedance-1-0-pro-fast',
    prompt: 'Sunset at the beach, golden sunlight on the sea, waves gently hitting the sand',
    duration: 5,
    aspect_ratio: '16:9',
    resolution: '720p'
  })
});

const task = await response.json();
console.log(`Task ID: ${task.id}`);
console.log(`Status: ${task.status}`);
```

```json 200 theme={null}
{
  "id": "task_vid_xyz789ghi012",
  "object": "generation.task",
  "model": "doubao-seedance-1-0-pro-fast",
  "status": "queued",
  "progress": 0,
  "created_at": 1703884800,
  "metadata": {}
}
```


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