Wan 2.1 (image-to-video) API
もっと見る
開発元:Alibaba。 このモデルはMartLLMが運用しているものではありません。 MartLLMでは、販売者が自身のプロバイダーアカウントを通じて提供しています。
リクエスト
curl https://api.martllm.com/v1/video/generations \
-H "Authorization: Bearer $UBERLLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan/wan-2-1-image-to-video",
"prompt": "Bring the photo to life: a slow camera push-in, hair and clothes move gently in the wind, the person blinks and smiles slightly; keep the face, outfit and background unchanged",
"resolution": "480p",
"duration_seconds": 5,
"image_url": "https://example.com/photo.jpg"
}'
# → {"id": "<job id>", "status": "queued", "poll_url": "/v1/video/generations/<job id>"}UBERLLM_API_KEYにAPIキーを設定してください。 statusが"succeeded"になるまで5秒ごとに/v1/video/generations/<job id>を確認し、キーを使ってファイルをダウンロードします。失敗したジョブは理由が返され、料金はかかりません。 API詳細ガイド
オプション
- タスク
- 画像から動画, 参照画像
- 解像度
- 480p, 720p
- 長さ
- 5秒, 10秒
- アスペクト比
- 16:9, 9:16
- 入力画像
- 最大1
- 課金単位
- 動画1秒あたり
- あなたのLoRA
- 最大3
- モデルID
wan/wan-2-1-image-to-video
Wan 2.1 (image-to-video)を試す
設定
元画像
.safetensors ファイルへのリンク、またはここで学習したLoRAのリンク。JSONタブなら3つまで指定できます。
左の設定と同じリクエストです。そのままコピーできます。
curl https://api.martllm.com/v1/video/generations \
-H "Authorization: Bearer $UBERLLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan/wan-2-1-image-to-video",
"prompt": "",
"resolution": "480p",
"duration_seconds": 5
}'
# → {"id": "<job id>", "status": "queued", "poll_url": "/v1/video/generations/<job id>"}Wan 2.1 (image-to-video) APIの得意なこと
- 1回のリクエストで最長10秒のクリップを生成。
- お手持ちの画像をそのまま最初のフレームに使用。
- 人物・商品・場所の参照画像を最大1枚。
- 出力解像度:480p, 720p。
- アスペクト比:16:9, 9:16。
サンプルから始める
01
写真を動かす
Bring the photo to life: a slow camera push-in, hair and clothes move gently in the wind, the person blinks and smiles slightly; keep the face, outfit and background unchanged
自分の画像で · 5秒
02
商品写真を回転させる
The product in the photo turns slowly on a turntable, soft studio light, the label stays sharp and readable, clean white background
自分の画像で · 5秒
03
静止したシーンを動かす
The scene in the photo starts moving: leaves sway, light shifts across the ground, a gentle handheld drift; nothing new appears in the frame
自分の画像で
Wan 2.1 (image-to-video) APIパラメーター
| パラメーター | 型 | 説明 |
|---|---|---|
| model | wan/wan-2-1-image-to-video | 必須 |
| prompt | string | 必須. What to make. |
| image_url | string | いずれか1つ. The first frame: an https:// link or a data: URI. |
| input_images | array<string>, 最大1 | いずれか1つ. Several pictures (https:// links or data: URIs). |
| resolution | 480p, 720p | 任意 · 480p. The seller needs one: left out, 480p is sent. |
| duration_seconds | 5, 10 | 任意. Length in seconds. Left out: the model's shortest. |
| aspect_ratio | 16:9, 9:16 | 任意. Shape of the video. |
| loras | array<object>, 最大3 | 任意. Optional: up to 3 LoRAs to apply (a style or a person you trained). Each path is an https:// link to the weights, a file id from POST /v1/files (.safetensors), or the file link of your own finished training job. |
GET https://api.martllm.com/v1/models/wan/wan-2-1-image-to-videoから取得。APIが各リクエストの検証に使うのと同じルールです。
Wanモデル比較
| モデル | モデルID | 最低価格(1秒あたり) | 最大 | 最長 |
|---|---|---|---|---|
| Wan 2.1 (image-to-video) | wan/wan-2-1-image-to-video | 720p | 10秒 | |
| Wan 2.7 Text-to-Video | wan/wan-2-7-text-to-video | $0.11 | 15秒 | |
| Wan 2.2 A14B Text-to-Video | wan/wan-2-2-a14b-text-to-video | $0.0286 | 5秒 | |
| Wan 2.5 Preview Text-to-Video | wan/wan-2-5-preview-text-to-video | $0.0336 | 10秒 | |
| Wan 2.6 Text-to-Video | wan/wan-2-6-text-to-video | $0.11 | 15秒 | |
| Wan 2.6 Flash Image-to-Video | wan/wan-2-6-flash-image-to-video | $0.034 | 1080p | 15秒 |
| Wan 2.7 (image-to-video) | wan/wan-2-7-image-to-video | $0.0862 | 1080p | 15秒 |
| Wan 2.5 Preview (image-to-video) | wan/wan-2-5-preview-image-to-video | $0.0671 | 1080p | 10秒 |
| Wan 2.6 (image-to-video) | wan/wan-2-6-image-to-video | $0.0671 | 1080p | 15秒 |
| Wan 2.7 (reference-to-video) | wan/wan-2-7-reference-to-video | $0.0336 | 1080p | 10秒 |
Wan 2.1 (image-to-video) APIのよくある質問
Wan 2.1 (image-to-video)の料金はいくらですか?
Wan 2.1 (image-to-video)は表示価格で請求され、MartLLMの手数料は上乗せされません。失敗したリクエストは無料です。
Wan 2.1 (image-to-video)で動画を生成するには?
MartLLM key、model "wan/wan-2-1-image-to-video"、そしてpromptを指定して、https://api.martllm.com/v1/video/generationsにPOSTリクエストを送信してください。ジョブIDが返されます。「succeeded」と表示されるまで、https://api.martllm.com/v1/video/generations/<job id>に問い合わせてください。その後、https://api.martllm.com/v1/media/artifacts/<job id>/0からdownloadしてください。