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

# Seedance 2.0

> Create Seedance 2.0 tasks with the official ByteDance model ID and content[] JSON

POST

▶

<dialog>
  <form>
    ➤×

    API Key \*Bearer

    ### cURL

    <pre aria-label="cURL" />

    <pre aria-live="polite" />
  </form>
</dialog>

Use official ByteDance model ID `dreamina-seedance-2-0-260128`. Keep the official JSON body and switch the video base URL and API key to TensorAI. For asset URL and AK/SK settings, see [migration settings](https://docs.tensorslab.com/api-reference/seedance/introduction.md).

Select Try it to create a task. After creation, Query task prefills the task ID and API key. You can also [query a video task](https://docs.tensorslab.com/api-reference/seedance/query-task.md?playground=open) to retrieve status and results.

## Create a task

```bash theme={null}
curl -X POST "https://api.tensorslab.com/v1/video/contents/generations/tasks" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "content": [{"type": "text", "text": "A paper boat floating on a quiet lake"}],
    "duration": 5,
    "resolution": "720p",
    "ratio": "16:9",
    "generate_audio": true,
    "watermark": false
  }'
```

HTTP 200 response:

```json theme={null}
{"id":"task_example"}
```

Save the returned `id` to check progress and retrieve the video.

## Request parameters

| Parameter | Type | Description |
| - | - | - |
| `model` | string, required | Official ByteDance ID `dreamina-seedance-2-0-260128` |
| `content` | object\[], required | Official text, image, audio or video content format |
| `duration` | integer | Seconds, `4–15` or `-1` (automatic); model decides when omitted |
| `resolution` | string | `480p`, `720p`, `1080p`; combinations depend on model support |
| `ratio` | string | `adaptive`, `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` |
| `generate_audio`, `watermark`, `return_last_frame` | boolean | Synchronized audio, watermark and last frame, subject to model support |
| `seed` | integer | `-1–2147483647`, subject to model support |
| `frames` | integer | `29–289`, in steps of `25+4n`; takes precedence over duration, subject to model support |
| `execution_expires_after` | integer | Execution expiry in seconds, `3600–259200` |
| `priority` | integer | Execution priority, `0–9` |
| `safety_identifier`, `callback_url`, `service_tier` | string | Safety identifier, callback and service tier; forwarded as supplied |
| `draft`, `camera_fixed` | boolean | Draft mode and fixed camera, subject to model support |
| `tools` | object\[] | At most one `{"type":"web_search"}` tool; availability depends on the model |

The JSON body limit is 64 MiB. Use JSON booleans `true` / `false`. Omitted optional values are left to the model; supplied values must meet the field and model requirements.

2.0 does not accept `output_format` or `omni_reference_task_type`; use [Seedance 2.5](https://docs.tensorslab.com/api-reference/seedance/seedance-2-5.md) for these fields. Available parameters depend on the model.

## Media and content

| Type | Content field | `role` |
| - | - | - |
| Text | `text` | None |
| Image | `image_url.url` | `first_frame`, `last_frame`, `reference_image`; may be omitted for official first-frame semantics |
| Audio | `audio_url.url` | `reference_audio` |
| Video | `video_url.url` | `reference_video` |

Use public HTTP(S) URLs or `asset://<ASSET_ID>` from the current account. Images and audio also accept Base64 Data URLs (decoded limits: 30 MiB and 15 MiB). Inline video Base64 is unsupported. URLs must not target local or private addresses.

For a reference image, replace the creation request's `content` with:

```json theme={null}
[
  {"type":"text","text":"Keep the reference character's appearance and show them walking in the rain"},
  {"type":"image_url","image_url":{"url":"asset://<ASSET_ID>"},"role":"reference_image"}
]
```

Try it starts with one text item and one image item. Select each item's `type` and fill its matching fields. Use Add item for more media, or delete items you do not need.

Existing assets undergo ownership and readiness checks. See [asset management](https://docs.tensorslab.com/api-reference/seedance/assets.md) for manual registration and visual verification.

## Retrieve results

[Try it: query a video task](https://docs.tensorslab.com/api-reference/seedance/query-task.md?playground=open). Seedance 2.0 and 2.5 share the same query endpoint.

```bash theme={null}
curl "https://api.tensorslab.com/v1/video/contents/generations/tasks/<TASK_ID>" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
```

| `status` | Meaning |
| - | - |
| `queued` | Queued |
| `running` | Processing, including output transfer |
| `succeeded` | Read `content.video_url` |
| `failed`, `cancelled`, `expired` | Terminal; inspect `error.code` / `error.message` |

Example success response (optional metadata varies):

```json theme={null}
{
  "id":"task_example",
  "model":"dreamina-seedance-2-0-260128",
  "status":"succeeded",
  "content":{"video_url":"https://example.com/output.mp4","last_frame_url":"","file_url":""},
  "usage":{"prompt_tokens":0,"completion_tokens":1000,"total_tokens":1000},
  "resolution":"720p","ratio":"16:9","duration":5,"framespersecond":24,
  "created_at":1794787200,"updated_at":1794787260
}
```

Only tasks created by the current account are accessible. The primary video URL is the platform's transferred output. Read `content.last_frame_url` when a last frame was requested and returned, and use the returned `duration` for automatic-duration tasks.

## Official Python SDK

This example uses the official `volcenginesdkarkruntime` SDK. See the [official SDK installation guide](https://docs.volcengine.com/docs/ark/install-and-upgrade-sdk?lang=en).

```bash theme={null}
pip install 'volcengine-python-sdk[ark]'
```

Set `PLATFORM_API_KEY` to your TensorAI API key:

```python theme={null}
import os
import time
from volcenginesdkarkruntime import Ark

client = Ark(api_key=os.environ["PLATFORM_API_KEY"],
             base_url="https://api.tensorslab.com/v1/video")
task = client.content_generation.tasks.create(
    model="dreamina-seedance-2-0-260128",
    content=[{"type":"text","text":"A paper boat floating on a quiet lake"}],
    duration=5, resolution="720p", ratio="16:9",
)
for _ in range(240):
    result = client.content_generation.tasks.get(task_id=task.id)
    if result.status == "succeeded":
        print(result.content.video_url)
        break
    if result.status in {"failed", "cancelled", "expired"}:
        raise RuntimeError(result.error)
    time.sleep(5)
else:
    raise TimeoutError("Retain task.id and query again later")
```


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