コンテンツにスキップ
オープンキャスタリーコンソール

動画

wan2.7-i2v API

Modelflare 非同期ビデオ ルーティングを通じて正確な wan2.7-i2v モデル ID を使用します。

正確なモデル ID wan2.7-i2v を使用します。モデル フィールドはこのページと正確に一致する必要があります。

サンプル出力wan2.7-i2vPOST /v1/videos5.0s

パラメータ: duration=5resolution=1080pratio=16:9入力画像

プロンプト: One continuous take, no cuts. The ribbon of film keeps unwinding and speeds up until every frame is lit, tightening into a neon helix that lifts off the deck and climbs past the parapet into the dusk sky, the woman in the cobalt coat turning to follow it up. The camera starts low behind her, is pushed back as the helix rises, then cranes up over the parapet and looks along the coil toward the city. One hard magenta key stays raking across the deck. Real weight and inertia, paper and emulsion catching the light, no text.

入力メディア URL が置き換えられた、このサンプルを生成したリクエスト
{
"model": "wan2.7-i2v",
"prompt": "One continuous take, no cuts. The ribbon of film keeps unwinding and speeds up until every frame is lit, tightening into a neon helix that lifts off the deck and climbs past the parapet into the dusk sky, the woman in the cobalt coat turning to follow it up. The camera starts low behind her, is pushed back as the helix rises, then cranes up over the parapet and looks along the coil toward the city. One hard magenta key stays raking across the deck. Real weight and inertia, paper and emulsion catching the light, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9",
"image": "https://example.com/input-image.png"
}

https://modelflare.dev/v1 で Modelflare API キーを使用します。ゲートウェイのエントリ ポイントは POST /v1/videos です。

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
ターミナルウィンドウbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-i2v",
"input": {"prompt": "The camera moves closer as the lanterns begin to glow in time with the music.", "media": [{"type": "first_frame", "url": "https://example.com/first-frame.png"}]},
"parameters": {"resolution": "1080P", "duration": 5, "prompt_extend": false, "watermark": false}
}'

タスクIDを保存します。 GET /v1/videos/{task_id} をポーリングし、GET /v1/videos/{task_id}/content でダウンロードします。結果 URL は有効期限が切れている可能性があるため、速やかにファイルを転送してください。

ターミナルウィンドウbash
curl https://modelflare.dev/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"

Wan は一般的に input と parameters を使用します。フレームガイドモードとリファレンスメディアモードを混合してはなりません。

Wan2.7 I2Vはinput.promptとinput.mediaを使用します。最初/最後のフレーム、駆動オーディオ、最初のクリップについては、文書化された組み合わせに従ってください。

フィールド 必須 注意事項
model はい wan2.7-i2v
input.prompt はい モーションとシーンの説明
input.media[] はい first_frame``last_frame``driving_audio``first_clip
parameters.resolution いいえ 720P / 1080P (デフォルトは1080P)
parameters.duration いいえ 合計期間。継続用の入力クリップが含まれています
parameters.prompt_extend いいえ この専用モデル契約で必要な場合は false を設定します
parameters.watermark いいえ ウォーターマークを入れるかどうか

I2V メディアは、first_frame、first_frame + last_frame、first_frame + driving_audio、または first_clip などのサポートされている組み合わせと、文書化されたオプションの終了フレームに従う必要があります。各メディア タイプは最大 1 回出現します。出力は720Pまたは1080Pです。

文書化されたワークフローの例

Section titled “文書化されたワークフローの例”
ターミナルウィンドウbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-i2v",
"input": {"prompt": "镜头从第一帧推进到最后一帧", "media": [
{"type": "first_frame", "url": "https://example.com/first.png"},
{"type": "last_frame", "url": "https://example.com/last.png"}
]},
"parameters": {"resolution": "1080P", "duration": 8, "prompt_extend": false}
}'

無効なモデル パラメーターは、リクエスト ID を含む 4xx を返します。非同期タスクは、作成が成功した後に失敗することもあります。ポーリング応答からの error_code と error_message を最終タスク理由として使用します。異なる JSON 形式で同じリクエストを再試行しないでください。

このページでは、Modelflare モデルの生成と編集呼び出しについて説明します。検索またはマップのエンリッチメント、音声管理、および要素ライブラリ管理は、このパブリック モデル呼び出しサーフェスの外部にあるリソース API であり、必須のリクエスト フィールドではありません。

動画秒単位課金モデルです。現在の顧客価格、参考定価、完全な仕様については、モデル価格ページを参照してください。

モデルID 違い
wan2.7-i2v このページに記載されているモデル。
メディア契約 · v1

契約ID: media.wan2-7-i2v.v1アダプター: video.wan.i2v.v1@v1指紋: f88d7c8cb3fd7273312b35a66e10fc485ceaa6e2848487aa73b4819fff587413

公式ソース: Alibaba Cloud Model Studio

契約パラメータ

インテントフィールドコントロールオプション
resolutionselect720p / 1080p
durationselect2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15

サポートされる機能

  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
  • required_assets · reference_asset_ids
  • max_assets · reference_asset_ids · 3
  • prompt_optional_with_reference · prompt

構造化リクエストの例

reference

インテント

{
  "duration": 2,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "reference_asset_ids": [
    "asset_example"
  ],
  "resolution": "720p"
}

プロバイダーリクエスト

{
  "input": {
    "media": [
      {
        "type": "first_frame",
        "url": "https://example.com/reference.png"
      }
    ],
    "prompt": "A red paper kite over a quiet harbour at dusk."
  },
  "model": "wan2.7-i2v",
  "parameters": {
    "duration": 2,
    "resolution": "720P"
  }
}