---
title: Seedance 2.0 Mini video generation API · Unified v1
description: "Seedance 2.0 Mini: public request parameters, defaults, availability limits and asynchronous task examples."
outline: [2, 3]
---

# Seedance 2.0 Mini video generation API · Unified v1

::: info API version
This page describes the **Unified Video API (v1)**. You can independently choose the [Seedance Native API (v3)](/api/seedance/) instead; use the request and result format documented for your chosen interface.
:::

For Seedance-family API model IDs, a successful, fully settled `GET /v1/tasks/{id}` response may include `assets[].source_url` for each recorded original asset URL. Other models and unfinished or failed tasks omit this field. The original link may already be expired or access-limited; its expiry is not checked and the link is not refreshed when querying. Save files promptly; use `assets[].url` if the original link is unavailable. Platform download links and console previews are unchanged. Do not send your Tokenlio API Key to either asset URL.

::: info Model capabilities and optional controls
Only specifications and modes currently available for the requested API model ID can be used. Ranges on this page are interface limits, not a guarantee that every model ID supports every combination. Unsupported durations, resolutions, input counts or modes are rejected with `VIDEO_REQUEST_INVALID`; do not retry the same unsupported request.

Optional controls `generate_audio`, `return_last_frame`, `seed`, `watermark` and `output_format` may have no effect or use a default when unsupported. Defaults describe the request, not a guarantee of generated audio, a final frame, repeatable output or a particular container. Check the actual `assets` and downloaded file. Unknown fields, invalid types and `null` are still rejected.
:::

**Seedance 2.0 Mini ｜ explicit integer duration ｜ video and reference inputs ｜ asynchronous tasks**

Seedance 2.0 Mini uses the shared asynchronous video API. Use the parameters and examples below only for specifications and modes supported by the API model ID you request.

**Base URL**: `https://api.tokenlio.ai`

Every path below is relative to the Base URL:

- **Create**: `POST /v1/videos/generations`, returns **202 Accepted**.
- **Query**: `GET /v1/tasks/{id}`, reads task status and results.
- **Download**: `GET /v1/tasks/{id}/content`, obtains the video file.

::: warning Only `480p` and `720p`
Mini does not support `1080p` or `4k`. Set `resolution` to `480p` or `720p`; reusing a high-resolution Standard request returns `unsupported model resolution`.
:::

::: tip Before you start
1. Sign in to the Tokenlio console and create a Workspace **model-routing API Key**.
2. Copy the published Mini API model ID from the [model catalog](https://api.tokenlio.ai/marketplace) and replace `example/seedance-2.0-mini` in the examples.
3. Video tasks are asynchronous: creation returns a 202 response with the task `id` immediately, so poll the query endpoint for the result.
:::

## Quick start (end-to-end)

Set the Key securely as the `TOKENLIO_API_KEY` environment variable and replace the model ID before running the example.

::: warning Do not automatically retry creation
Every POST without an idempotency identifier is an independent generation request. If creation times out before you receive an `id`, check the console call records first; once you have an `id`, only query that task instead of submitting again. The optional idempotency header is described in the [shared guide](/api/videos).
:::

::: code-group

```bash [cURL]
# 1. Submit the generation task (returns 202 with the task ID)
curl -X POST "https://api.tokenlio.ai/v1/videos/generations" \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
    "model": "example/seedance-2.0-mini",
    "prompt": "A city park in the early morning, a runner crosses a tree-lined path, dappled sunlight through the leaves, the camera tracks steadily",
    "duration": 4,
    "resolution": "480p",
    "size": "16:9",
    "generate_audio": true
  }'

# 2. Query the task status (poll every 5–10 seconds)
# Replace TASK_ID with the id returned above
curl -X GET "https://api.tokenlio.ai/v1/tasks/TASK_ID" \
  -H "Authorization: Bearer $TOKENLIO_API_KEY"
```

```python [Python · batch creation]
import os
import time
import requests

API_KEY = os.environ.get("TOKENLIO_API_KEY")
BASE_URL = "https://api.tokenlio.ai"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

# Several directions for one batch: each POST returns its own task id
prompts = [
    "A city park in the early morning, a runner crosses a tree-lined path, dappled sunlight through the leaves, the camera tracks steadily",
    "A rainy day outside a convenience store, a clear umbrella leaning on the wall, pedestrians passing by, fixed medium shot",
    "A close-up of a night desk, a lamp lighting an open notebook, the pen moving across the page, the camera pushes in slowly",
]

task_ids = []
for prompt in prompts:
    payload = {
        "model": "example/seedance-2.0-mini",
        "prompt": prompt,
        "duration": 4,
        "resolution": "480p",
        "size": "16:9",
        "generate_audio": True
    }
    resp = requests.post(f"{BASE_URL}/v1/videos/generations", headers=headers, json=payload)
    resp.raise_for_status()
    task_ids.append(resp.json()["id"])

print(f"Submitted {len(task_ids)} tasks: {task_ids}")

# Poll each task and download after it succeeds
for task_id in task_ids:
    while True:
        time.sleep(5)
        result = requests.get(f"{BASE_URL}/v1/tasks/{task_id}", headers=headers).json()
        status = result.get("status")
        if status == "succeeded":
            video = next(a["url"] for a in result.get("assets", []) if a.get("role") == "video")
            print(f"{task_id} finished: {video}")
            break
        if status == "failed":
            print(f"{task_id} failed: {result.get('error')}")
            break
```

:::

Creation returns **HTTP 202 Accepted**:

```json
{
  "id": "2d7c6f10-4a8b-4f27-9f63-5c1a8e0d74b2",
  "model": "example/seedance-2.0-mini",
  "status": "queued",
  "assets": []
}
```

A successful query returns **HTTP 200 OK**. When `status=succeeded`, use the `role=video` asset. If the requested model supports final-frame delivery and returns an asset with `role=last_frame`, you can use that image in a later supported first-frame task. Sending `return_last_frame=true` alone does not guarantee a frame asset. [API guide](/api/videos).

## Request parameters

| Parameter | Type | Required / default | Definition and limits |
| --- | --- | --- | --- |
| `model` | string | **Required** | The exact published API model ID from the catalog (for example `example/seedance-2.0-mini`); display aliases are not accepted. |
| `prompt` | string | Required for text-to-video / recommended otherwise | Up to 4,000 characters; 100–500 characters is usually enough — state the subject, camera movement, environment lighting and motion detail. |
| `duration` | integer | **Required (no default)** | Output length in seconds; an integer from **4–15**. Decimals and negative values are not accepted.  Only use this option within the model's currently available capabilities. |
| `resolution` | string | `720p` | `480p` or `720p` only. `1080p` and `4k` are rejected.  Only use this option within the model's currently available capabilities. |
| `size` | string | `16:9` | Aspect ratio: `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `adaptive`.  Only use this option within the model's currently available capabilities. |
| `generate_audio` | boolean | `true` | Optional audio-generation preference; supported models apply `true` or `false`. It may have no effect; it does not guarantee audio in the result. |
| `return_last_frame` | boolean | `false` | Optional final-frame request. Use an asset with `role=last_frame` only if it is returned; some models ignore this control. |
| `seed` | integer | Optional | Optional signed 64-bit random seed. It may be ignored and never guarantees identical output. |
| `output_format` | string | `mp4` | Requested container: `mp4`. If unsupported, it may fall back to `mp4`; inspect the downloaded file instead of relying on its extension. |
| `image_urls` | string[] | Optional | Public HTTPS URLs of reference images, at most 9. **Cannot be combined with `image_with_roles`**.  Only use this option within the model's currently available capabilities. |
| `image_with_roles` | object[] | Optional | Image objects with roles, used to set first/last frames, at most 2 items. **Cannot be combined with `image_urls`**.  Only use this option within the model's currently available capabilities. |
| `image_with_roles[].url` | string | Required | Stable public HTTPS URL of the image. |
| `image_with_roles[].role` | string | Required | `first_frame` (at most 1) or `last_frame` (requires a first frame). |
| `video_urls` | string[] | Optional | Public HTTPS URLs of reference videos, at most 3 clips and 15 seconds of total input duration.  Only use this option within the model's currently available capabilities. |
| `audio_urls` | string[] | Optional | Public HTTPS URLs of reference audio, at most 3 clips. **Reference images or videos must be supplied too**; 2.0 does not accept audio-only references.  Only use this option within the model's currently available capabilities. |
| `expected_pricing_revision` | string | Optional | A pricing version you already hold; if the version changed, creation is rejected with `VIDEO_PRICE_CHANGED` and **no price is reserved or locked**. |
| `max_charge_amount` | string | Optional | Maximum USD you are willing to pay (for example `"0.50"`), at most 8 fractional digits. |

::: warning Strict JSON types
- Booleans must be real booleans (`true`/`false`) and integers must be integers (such as `5`); never send `"true"` or `"5"`.
- Do not send `null` values or undefined fields.
- `watermark` and `omni_reference_task_type` have no effect on 2.0 models; they do not enable 2.5 modes. Unknown fields and invalid JSON types are still rejected.
:::

## Usage scenarios

Advanced examples apply only when the requested model supports the illustrated specification or mode. They use the same create, query and download endpoints.

### Scenario 1: batch comparisons (text-to-video)

Run several directions of the same prompt structure at `480p` first, then produce the approved one at high resolution on the Standard model.

```json
{
  "model": "example/seedance-2.0-mini",
  "prompt": "A close-up of pour-over coffee, hot water poured into the dripper, coffee dripping slowly, steam rising in backlight, the camera tilts down slowly from above",
  "duration": 4,
  "resolution": "480p",
  "size": "16:9",
  "generate_audio": true
}
```

### Scenario 2: turn a vertical still into a short video

Use an existing vertical key visual as the first frame to generate a camera-move clip quickly, for example to test social placements.

```json
{
  "model": "example/seedance-2.0-mini",
  "prompt": "Starting from the first frame, the camera pushes in slowly while the model turns to show the back of the jacket, the fabric moving naturally with the motion",
  "duration": 5,
  "resolution": "480p",
  "size": "9:16",
  "image_with_roles": [
    { "url": "https://YOUR_PUBLIC_CDN/lookbook.png", "role": "first_frame" }
  ]
}
```

### Scenario 3: chaining clips with the last frame（when available）

If the requested model supports final-frame delivery and returns an asset with `role=last_frame`, you can use that image in a later supported first-frame task. Sending `return_last_frame=true` alone does not guarantee a frame asset.

```json
{
  "model": "example/seedance-2.0-mini",
  "prompt": "A drone flies forward along the coastline, waves breaking on the rocks, a lighthouse slowly getting closer, the camera pushing forward steadily",
  "duration": 8,
  "resolution": "720p",
  "size": "16:9",
  "return_last_frame": true
}
```

### Scenario 4: consistent style and character references

Pass several style or character images through `image_urls` to keep a batch of short clips visually consistent.

```json
{
  "model": "example/seedance-2.0-mini",
  "prompt": "Keep the flat illustration style and palette of the reference images: a fox with a backpack walks along a forest path, the camera following slowly, consistent style",
  "duration": 4,
  "resolution": "480p",
  "size": "16:9",
  "image_urls": [
    "https://YOUR_PUBLIC_CDN/style_ref_1.jpg",
    "https://YOUR_PUBLIC_CDN/character_ref.png"
  ],
  "generate_audio": false
}
```

::: tip Frames and references are mutually exclusive
When `image_with_roles` is used you cannot also send `image_urls`, `video_urls` or `audio_urls`. To fix the first frame and reference a style at the same time, describe the style in the prompt or generate the still first and use it as the first frame.
:::

## Input material guidelines

| Material | Recommended specs and limits |
| --- | --- |
| **Images** | Up to 9; JPEG, PNG, WebP or BMP; keep each file `< 30 MB`; dimensions between `300×300` and `4096×4096 px`; aspect ratio 0.4–2.5. |
| **Videos** | Up to 3 clips; prefer MP4 / H.264 at 480p or 720p; 2–15 seconds per clip, at most 15 seconds in total. |
| **Audio** | Up to 3 clips; MP3 or WAV preferred; at most 15 seconds in total; each file `< 15 MB`; **must accompany images or video**. |

Every material uses a directly reachable public HTTPS URL. Do not use private addresses or base64, and keep links valid and content stable for the life of the task.

## Common errors

| Error code / message | Cause and fix |
| --- | --- |
| `unsupported model resolution` | A resolution Mini does not support. Only `480p` and `720p` are available. |
| `duration must be an explicit integer from 4 to the model maximum` | `duration` is missing, not an integer, or outside 4–15 seconds. |
| `unsupported input asset counts or frame combination` | Too many materials, or an invalid frame combination such as `last_frame` alone. |
| `frame inputs cannot be mixed with reference inputs` | First/last frames were mixed with ordinary references. |
| `this model requires images or video with reference audio` | `audio_urls` was sent alone; audio references need images or video. |

Invalid creation requests return **400 Bad Request** directly. Query failures and timeouts are covered in the [shared guide](/api/videos#errors).

## Next steps

- [Seedance 2.0 Standard (supports `1080p` and `4k`)](/api/videos/seedance-2-0)
- [Seedance 2.0 Fast (`480p` / `720p` output)](/api/videos/seedance-2-0-fast)
- [Shared video task guide (query, download and billing)](/api/videos)
