動画
wan2.7-r2v API
Modelflare 非同期ビデオ ルーティングを通じて正確な wan2.7-r2v モデル ID を使用します。
正確なモデル ID wan2.7-r2v を使用します。モデル フィールドはこのページと正確に一致する必要があります。
パラメータ: 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.
{ "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" }}認証とエンドポイント
Section titled “認証とエンドポイント”https://modelflare.dev/v1 で Modelflare API キーを使用します。ゲートウェイのエントリ ポイントは POST /v1/videos です。
Authorization: Bearer YOUR_MODELFLARE_API_KEYタスクの作成
Section titled “タスクの作成”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} }'ポーリングとダウンロード
Section titled “ポーリングとダウンロード”タスクIDを保存します。 GET /v1/videos/{task_id} をポーリングし、GET /v1/videos/{task_id}/content でダウンロードします。結果 URL は有効期限が切れている可能性があるため、速やかにファイルを転送してください。
curl https://modelflare.dev/v1/videos/TASK_ID \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"リクエストメモ
Section titled “リクエストメモ”Wan は一般的に input と parameters を使用します。フレームガイドモードとリファレンスメディアモードを混合してはなりません。
リクエストパラメータ
Section titled “リクエストパラメータ”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 “文書化されたワークフローの例”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} }'エラーと失敗したタスク
Section titled “エラーと失敗したタスク”無効なモデル パラメーターは、リクエスト ID を含む 4xx を返します。非同期タスクは、作成が成功した後に失敗することもあります。ポーリング応答からの error_code と error_message を最終タスク理由として使用します。異なる JSON 形式で同じリクエストを再試行しないでください。
サポート範囲
Section titled “サポート範囲”このページでは、Modelflare モデルの生成と編集呼び出しについて説明します。検索またはマップのエンリッチメント、音声管理、および要素ライブラリ管理は、このパブリック モデル呼び出しサーフェスの外部にあるリソース API であり、必須のリクエスト フィールドではありません。
価格設定と請求
Section titled “価格設定と請求”動画秒単位課金モデルです。現在の顧客価格、参考定価、完全な仕様については、モデル価格ページを参照してください。
| モデルID | 違い |
|---|---|
wan2.7-r2v |
このページに記載されているモデル。 |
メディア契約 · v1
公式ソース: Alibaba Cloud Model Studio
契約パラメータ
| インテントフィールド | コントロール | オプション |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 |
resolution | select | 720p / 1080p |
duration | select | 2 / 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:4allowed_values·resolution· 720p, 1080pallowed_values·duration· 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15required_assets·reference_asset_idsmax_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"
}
}