> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixroute.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Wan 2.6 I2V

> Wan 2.6 I2Vは、最初のフレームの画像を、音声と同期した動画にします。Wan 2.7のmedia配列ではなく、img_urlを使用します。

Wan 2.6 I2Vは、最初のフレームの画像を、音声と同期した動画にします。Wan 2.7のmedia配列ではなく、img\_urlを使用します。

MixRoute Video Generations APIでは、正確なモデルID`wan2.6-i2v`を使用してください。

## モデル仕様

| プロパティ | 値 |
| - | - |
| モード | 画像から動画への生成 |
| 解像度 | 720P / 1080P |
| 長さ（秒） | 2-15 |
| 出力 | MP4 / 30 fps |
| リクエスト | `model` + `metadata.input` + `metadata.parameters` |

[Wan APIリファレンス](/ja/api-reference/endpoint/wan)には、モデル固有のフィールド、メディアの制限、デフォルト値、ポーリングの手順が定義されています。別のバージョンの入力フィールドや出力サイズのフィールドを流用しないでください。

## リクエスト例

MIXROUTE\_API\_KEYを設定し、メディアのプレースホルダーをアクセス可能なファイルに置き換えてください。

```bash theme={null}
curl --request POST "https://api.mixroute.ai/v1/video/generations" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "model": "wan2.6-i2v",
  "metadata": {
    "input": {
      "prompt": "A red ceramic mug slowly rotates on a white tabletop. Static camera, soft studio lighting.",
      "img_url": "https://example.com/reference.png"
    },
    "parameters": {
      "resolution": "720P",
      "duration": 2,
      "prompt_extend": false,
      "watermark": false
    }
  }
}'
```

### Python

```python theme={null}
import json
import os
import requests

payload = json.loads(r'''
{
  "model": "wan2.6-i2v",
  "metadata": {
    "input": {
      "prompt": "A red ceramic mug slowly rotates on a white tabletop. Static camera, soft studio lighting.",
      "img_url": "https://example.com/reference.png"
    },
    "parameters": {
      "resolution": "720P",
      "duration": 2,
      "prompt_extend": false,
      "watermark": false
    }
  }
}
''')
response = requests.post(
    "https://api.mixroute.ai/v1/video/generations",
    headers={"Authorization": "Bearer " + os.environ["MIXROUTE_API_KEY"]},
    json=payload,
    timeout=120,
)
response.raise_for_status()
result = response.json()
task_id = result.get("task_id") or result.get("id")
if not task_id:
    raise RuntimeError(result.get("message") or result)
print(task_id)
```

送信したMixRouteのタスクIDを保持してください。SUCCESSまたはFAILUREになるまで[動画タスクのステータス](/ja/api-reference/endpoint/query-video-task)を照会します。SUCCESSになったらdata.result\_urlを取得してください。上流の生の出力と使用量はdata.dataに含まれます。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.