# Wan 2.7 Lora API Alibaba の Wan 2.7 Lora 画像から動画生成向け完全 API リファレンスです。 ## モデルバリアント この API は 1 つのモデルバリアントに対応しています: | モデル | ID | 説明 | |-------|-----|-------------| | **Wan 2.7 Lora Image to Video** | `wan-2.7-lora-image-to-video` | 高品質な画像から動画アニメーション | ## クイック比較 | 機能 | Image to Video | |---------|----------------| | 入力 | 画像 + テキストプロンプト | | 長さの範囲 | 2〜15 秒 | | 解像度オプション | 720p、1080p | | アスペクト比 | 非対応(ソース依存) | | 音声サポート | 任意のカスタム音声 | | 開始フレーム | 必須 | ## Wan 2.7 Lora Image to Video ### エンドポイント ``` POST /api/v1/video/task ``` ### リクエストパラメータ #### 必須 | パラメータ | 型 | 説明 | |-----------|------|-------------| | `model_name` | string | `"wan-2.7-lora-image-to-video"` である必要があります | | `prompt` | string | 動画生成プロンプト | | `image_url` | string | 最初のフレーム画像 URL | | `duration` | number | 動画の長さ(秒)。`2` から `15` の間である必要があります。 | | `resolution` | string | 必須の出力解像度:`"720p"` または `"1080p"`。デフォルト値は `"720p"` です。 | #### 任意 | パラメータ | 型 | 説明 | |-----------|------|-------------| | `audio_url` | string | 任意のカスタム音声 URL。対応形式:wav または mp3。音声の長さは 2〜30 秒にしてください。 | | `negative_prompt` | string | 生成動画内で抑制したい内容 | | `seed` | number | `[0, 2147483647]` の範囲のランダムシード | ### リクエスト例 ```javascript const response = await fetch('https://api.flaq.ai/api/v1/video/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'wan-2.7-lora-image-to-video', prompt: 'The girl is dancing', image_url: 'https://example.com/source-image.jpg', resolution: '720p', duration: 5, audio_url: 'https://example.com/background-audio.mp3', seed: 4, negative_prompt: 'other people' }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## レスポンス形式 送信レスポンス: ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "submitted" } } ``` `GET /api/v1/video/{task_id}` でポーリングします。タスクステータス:`submitted`、`processing`、`succeed`、`failed`。 ## ベストプラクティス - 被写体の動きとカメラ挙動を明確に説明するモーションプロンプトを使用します。 - 被写体が明確な、すっきりした最初のフレーム画像を用意します。 - `negative_prompt` を使用して、不要なアーティファクトや余計な被写体を減らします。