OneKeyModel LogoOneKeyModel

Seedance Video Generation

Seedance 2.0 video generation and asset library API reference.

Base URL & Authentication

All requests use the unified Base URL with your API key in the Authorization header.

Base URL
https://api.onekeymodel.com/v1
Authorization Header Format
Authorization: Bearer YOUR_API_KEY

Supported Models

The following Seedance 2.0 models are available via the video generation API:

seedance2_0seedance2_0_fastseedance2_0_mini

Video Generation API

Video generation is a two-step process: submit a task and poll for results. Via the gateway, Seedance parameters go in metadata; prompt is auto-converted to a content text item.

Step 1: Create Video TaskPOST /v1/video/generations
Submit generation parameters. Returns a task record with an id.

Text-to-Video

bash
curl -X POST https://api.onekeymodel.com/v1/video/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
    "model": "seedance2_0",
    "prompt": "一只猫在海边奔跑,电影感镜头,阳光,慢动作",
    "metadata": {
      "ratio": "16:9",
      "duration": 5,
      "resolution": "720p",
      "generate_audio": true,
      "bitrate_mode": "standard",
      "watermark": false
    }
  }'

Image-to-Video

bash
curl -X POST https://api.onekeymodel.com/v1/video/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
    "model": "seedance2_0",
    "prompt": "让图片中的人物向镜头微笑并挥手",
    "metadata": {
      "content": [
        {
          "type": "image_url",
          "image_url": { "url": "https://example.com/input.png" },
          "role": "first_frame"
        }
      ],
      "ratio": "adaptive",
      "duration": 5,
      "resolution": "720p",
      "watermark": false
    }
  }'

Using asset:// from library

bash
curl -X POST https://api.onekeymodel.com/v1/video/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
    "model": "seedance2_0",
    "prompt": "基于参考素材生成一段产品展示视频",
    "metadata": {
      "content": [
        {
          "type": "image_url",
          "image_url": { "url": "asset://Asset-2026xxxx" },
          "role": "reference_image"
        }
      ],
      "ratio": "16:9",
      "duration": 5,
      "resolution": "720p"
    }
  }'

Response Example

json
{ "id": "task_xxx" }
Step 2: Query Video TaskGET /v1/video/generations/:task_id
Poll using the returned id every few seconds. When status becomes SUCCESS, retrieve the video URL from result_url.
bash
curl -X GET "https://api.onekeymodel.com/v1/video/generations/task_xxx" \
  -H "Authorization: Bearer $YOUR_API_KEY"

Response Example

json
{
  "code": "success",
  "data": {
    "task_id": "task_xxx",
    "status": "SUCCESS",
    "result_url": "https://example.com/video.mp4"
  }
}

Request Parameters

Via the OneKeyModel gateway, place parameters in metadata except model and prompt.

The gateway appends prompt as a type=text item in content. If metadata.content is provided, prompt is still appended as text.

Request Parameters

ParameterTypeRequiredDescription
modelstringYesModel name. Supports seedance2_0, seedance2_0_fast, seedance2_0_mini
promptstringYesText prompt. Gateway auto-converts to type=text in content
metadata.contentarrayNoInput content array for image, video, and audio assets
metadata.generate_audiobooleanNoWhether to generate audio
metadata.bitrate_modestringNoBitrate mode, e.g. standard, high
metadata.resolutionstringNoOutput resolution, e.g. 480p, 720p, 1080p, 4k. Model-dependent
metadata.ratiostringNoAspect ratio. Common: 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, adaptive
metadata.durationintegerNoVideo duration, typically 4–15 seconds
metadata.watermarkbooleanNoWhether to include watermark

content Array Elements

content is an array for image, video, and audio assets. Use asset:// URLs for library assets.

json
// Image
{ "type": "image_url", "image_url": { "url": "https://example.com/image.png" }, "role": "reference_image" }

// Video
{ "type": "video_url", "video_url": { "url": "https://example.com/video.mp4" }, "role": "reference_video" }

// Audio
{ "type": "audio_url", "audio_url": { "url": "https://example.com/audio.mp3" }, "role": "reference_audio" }

// Asset library
{ "type": "image_url", "image_url": { "url": "asset://Asset-2026xxxx" }, "role": "reference_image" }

Common role Values

roleDescription
first_frameFirst frame image
last_frameLast frame image
reference_imageReference image
reference_videoReference video
reference_audioReference audio

Task Status

statusDescription
QUEUEDQueued or submitted
IN_PROGRESSIn progress
SUCCESSSucceeded
FAILUREFailed

Asset Library API

Unified endpoint with Action parameter. Version is optional, defaults to 2024-01-01.

Unified EndpointPOST /v1/seedance_asset
https://api.onekeymodel.com/v1/seedance_asset?Action={Action}&Version=2024-01-01

Common Parameters

ParameterTypeRequiredDescription
ActionqueryYesAsset operation name (query). Lowercase action also supported
VersionqueryNoOpenAPI version, default 2024-01-01. Lowercase version also supported
ProjectNamebodyNoArk project name, optional (body)

Supported Actions

CreateAssetGroupCreateAssetListAssetGroupsListAssetsGetAssetGetAssetGroupUpdateAssetGroupUpdateAssetDeleteAssetDeleteAssetGroup
CreateAssetGroup — Create Asset Group
Create an asset group to organize uploaded assets.
bash
curl -X POST "https://api.onekeymodel.com/v1/seedance_asset?Action=CreateAssetGroup&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
    "Name": "seedance-demo-group",
    "Description": "Seedance demo assets",
    "GroupType": "AIGC"
  }'
CreateAsset — Create Asset
Create an asset from a URL. Assets typically enter Processing state and become usable after completion.
bash
curl -X POST "https://api.onekeymodel.com/v1/seedance_asset?Action=CreateAsset&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
    "GroupId": "group-2026xxxx",
    "URL": "https://example.com/input.png",
    "Name": "demo-image",
    "AssetType": "Image",
    "Moderation": { "Strategy": "Skip" }
  }'
json
{ "Result": { "Id": "Asset-2026xxxx" } }
ListAssetGroups — List Asset Groups
Query asset groups with pagination.
bash
curl -X POST "https://api.onekeymodel.com/v1/seedance_asset?Action=ListAssetGroups&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
    "Filter": { "GroupType": "AIGC" },
    "PageNumber": 1,
    "PageSize": 10,
    "SortBy": "CreateTime",
    "SortOrder": "Desc"
  }'
ListAssets — List Assets
Query assets with pagination, filterable by group and status.
bash
curl -X POST "https://api.onekeymodel.com/v1/seedance_asset?Action=ListAssets&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
    "Filter": {
      "GroupType": "AIGC",
      "GroupIds": ["group-2026xxxx"],
      "Statuses": ["Active"]
    },
    "PageNumber": 1,
    "PageSize": 10,
    "SortBy": "CreateTime",
    "SortOrder": "Desc"
  }'
GetAsset — Get Asset Details
Retrieve asset details by Asset ID.
bash
curl -X POST "https://api.onekeymodel.com/v1/seedance_asset?Action=GetAsset&Version=2024-01-01" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{ "Id": "Asset-2026xxxx" }'

Asset Status

StatusDescription
ActiveReady for video generation
ProcessingPreprocessing, not yet usable
FailedProcessing failed

Also supports GetAssetGroup, UpdateAssetGroup, UpdateAsset, DeleteAsset, DeleteAssetGroup.

Recommended Workflow

Typical flow combining asset library and video generation:

  • 1. Create an asset group (CreateAssetGroup)
  • 2. Upload assets (CreateAsset), wait for Active status, obtain Asset ID
  • 3. Submit video task and poll until the final video URL is available