Skip to main content
PowerTokens fully supports the Seedance 2.0 video generation model series, offering two integration methods:
  1. Full compatibility with the official Seedance 2.0 API: If you’re already using ByteDance’s official API, simply switch the Base URL and API Key for a seamless migration with zero code changes. See the Official Compatible Interface section in this document.
  2. OpenAI-style interface: A unified POST /v1/videos endpoint for a consistent calling experience across other platform models.
Base URL: Both interfaces share the same Base URL: https://api.powertokens.ai
This document covers both interfaces. The official compatible interface is in the first half, and the OpenAI-style interface is in the OpenAI-style Interface section.
Important prerequisite: Regardless of which interface you use, all image, video, and audio assets must first be uploaded through the Asset Library to obtain an asset_id, and then use the asset_id directly in your requests. See the Asset Preparation section for details.

Prerequisites

Before calling the Seedance 2.0 API, complete the following steps:
  1. Sign up / Log in: Register and log in at powertokens.ai
  2. Get an API Key: Go to the API Keys management page, create a new key, copy and store it securely
  3. Top up: Go to the Billing page and purchase Credits (video generation is pay-per-use and requires account balance)
  4. Enable Asset Library: Go to the Asset Library page, read and agree to the Asset Library User Agreement (all Seedance 2.0 assets must be uploaded through the Asset Library)

Authentication

All requests are authenticated via HTTP headers:
Authorization: <YOUR_API_KEY>

Official Compatible Interface

PowerTokens is fully compatible with the official Seedance API, with request bodies, parameter names, and response structures identical to ByteDance’s official API. If you’re already using ByteDance’s official API, simply switch the Base URL and API Key to migrate.

Migration from ByteDance Official

- https://ark.cn-beijing.volces.com
+ https://api.powertokens.ai
- Authorization: <ByteDance_API_KEY>
+ Authorization: <PowerTokens_API_KEY>

Base URL

https://api.powertokens.ai
Both interfaces share the same Base URL: https://api.powertokens.ai, differing only in the request path.

Endpoint List

OperationMethodEndpointAPI Reference
Create video generation taskPOST/byteplus/api/v3/contents/generations/tasksView
Query video generation taskGET/byteplus/api/v3/contents/generations/tasks/{id}View
List tasksGET/byteplus/api/v3/contents/generations/tasksView
Cancel / Delete taskDELETE/byteplus/api/v3/contents/generations/tasks/{id}View

Asset Input Format

In the official compatible interface, assets are passed into the url field using the asset://<ASSET_ID> format:
{
  "type": "image_url",
  "image_url": {
    "url": "asset://XXXX"
  },
  "role": "first_frame"
}
The url field for images, videos, and audio supports the following three formats:
FormatExampleDescription
Asset ID (recommended)asset://XXXXThe asset_id obtained by uploading through the Asset Library
Public URLhttps://example.com/img.jpgA publicly accessible file URL
Base64 encodingdata:image/png;base64,aHR0...Local file encoded to Base64 (not recommended for large files)

Example: Image-to-Video (using asset_id)

curl -X POST https://api.powertokens.ai/byteplus/api/v3/contents/generations/tasks \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "Camera slowly pushes in, girl smiles"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "asset://XXXX"
        }
      }
    ],
    "ratio": "adaptive",
    "duration": 5,
    "generate_audio": true,
    "watermark": false
  }'

Example: Multimodal Reference-to-Video (reference image + reference video + reference audio)

curl -X POST https://api.powertokens.ai/byteplus/api/v3/contents/generations/tasks \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "Your prompt"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "asset://XXXX"
        },
        "role": "reference_image"
      },
      {
        "type": "video_url",
        "video_url": {
          "url": "asset://XXXX"
        },
        "role": "reference_video"
      },
      {
        "type": "audio_url",
        "audio_url": {
          "url": "asset://XXXX"
        },
        "role": "reference_audio"
      }
    ],
    "ratio": "16:9",
    "duration": 10,
    "generate_audio": true,
    "watermark": false
  }'

Example: Query Task Status

curl "https://api.powertokens.ai/byteplus/api/v3/contents/generations/tasks/XXXX" \
  -H "Authorization: YOUR_API_KEY"

Example: List Tasks

curl "https://api.powertokens.ai/byteplus/api/v3/contents/generations/tasks?page_num=1&page_size=20&filter.status=succeeded" \
  -H "Authorization: YOUR_API_KEY"

Example: Cancel / Delete Task

curl -X DELETE "https://api.powertokens.ai/byteplus/api/v3/contents/generations/tasks/XXXX" \
  -H "Authorization: YOUR_API_KEY"

Official Compatible Interface vs OpenAI-style Interface

DimensionOfficial Compatible InterfaceOpenAI-style Interface
Base URLhttps://api.powertokens.ai (same)https://api.powertokens.ai (same)
Create taskPOST /byteplus/api/v3/contents/generations/tasksPOST /v1/videos
Asset input"url": "asset://XXXX" (same)"url": "asset://XXXX" (same)
Query taskGET /byteplus/api/v3/.../tasks/{id}GET /v1/videos/{task_id}
Task listGET /byteplus/api/v3/.../tasksNot supported
Cancel / Delete taskDELETE /byteplus/api/v3/.../tasks/{id}Not supported
Parameter structureIdentical to ByteDance official (content array)OpenAI-style (media array)
Use caseMigration from ByteDance official, advanced features like task list / cancelUnified calling experience across multiple platform models
The generation quality is identical for both interfaces — choose whichever fits your needs.

OpenAI-style Interface

A unified POST /v1/videos endpoint for a consistent calling experience across other platform models.

Available Models

ModelModel IDCharacteristics
Seedance 2.0dreamina-seedance-2-0-260128High quality, supports 1080p (image-to-video / first-last frame / multimodal reference scenarios)
Seedance 2.0 Fastdreamina-seedance-2-0-fast-260128Fast generation, up to 720p
Both models share the same API structure and parameters, differing only in generation speed and maximum resolution.

Supported Generation Modes

ModeDescriptionRequired media typesAPI Reference
Text-to-VideoGenerate video from text onlytextStandard · Fast
Image-to-VideoStarting frame image + texttext + first_frameStandard · Fast
First-Last Frame-to-VideoStarting frame + ending frame + texttext + first_frame + last_frameStandard · Fast
Multimodal Reference-to-VideoReference image / reference video / reference audio + texttext + reference_image / reference_video / reference_audioStandard · Fast

Asset Preparation (Must Read)

All Seedance 2.0 media assets (images, videos, audio) must first be uploaded through the Asset Library to obtain an asset_id. External URLs cannot be used directly.

Workflow

Just two steps — once you have the asset_id, you can use it directly in Seedance requests:
                        No auth required

① Upload asset ──→ get task_id ──→ ② Poll query ──→ get asset_id ──→ use asset://XXXX format in the url field
StepEndpointInputOutputAuth
① Upload assetPOST /v1/asset/uploadFiletask_idRequired
② Poll to get asset IDGET /v1/asset/jobs/get-asset-idtask_idasset_idNot required
Once you have the asset_id, you’re ready to go! Regardless of which interface you use, pass the asset using the "url": "asset://your_asset_id" format — no need to query asset details for a URL.

Example: Preparing a Starting Frame Image

import requests
import time

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.powertokens.ai"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# ① Upload asset → get task_id
with open("start_frame.jpg", "rb") as f:
    resp = requests.post(
        f"{BASE_URL}/v1/asset/upload",
        headers=HEADERS,
        files={"file": ("start_frame.jpg", f)},
    )
task_id = resp.json()["data"]["task_id"]

# ② Poll to get asset_id (no auth required for this endpoint)
while True:
    resp = requests.get(
        f"{BASE_URL}/v1/asset/jobs/get-asset-id",
        params={"task_id": task_id},
    )
    data = resp.json()
    if data["code"] == 200 and data["data"].get("asset_id"):
        asset_id = data["data"]["asset_id"]
        break
    time.sleep(3)

print(f"Asset ready → asset_id: {asset_id}")
# ✅ Directly use asset_id in the media array of the Seedance request
For detailed Asset Library usage, see Asset Library Quick Start.

Request Parameters

All generation modes share the POST /v1/videos endpoint, with different type combinations in the media array to distinguish modes.

Common Parameters

ParameterTypeRequiredDefaultDescription
modelstringYesModel ID
mediaarrayYesMultimodal input array, see media type table below
secondsstringNo"5"Video duration in seconds, "4" to "15" or "-1" (smart selection)
sizestringNo"720p"Resolution: 480p / 720p (standard image-to-video / first-last frame / multimodal reference also supports 1080p)
ratiostringNoSee noteAspect ratio: 16:9 / 4:3 / 1:1 / 3:4 / 9:16 / 21:9 / adaptive. Default 16:9 for text-to-video, adaptive for image-to-video
seedintegerNo-1Random seed, range [-1, 4294967295]
watermarkbooleanNofalseWhether to add watermark
generate_audiobooleanNotrueWhether to generate synchronized audio (2.0 series exclusive feature)
return_last_framebooleanNofalseWhether to return the last frame image
safety_identifierstringNoUnique end-user identifier for compliance detection, max 64 characters

Media Types

typeDescriptionRequired Fields
textText prompttext
first_frameStarting frame imageasset_id (obtained via Asset Library upload)
last_frameEnding frame imageasset_id (obtained via Asset Library upload)
reference_imageReference imageasset_id (obtained via Asset Library upload)
reference_videoReference videoasset_id (obtained via Asset Library upload)
reference_audioReference audioasset_id (obtained via Asset Library upload)

Usage Examples

1. Text-to-Video (Standard API Reference · Fast)

curl -X POST https://api.powertokens.ai/v1/videos \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "media": [
      {
        "type": "text",
        "text": "A kitten running on a grassy field, bright sunshine, camera follows the motion"
      }
    ],
    "seconds": "5",
    "size": "720p",
    "ratio": "16:9",
    "generate_audio": true
  }'

2. Image-to-Video (Standard API Reference · Fast)

curl -X POST https://api.powertokens.ai/v1/videos \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "media": [
      {
        "type": "text",
        "text": "Camera slowly pushes in, girl smiles"
      },
      {
        "type": "first_frame",
        "url": "asset://XXXX"
      }
    ],
    "seconds": "5",
    "size": "720p",
    "ratio": "adaptive"
  }'
asset://XXXX — XXXX is the asset ID obtained after uploading through the Asset Library.

3. First-Last Frame-to-Video (Standard API Reference · Fast)

curl -X POST https://api.powertokens.ai/v1/videos \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-fast-260128",
    "media": [
      {
        "type": "text",
        "text": "Smooth transition between the two frames"
      },
      {
        "type": "first_frame",
        "url": "asset://XXXX"
      },
      {
        "type": "last_frame",
        "url": "asset://XXXX"
      }
    ],
    "seconds": "5",
    "size": "720p",
    "ratio": "adaptive"
  }'

4. Multimodal Reference-to-Video (Standard API Reference · Fast)

You can pass one or more of: reference image, reference video, and reference audio simultaneously:
curl -X POST https://api.powertokens.ai/v1/videos \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "media": [
      {
        "type": "text",
        "text": "Supplementary description"
      },
      {
        "type": "reference_image",
        "url": "asset://XXXX"
      },
      {
        "type": "reference_video",
        "url": "asset://XXXX"
      },
      {
        "type": "reference_audio",
        "url": "asset://XXXX"
      }
    ],
    "seconds": "-1",
    "size": "720p",
    "ratio": "16:9",
    "generate_audio": false
  }'

Query Task Status (API Reference)

After submitting a generation request, a task_id will be returned. Video generation is asynchronous and requires polling to check the status. Endpoint: GET /v1/videos/{task_id}
curl "https://api.powertokens.ai/v1/videos/XXXX" \
  -H "Authorization: YOUR_API_KEY"

Task Statuses

StatusMeaning
queuedIn queue
runningGenerating
succeededGeneration succeeded
failedGeneration failed
cancelledCancelled (only tasks in queue can be cancelled; auto-deleted after 24h)
expiredTimed out

Successful Response Example

{
  "id": "XXXX",
  "model": "doubao-seedance-2-0-260128",
  "status": "succeeded",
  "content": {
    "video_url": "https://ark-content-generation-cn-beijing.tos-cn-beijing.volces.com/xxx"
  },
  "seed": 78674,
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5,
  "framespersecond": 24,
  "generate_audio": true,
  "usage": {
    "completion_tokens": 108900,
    "total_tokens": 108900
  }
}
Note: The video URL is valid for 14 days. Please download and save it promptly. Only tasks from the last 7 days can be queried.

Complete Workflow — Python

A complete example from asset upload to video generation:
import requests
import time

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.powertokens.ai"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}


def upload_and_get_asset_id(file_path):
    """Upload asset to the Asset Library and return asset_id (usable directly in Seedance requests)"""
    # ① Upload
    with open(file_path, "rb") as f:
        resp = requests.post(
            f"{BASE_URL}/v1/asset/upload",
            headers=HEADERS,
            files={"file": (file_path.split("/")[-1], f)},
        )
    task_id = resp.json()["data"]["task_id"]
    print(f"  Upload complete → task_id: {task_id}")

    # ② Poll to get asset_id (no auth required for this endpoint)
    for _ in range(20):
        resp = requests.get(
            f"{BASE_URL}/v1/asset/jobs/get-asset-id",
            params={"task_id": task_id},
        )
        data = resp.json()
        if data["code"] == 200 and data["data"].get("asset_id"):
            asset_id = data["data"]["asset_id"]
            print(f"  Asset ready → asset_id: {asset_id}")
            return asset_id
        time.sleep(3)
    raise TimeoutError("Asset processing timed out")


def generate_video(request_body):
    """Submit a video generation task"""
    resp = requests.post(
        f"{BASE_URL}/v1/videos",
        headers={**HEADERS, "Content-Type": "application/json"},
        json=request_body,
    )
    resp.raise_for_status()
    return resp.json()


def wait_for_video(task_id, timeout=300, interval=5):
    """Poll until video generation is complete"""
    start = time.time()
    while time.time() - start < timeout:
        resp = requests.get(
            f"{BASE_URL}/v1/videos/{task_id}",
            headers=HEADERS,
        )
        result = resp.json()
        status = result.get("status")

        if status == "succeeded":
            return result
        elif status in ("failed", "cancelled", "expired"):
            raise RuntimeError(f"Task failed: {status} - {result.get('error')}")

        print(f"  Status: {status}, waiting...")
        time.sleep(interval)
    raise TimeoutError(f"Video generation did not complete within {timeout} seconds")


# ── Run: Complete Image-to-Video Workflow ───────────────────

# 1. Prepare asset → get asset_id
print("Preparing starting frame asset...")
asset_id = upload_and_get_asset_id("start_frame.jpg")

# 2. Submit generation task (directly using asset_id)
print("Submitting video generation task...")
task = generate_video({
    "model": "dreamina-seedance-2-0-260128",
    "media": [
        {"type": "text", "text": "Camera slowly pushes in, cherry blossom petals drifting in the wind"},
        {"type": "first_frame", "url": f"asset://{asset_id}"},
    ],
    "seconds": "5",
    "size": "720p",
    "ratio": "adaptive",
    "generate_audio": True,
})
task_id = task.get("task_id") or task.get("id")
print(f"Task submitted → task_id: {task_id}")

# 3. Wait for generation to complete
print("Waiting for video generation...")
result = wait_for_video(task_id)
print(f"Generation succeeded! Video URL: {result['content']['video_url']}")

Model Version Comparison

DimensionSeedance 2.0Seedance 2.0 Fast
Model IDdreamina-seedance-2-0-260128dreamina-seedance-2-0-fast-260128
Generation speedStandardFaster
Max resolution1080p (image-to-video / first-last frame / multimodal reference)720p
Text-to-video resolution720p720p
Duration range4–15 seconds or -1 (smart selection)4–15 seconds or -1 (smart selection)
Audio syncSupportedSupported
Multimodal referenceSupportedSupported

API Quick Reference

Official Compatible Interface

Base URL: https://api.powertokens.ai

Create Task — POST /byteplus/api/v3/contents/generations/tasks (API Reference)

curl -X POST https://api.powertokens.ai/byteplus/api/v3/contents/generations/tasks \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "content": [
      {"type": "text", "text": "Your prompt"},
      {"type": "image_url", "image_url": {"url": "asset://XXXX"}}
    ],
    "ratio": "16:9", "duration": 5
  }'

Query Task — GET /byteplus/api/v3/contents/generations/tasks/{id} (API Reference)

curl "https://api.powertokens.ai/byteplus/api/v3/contents/generations/tasks/XXXX" \
  -H "Authorization: YOUR_API_KEY"

Task List — GET /byteplus/api/v3/contents/generations/tasks (API Reference)

curl "https://api.powertokens.ai/byteplus/api/v3/contents/generations/tasks?page_num=1&page_size=20" \
  -H "Authorization: YOUR_API_KEY"

Cancel / Delete Task — DELETE /byteplus/api/v3/contents/generations/tasks/{id} (API Reference)

curl -X DELETE "https://api.powertokens.ai/byteplus/api/v3/contents/generations/tasks/XXXX" \
  -H "Authorization: YOUR_API_KEY"

OpenAI-style Interface

Base URL: https://api.powertokens.ai

Generation Modes — POST /v1/videos

Text-to-Video (Standard · Fast)
curl -X POST https://api.powertokens.ai/v1/videos \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "media": [{"type": "text", "text": "Your prompt"}],
    "seconds": "5", "size": "720p", "ratio": "16:9"
  }'
Image-to-Video (Standard · Fast)
curl -X POST https://api.powertokens.ai/v1/videos \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "media": [
      {"type": "text", "text": "Your prompt"},
      {"type": "first_frame", "url": "asset://XXXX"}
    ],
    "seconds": "5", "size": "720p"
  }'
First-Last Frame-to-Video (Standard · Fast)
curl -X POST https://api.powertokens.ai/v1/videos \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "media": [
      {"type": "text", "text": "Your prompt"},
      {"type": "first_frame", "url": "asset://XXXX"},
      {"type": "last_frame", "url": "asset://XXXX"}
    ],
    "seconds": "5", "size": "720p"
  }'
Multimodal Reference-to-Video (Standard · Fast)
curl -X POST https://api.powertokens.ai/v1/videos \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "media": [
      {"type": "text", "text": "Your prompt"},
      {"type": "reference_image", "url": "asset://XXXX"}
    ],
    "seconds": "5", "size": "720p"
  }'
For the Fast version, replace the model ID with dreamina-seedance-2-0-fast-260128.

Task Query — GET /v1/videos/{task_id} (API Reference)

curl "https://api.powertokens.ai/v1/videos/XXXX" \
  -H "Authorization: YOUR_API_KEY"

Asset Preparation (Asset Library)

Upload Asset — POST /v1/asset/upload (API Reference)
curl -X POST https://api.powertokens.ai/v1/asset/upload \
  -H "Authorization: YOUR_API_KEY" \
  -F "file=@/path/to/file.jpg" \
  -F "group_id=XXXX"
Get Asset ID — GET /v1/asset/jobs/get-asset-id (API Reference)
This endpoint does not require authentication. Once you have the asset_id, you can directly use it in Seedance requests.
curl "https://api.powertokens.ai/v1/asset/jobs/get-asset-id?task_id=XXXX"

For the complete API reference, visit docs.powertokens.ai