Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

ByteDance のロゴ

Seedance 2.0 Mini

テキストから動画 • ByteDance

Markdown で表示Agent セットアップ
  • サードパーティ

Seedance 2.0 ファミリーの、コンパクトでコスト効率の高い ByteDance の動画生成モデルです。テキストから動画、画像から動画、参照動画、BGM 向けの参照音声に対応します。速度とコストが重要な大量処理に適しています。

モデル情報
詳細情報リンク
料金Cloudflare ダッシュボードで料金を見る

使い方

const response = await env.AI.run(
  'bytedance/seedance-2.0-mini',
  {
    prompt:
      'A cat sitting on a windowsill watching raindrops fall on the glass, cozy interior lighting',
    aspect_ratio: '16:9',
    duration: 5,
    resolution: '720p',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "bytedance/seedance-2.0-mini",
  "input": {
    "prompt": "A cat sitting on a windowsill watching raindrops fall on the glass, cozy interior lighting",
    "aspect_ratio": "16:9",
    "duration": 5,
    "resolution": "720p"
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://examples.aig.cloudflare.com/bytedance/seedance-2.0-mini/simple-video.mp4"
  },
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}

画像から動画 — 参照画像から動画を生成します
const response = await env.AI.run(
  'bytedance/seedance-2.0-mini',
  {
    image: 'https://ark-doc.tos-ap-southeast-1.bytepluses.com/doc_image/r2v_tea_pic1.jpg',
    prompt: 'The scene slowly comes to life with gentle movement',
    aspect_ratio: '16:9',
    duration: 5,
    resolution: '720p',
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "bytedance/seedance-2.0-mini",
  "input": {
    "image": "https://ark-doc.tos-ap-southeast-1.bytepluses.com/doc_image/r2v_tea_pic1.jpg",
    "prompt": "The scene slowly comes to life with gentle movement",
    "aspect_ratio": "16:9",
    "duration": 5,
    "resolution": "720p"
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://examples.aig.cloudflare.com/bytedance/seedance-2.0-mini/image-to-video.mp4"
  },
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}
音声付きポートレート動画 — SNS 向けの縦向き動画です
const response = await env.AI.run(
  'bytedance/seedance-2.0-mini',
  {
    prompt: 'A steaming coffee cup on a marble table, morning light streaming through a window',
    aspect_ratio: '9:16',
    duration: 5,
    resolution: '720p',
    generate_audio: true,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "bytedance/seedance-2.0-mini",
  "input": {
    "prompt": "A steaming coffee cup on a marble table, morning light streaming through a window",
    "aspect_ratio": "9:16",
    "duration": 5,
    "resolution": "720p",
    "generate_audio": true
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://examples.aig.cloudflare.com/bytedance/seedance-2.0-mini/portrait-video-with-audio.mp4"
  },
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}
バーチャルアバター参照 — 信頼済みアセットライブラリのバーチャルキャラクターアバターを使います
const response = await env.AI.run(
  'bytedance/seedance-2.0-mini',
  {
    image: 'https://ark-doc.tos-ap-southeast-1.bytepluses.com/doc_image/r2v_tea_pic1.jpg',
    prompt: 'The scene gently animates with subtle motion',
    aspect_ratio: '16:9',
    duration: 5,
    resolution: '720p',
    use_virtual_avatar: true,
  },
)
console.log(response)
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "bytedance/seedance-2.0-mini",
  "input": {
    "image": "https://ark-doc.tos-ap-southeast-1.bytepluses.com/doc_image/r2v_tea_pic1.jpg",
    "prompt": "The scene gently animates with subtle motion",
    "aspect_ratio": "16:9",
    "duration": 5,
    "resolution": "720p",
    "use_virtual_avatar": true
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://examples.aig.cloudflare.com/bytedance/seedance-2.0-mini/virtual-avatar-reference.mp4"
  },
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}

パラメーター

prompt
string必須maxLength: 2000生成する動画を説明するテキストプロンプトです
image
string画像から動画向けの参照画像です(HTTP(S) URL または Base64 data URI)
reference_video
stringスタイル/動きのガイド用の参照動画です(HTTP(S) URL または Base64 data URI)
last_frame_image
string最終フレームのガイド用の参照画像です(HTTP(S) URL または Base64 data URI)。開始フレームの画像も指定したときだけ有効です。
duration
integer必須デフォルト: 5minimum: 4maximum: 12動画の長さ(秒)です
resolution
string必須デフォルト: 720penum: 480p, 720p動画の解像度です
aspect_ratio
string必須デフォルト: 16:9enum: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, 9:21動画のアスペクト比です。画像を使う場合は無視されます。
fps
number必須デフォルト: 24const: 24フレームレート(1 秒あたりのフレーム数)です
camera_fixed
boolean必須デフォルト: falseカメラ位置を固定するかどうかです
generate_audio
boolean動画と一緒に音声を生成するかどうかです
watermark
boolean必須デフォルト: false出力動画にウォーターマークを付けるかどうかです
seed
integerminimum: -9007199254740991maximum: 9007199254740991生成結果を再現するための乱数シードです
use_virtual_avatar
boolean必須デフォルト: false生成前に、画像参照入力(`image`、`reference_images`、`last_frame_image`)を ByteDance の信頼できる仮想アバター素材ライブラリ経由で処理します。顔検出やディープフェイク検出でブロックされやすい、AI 生成/仮想キャラクターのアバター向けです
reference_audio
stringBGM として使う参照音声です(HTTP(S) URL または Base64 `data:audio/...` URI)。参照画像または動画と一緒に指定します。
video
stringformat: uri生成された動画の URL です

API スキーマ(Raw)

Input
Output

役に立ちましたか?