Skip to content

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

RunwayML のロゴ

RunwayML Aleph 2

テキストから動画 • RunwayML

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

RunwayML の動画編集モデルです。1 フレームを編集すると動画全体が更新され、複数ショットにまたがる変更や最大 30 秒の動画に対応します。キーフレームガイド編集で、クリップ内の特定の瞬間を精密に制御できます。

モデル情報
利用規約とライセンスリンク
詳細情報リンク
料金Cloudflare ダッシュボードで料金を見る

使い方

const response = await env.AI.run(
  'runwayml/aleph-2',
  {
    prompt: 'Transform the scene into a golden-hour sunset with warm lighting',
    video_uri: 'https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/runwayml__gen-4.5/cinematic-scene.mp4',
  },
)
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": "runwayml/aleph-2",
  "input": {
    "prompt": "Transform the scene into a golden-hour sunset with warm lighting",
    "video_uri": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/runwayml__gen-4.5/cinematic-scene.mp4"
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://dnznrvs05pmza.cloudfront.net/7449093b-e574-41a5-8308-05e4692fa652.mp4"
  },
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}

キーフレーム案内の編集 — 出力の先頭フレームに固定した参照画像で動画を編集します
const response = await env.AI.run(
  'runwayml/aleph-2',
  {
    prompt: 'Edit the video to match the provided reference frame',
    video_uri: 'https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/runwayml__gen-4.5/nature-close-up.mp4',
    prompt_images: [
      {
        uri: 'https://upload.wikimedia.org/wikipedia/commons/8/85/Tour_Eiffel_Wikimedia_Commons_(cropped).jpg',
        position: 'first',
      },
    ],
  },
)
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": "runwayml/aleph-2",
  "input": {
    "prompt": "Edit the video to match the provided reference frame",
    "video_uri": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/runwayml__gen-4.5/nature-close-up.mp4",
    "prompt_images": [
      {
        "uri": "https://upload.wikimedia.org/wikipedia/commons/8/85/Tour_Eiffel_Wikimedia_Commons_(cropped).jpg",
        "position": "first"
      }
    ]
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://dnznrvs05pmza.cloudfront.net/cd7388fe-09d6-4b16-afc5-24bb315eaf14.mp4"
  },
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}
時間指定キーフレーム編集 — keyframes[].seconds を使い、入力動画の特定時刻に案内画像を置きます
const response = await env.AI.run(
  'runwayml/aleph-2',
  {
    prompt: 'Change the background to a futuristic cityscape at night',
    video_uri: 'https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/runwayml__gen-4.5/simple-text-to-video.mp4',
    keyframes: [
      {
        uri: 'https://upload.wikimedia.org/wikipedia/commons/8/85/Tour_Eiffel_Wikimedia_Commons_(cropped).jpg',
        seconds: 2.0,
      },
    ],
  },
)
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": "runwayml/aleph-2",
  "input": {
    "prompt": "Change the background to a futuristic cityscape at night",
    "video_uri": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/runwayml__gen-4.5/simple-text-to-video.mp4",
    "keyframes": [
      {
        "uri": "https://upload.wikimedia.org/wikipedia/commons/8/85/Tour_Eiffel_Wikimedia_Commons_(cropped).jpg",
        "seconds": 2.0
      }
    ]
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://dnznrvs05pmza.cloudfront.net/a7e054fa-1cf2-4265-a35c-518b8c4d6a1a.mp4"
  },
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}
コンテンツモデレーションの上書き — 著名人が写る動画を、緩和したコンテンツモデレーションで編集します
const response = await env.AI.run(
  'runwayml/aleph-2',
  {
    prompt: 'Make the background a dramatic stormy sky',
    video_uri: 'https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/runwayml__gen-4.5/cinematic-scene.mp4',
    content_moderation: {
      public_figure_threshold: 'low',
    },
  },
)
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": "runwayml/aleph-2",
  "input": {
    "prompt": "Make the background a dramatic stormy sky",
    "video_uri": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/runwayml__gen-4.5/cinematic-scene.mp4",
    "content_moderation": {
      "public_figure_threshold": "low"
    }
  }
}'
{
  "state": "Completed",
  "result": {
    "video": "https://dnznrvs05pmza.cloudfront.net/ea5b1ccd-3dd6-43c3-86e3-5ed720849e92.mp4"
  },
  "gatewayMetadata": {
    "keySource": "Unified"
  }
}

パラメーター

prompt
string必須minLength: 1maxLength: 1000入力動画に適用する編集を説明するテキストプロンプトです
video_uri
string必須編集するソース動画の HTTPS URL、Runway URI、または data URI です(30 秒以下)
seed
integerminimum: 0maximum: 4294967295結果を再現するための乱数シードです
duration
numberexclusiveMinimum: 0ソース動画の長さ(秒)です。課金専用で、RunwayML には送りません。gateway が秒あたりの動画コストを正確に計算できるように指定します。
video
stringformat: uri編集済み動画の URL です

API スキーマ(Raw)

Input
Output

役に立ちましたか?