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

動画

wan2.7-r2v API

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

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

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

パラメータ: duration=5resolution=1080Pratio=16:9参考画像

プロンプト: One continuous take, no cuts. Keep the glass flowers from the reference exactly as they are and carry them into a new place: a wide city crossing at night in the rain. The whole bed of glass blooms now grows straight out of the wet asphalt across the junction, ringing as the rain strikes them, headlights firing caustics along the road. The camera starts at kerb height among the stems, moves forward through them and rises to look down the length of the crossing. One hard pink key from a shopfront on the left, cold blue signals behind. Real weight and inertia, glass and water, no text.

入力メディア URL が置き換えられた、このサンプルを生成したリクエスト
{
"model": "wan2.7-r2v",
"input": {
"prompt": "One continuous take, no cuts. Keep the glass flowers from the reference exactly as they are and carry them into a new place: a wide city crossing at night in the rain. The whole bed of glass blooms now grows straight out of the wet asphalt across the junction, ringing as the rain strikes them, headlights firing caustics along the road. The camera starts at kerb height among the stems, moves forward through them and rises to look down the length of the crossing. One hard pink key from a shopfront on the left, cold blue signals behind. Real weight and inertia, glass and water, no text.",
"media": [
{
"type": "reference_image",
"url": "https://example.com/input-image.png"
}
]
},
"parameters": {
"duration": 5,
"resolution": "1080P",
"ratio": "16:9"
}
}

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-r2v",
"input": {"prompt": "The subject in Image 1 walks through the street from Video 1.", "media": [{"type": "reference_image", "url": "https://example.com/reference.png"}, {"type": "reference_video", "url": "https://example.com/reference.mp4"}]},
"parameters": {"resolution": "1080P", "ratio": "16:9", "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 R2V は reference_image / reference_video メディアを使用し、reference_voice をアタッチする場合があります。このワークフローを first_frame / last_frame の役割と混合しないでください。

フィールド 必須 注意事項
model はい wan2.7-r2v
input.prompt はい 文書化された構文を使用してシーンと参照メディアを説明する
input.media[] はい reference_image または reference_video 少なくとも 1 つ
input.media[].reference_voice いいえ 音声特性の公開 WAV/MP3 URL
parameters.resolution いいえ 720P / 1080P (デフォルトは1080P)
parameters.ratio いいえ 16:9 / 9:16 / 1:1 / 4:3 / 3:4 (first_frameがある場合は無視されます)
parameters.duration いいえ 参照ビデオが存在する場合は、短い再生時間制限を使用します
parameters.prompt_extend いいえ この専用モデル契約で必要な場合は false を設定します
parameters.watermark いいえ ウォーターマークを入れるかどうか
parameters.seed いいえ オプションのランダムシード

R2V には、少なくとも 1 つの reference_image または reference_video が必要で、最大 5 つの参照画像/ビデオを組み合わせます。 first_frame と reference_voice は 1 つずつ取り付けることができます。 参照ビデオが存在する場合、再生時間制限は短くなります。

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

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-r2v",
"input": {"prompt": "让图像主体沿视频动作自然移动", "media": [
{"type": "reference_image", "url": "https://example.com/subject.png"},
{"type": "reference_video", "url": "https://example.com/motion.mp4"}
]},
"parameters": {"resolution": "1080P", "duration": 8, "prompt_extend": false}
}'

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

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

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

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

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

公式ソース: Alibaba Cloud Model Studio

契約パラメータ

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

サポートされる機能

  • allowed_values · ratio · 16:9, 9:16, 1:1, 4:3, 3:4
  • 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 · 6

構造化リクエストの例

reference

インテント

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

プロバイダーリクエスト

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