Skip to content

Doubao Seedance 動画モデル

Doubao Seedance API

1. タスクの作成

post https://api.openai-hk.com/doubao/api/v3/contents/generations/tasks

shell
curl --request POST \
  --url https://api.openai-hk.com/doubao/api/v3/contents/generations/tasks \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-2-0-mini-260615",
    "content": [
        {
            "type": "text",
            "text": "明るくカラフルな広告スタイル、フルーツクッキーが主役で、ストロベリー、アップル、グレープ、オレンジの4つのフレーバーが含まれます。ストロベリーフレーバーは@Image1を参考にしています。クッキーと対応するフルーツは強い秩序感のある幾何学的な配列に配置されています。全体的に画像はクリーンでプレミアムでリズミカルです。オープニングはフルーツが素早く視覚的焦点を確立し、@Video1の構成を参考にし、音楽のビートでカットインします。その後、異なるフレーバーのクッキーがきれいに配置され、クローズアップにカットし、@Video2のダイナミクスとカメラの動きを参考にします。その後、素早くテンポの速い編集に戻ります。エンディングは英語のテキスト「One bite of crispness, a heart full of delight」が素早い単語分割切り替えで、強いリズムのテキスト動きと製品のフリーズフレームが伴います。"
        },
        {
            "type": "image_url",
            "image_url": {
                "url": "https://arkdocs.tos-cn-beijing.volces.com/images/video-generation/seedance2.5_reference1.png"
            },
            "role": "reference_image"
        },
        {
            "type": "video_url",
            "video_url": {
                "url": "https://arkdocs.tos-cn-beijing.volces.com/videos/video-generation/seedance2.5_reference2.mp4"
            },
            "role": "reference_video"
        },
        {
            "type": "video_url",
            "video_url": {
                "url": "https://arkdocs.tos-cn-beijing.volces.com/videos/video-generation/seedance2.5_reference3.mp4"
            },
            "role": "reference_video"
        }
    ],
    "generate_audio": true,
    "ratio": "16:9",
    "duration": 15,
    "resolution": "480p",
    "omni_reference_task_type": "reference"
}
'
curl --request POST \
  --url https://api.openai-hk.com/doubao/api/v3/contents/generations/tasks \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "doubao-seedance-2-0-mini-260615",
    "content": [
        {
            "type": "text",
            "text": "明るくカラフルな広告スタイル、フルーツクッキーが主役で、ストロベリー、アップル、グレープ、オレンジの4つのフレーバーが含まれます。ストロベリーフレーバーは@Image1を参考にしています。クッキーと対応するフルーツは強い秩序感のある幾何学的な配列に配置されています。全体的に画像はクリーンでプレミアムでリズミカルです。オープニングはフルーツが素早く視覚的焦点を確立し、@Video1の構成を参考にし、音楽のビートでカットインします。その後、異なるフレーバーのクッキーがきれいに配置され、クローズアップにカットし、@Video2のダイナミクスとカメラの動きを参考にします。その後、素早くテンポの速い編集に戻ります。エンディングは英語のテキスト「One bite of crispness, a heart full of delight」が素早い単語分割切り替えで、強いリズムのテキスト動きと製品のフリーズフレームが伴います。"
        },
        {
            "type": "image_url",
            "image_url": {
                "url": "https://arkdocs.tos-cn-beijing.volces.com/images/video-generation/seedance2.5_reference1.png"
            },
            "role": "reference_image"
        },
        {
            "type": "video_url",
            "video_url": {
                "url": "https://arkdocs.tos-cn-beijing.volces.com/videos/video-generation/seedance2.5_reference2.mp4"
            },
            "role": "reference_video"
        },
        {
            "type": "video_url",
            "video_url": {
                "url": "https://arkdocs.tos-cn-beijing.volces.com/videos/video-generation/seedance2.5_reference3.mp4"
            },
            "role": "reference_video"
        }
    ],
    "generate_audio": true,
    "ratio": "16:9",
    "duration": 15,
    "resolution": "480p",
    "omni_reference_task_type": "reference"
}
'
  • task_id が返されます
json
{
  "id": "task_6esMYNTJqw6h763PeafCp8N92fVY9Jic"
}
{
  "id": "task_6esMYNTJqw6h763PeafCp8N92fVY9Jic"
}

2. 主なリクエストパラメータ

フィールド必須説明
modelはい上記の表のモデル名
contentはいプロンプト + 参考資料配列、以下を参照
durationいいえ期間(秒)
resolutionいいえ解像度、例:480p / 720p
ratioいいえアスペクト比、例:16:9(エイリアス aspect_ratio
generate_audioいいえオーディオを生成するかどうか

content 配列要素:

typeマテリアルフィールドrole説明
texttextプロンプト。最初の空でないテキストを取得
image_urlimage_url.urlreference_image(デフォルト)参考画像、@Image1@Image2…に対応
image_urlimage_url.urlfirst_frame / last_frame最初/最後のフレーム画像、@ImageN 番号付けにカウントされません
video_urlvideo_url.urlreference_video参考動画、@Video1@Video2…に対応
audio_urlaudio_url.urlreference_audio参考オーディオ

番号付けルール:順序が意味を持ちます。 @Image1 は常に配列内の最初の参考画像であり、@Video1 は最初の参考動画です—役割別に1から番号付けされます。順序を間違えてもエラーにはなりませんが、説明とは異なる動画がレンダリングされ、それでも課金されます。

3. タスクのクエリ

get https://api.openai-hk.com/doubao/api/v3/contents/generations/tasks/{taskId}

shell
curl --request GET \
  --url https://api.openai-hk.com/doubao/api/v3/contents/generations/tasks/task_6esMYNTJqw6h763PeafCp8N92fVY9Jic \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'Content-Type: application/json'
curl --request GET \
  --url https://api.openai-hk.com/doubao/api/v3/contents/generations/tasks/task_6esMYNTJqw6h763PeafCp8N92fVY9Jic \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'Content-Type: application/json'
  • 成功レスポンス
json
{
  "content": {
    "video_url": "https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/doubao-seedance-2-0-mini/02178996062422000000000000000000000ffffac1446bb35c08d.mp4?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260921%2Fcn-beijing%2Ftos%2Frequest&X-Tos-Date=20260921T031836Z&X-Tos-Expires=86400&X-Tos-Signature=601f68beb9da380599efea3817ce91612be94beabb085848281fa1ba9047b66c&X-Tos-SignedHeaders=host"
  },
  "created_at": 1789960624,
  "draft": false,
  "duration": 4,
  "execution_expires_after": 172800,
  "framespersecond": 24,
  "generate_audio": true,
  "id": "task_6esMYNTJqw6h763PeafCp8N92fVY9Jic",
  "model": "doubao-seedance-2-0-mini-260615-max",
  "origin_id": "cgt-20260921111703-hsk6d",
  "output_format": "mp4",
  "priority": 0,
  "ratio": "16:9",
  "resolution": "480p",
  "seed": 47550,
  "service_tier": "default",
  "status": "succeeded",
  "updated_at": 1789960725,
  "usage": {
    "completion_tokens": 40594,
    "total_tokens": 40594
  }
}
{
  "content": {
    "video_url": "https://ark-acg-cn-beijing.tos-cn-beijing.volces.com/doubao-seedance-2-0-mini/02178996062422000000000000000000000ffffac1446bb35c08d.mp4?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260921%2Fcn-beijing%2Ftos%2Frequest&X-Tos-Date=20260921T031836Z&X-Tos-Expires=86400&X-Tos-Signature=601f68beb9da380599efea3817ce91612be94beabb085848281fa1ba9047b66c&X-Tos-SignedHeaders=host"
  },
  "created_at": 1789960624,
  "draft": false,
  "duration": 4,
  "execution_expires_after": 172800,
  "framespersecond": 24,
  "generate_audio": true,
  "id": "task_6esMYNTJqw6h763PeafCp8N92fVY9Jic",
  "model": "doubao-seedance-2-0-mini-260615-max",
  "origin_id": "cgt-20260921111703-hsk6d",
  "output_format": "mp4",
  "priority": 0,
  "ratio": "16:9",
  "resolution": "480p",
  "seed": 47550,
  "service_tier": "default",
  "status": "succeeded",
  "updated_at": 1789960725,
  "usage": {
    "completion_tokens": 40594,
    "total_tokens": 40594
  }
}
  • エラーレスポンス
json
{
  "error": {
    "code": "invalid_request",
    "message": "Upstream submit failed (400): {\"code\":\"fail_to_fetch_task\",\"message\":\"{\\\"error\\\":{\\\"code\\\":\\\"InvalidParameter\\\",\\\"message\\\":\\\"The parameter `output_format` specified in the request is not valid: the specified model does not support this output_format"
  },
  "id": "task_6CyBKW7HUIRQGEB45CQ8r1a0gQwugHDF",
  "model": "doubao-seedance-2-0-mini-260615-max",
  "status": "failed"
}
{
  "error": {
    "code": "invalid_request",
    "message": "Upstream submit failed (400): {\"code\":\"fail_to_fetch_task\",\"message\":\"{\\\"error\\\":{\\\"code\\\":\\\"InvalidParameter\\\",\\\"message\\\":\\\"The parameter `output_format` specified in the request is not valid: the specified model does not support this output_format"
  },
  "id": "task_6CyBKW7HUIRQGEB45CQ8r1a0gQwugHDF",
  "model": "doubao-seedance-2-0-mini-260615-max",
  "status": "failed"
}

4. レスポンスパラメータ

フィールドタイプ説明
idstringtask_id
modelstringモデル名
content.video_urlstring動画URL結果
usageobject請求のための使用情報
statusstringステータス:queued running succeeded failed
errorstringエラーメッセージ

請求

  • usage.total_tokens に基づいて請求されます
  • 価格は 参考動画が含まれているかresolutionモデル に依存します
  • 価格単位:100万トークンあたりの人民元
  • 価格計算式:usage.total_tokens × 価格
  • 動画ありの単価 < 動画なし、ただし動画ありの usage.total_tokens が高いため、動画ありの総価格が高くなります
モデル動画あり動画なし
doubao-seedance-2-0-mini-260615 全解像度1423
doubao-seedance-2-0-fast-260128 全解像度2237
doubao-seedance-2-0-260128 480P/720P2846
doubao-seedance-2-0-260128 1080P3151
doubao-seedance-2-0-260128 4K1626
doubao-seedance-2-5-260628 480P/720P4270
doubao-seedance-2-5-260628 1080P4677