wan2.6-reference-video API
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.6-reference-video",
"prompt": "A person dancing",
"video_urls": [
"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4"
]
}
'import requests
url = "https://api.evolink.ai/v1/videos/generations"
payload = {
"model": "wan2.6-reference-video",
"prompt": "A person dancing",
"video_urls": ["https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan2.6-reference-video',
prompt: 'A person dancing',
video_urls: ['https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4']
})
};
fetch('https://api.evolink.ai/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/videos/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'wan2.6-reference-video',
'prompt' => 'A person dancing',
'video_urls' => [
'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"wan2.6-reference-video\",\n \"prompt\": \"A person dancing\",\n \"video_urls\": [\n \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/videos/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"wan2.6-reference-video\",\n \"prompt\": \"A person dancing\",\n \"video_urls\": [\n \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"wan2.6-reference-video\",\n \"prompt\": \"A person dancing\",\n \"video_urls\": [\n \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "wan2.6-reference-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 120
},
"type": "video",
"usage": {
"billing_rule": "per_call",
"credits_reserved": 5,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: wan2.6-reference-video",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Wan2.6
Wan2.6 参照動画
- WAN2.6(wan2.6-reference-video)モデルは参照動画から動画への生成をサポートしています
- 参照動画をアップロードすると、モデルがキャラクターの外見と音声を抽出して新しい動画を生成します
- 非同期処理モード、返されたタスクIDを使用してステータスを照会してください
- 生成された動画リンクは24時間有効です。速やかに保存してください
- 課金:入力+出力動画の長さに基づく合算課金、生成成功後のみ課金され、失敗時は課金されません
POST
/
v1
/
videos
/
generations
wan2.6-reference-video API
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.6-reference-video",
"prompt": "A person dancing",
"video_urls": [
"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4"
]
}
'import requests
url = "https://api.evolink.ai/v1/videos/generations"
payload = {
"model": "wan2.6-reference-video",
"prompt": "A person dancing",
"video_urls": ["https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'wan2.6-reference-video',
prompt: 'A person dancing',
video_urls: ['https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4']
})
};
fetch('https://api.evolink.ai/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/videos/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'wan2.6-reference-video',
'prompt' => 'A person dancing',
'video_urls' => [
'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"wan2.6-reference-video\",\n \"prompt\": \"A person dancing\",\n \"video_urls\": [\n \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/videos/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"wan2.6-reference-video\",\n \"prompt\": \"A person dancing\",\n \"video_urls\": [\n \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"wan2.6-reference-video\",\n \"prompt\": \"A person dancing\",\n \"video_urls\": [\n \"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "wan2.6-reference-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 120
},
"type": "video",
"usage": {
"billing_rule": "per_call",
"credits_reserved": 5,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: wan2.6-reference-video",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}承認
すべてのAPIにBearer Token認証が必要です
APIキーの取得:
APIキー管理ページにアクセスしてAPIキーを取得してください
リクエストヘッダーに追加:
Authorization: Bearer YOUR_API_KEY
ボディ
application/json
モデル名
利用可能なオプション:
wan2.6-reference-video 例:
"wan2.6-reference-video"
生成したい動画を説明するプロンプト、1500文字まで
Maximum string length:
1500例:
"A person dancing"
参照動画ファイルURLの配列。参照動画からキャラクターの外見と音声を抽出して新しい動画を生成するために使用されます。
URL要件:
- HTTPまたはHTTPSプロトコルをサポート
- ローカルファイルはファイルアップロードで一時URLを取得できます
配列の制限:
- 最大3本の動画
動画の要件:
- フォーマット:mp4、mov
- 長さ:2〜30秒
- ファイルサイズ:1本あたり100MB以下
入力動画の課金ルール:
- 各参照動画は切り捨てて合算され、入力課金時間の合計は最大
5秒です - 動画1本:
min(動画の長さ, 5s) - 動画2本:
min(動画1の長さ, 2.5s) + min(動画2の長さ, 2.5s) - 動画3本:
min(動画1の長さ, 1.65s) + min(動画2の長さ, 1.65s) + min(動画3の長さ, 1.65s) 1080p画質はより高い料金となります
Maximum array length:
3例:
[ "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4" ]
動画のアスペクト比、デフォルトは16:9
オプション:
720p:16:9(横向き)、9:16(縦向き)、1:1(正方形)、4:3、3:4をサポート1080p:16:9(横向き)、9:16(縦向き)、1:1(正方形)、4:3、3:4をサポート
例:
"16:9"
動画の画質、デフォルトは720p
オプション:
720p:標準画質、標準価格、これがデフォルトです1080p:高画質、より高い価格
注意: 画質レベルによってサポートされるアスペクト比が異なります。aspect_ratioパラメータを参照してください
例:
"720p"
生成される動画の長さを指定します(秒)
注意:
2~10秒の任意の整数値をサポート- 各リクエストは
duration値に基づいて事前請求され、実際の請求は生成された動画の秒数に基づきます
必須範囲:
2 <= x <= 10例:
5
モデルパラメータ設定
Show child attributes
Show child attributes
タスク完了時のHTTPSコールバックURL
コールバックのタイミング:
- タスクが完了、失敗、またはキャンセルされた時にトリガーされます
- 課金確認後に送信されます
セキュリティ制限:
- HTTPSプロトコルのみサポートされています
- 内部IPアドレスへのコールバックは禁止されています(127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x など)
- URLの長さは
2048文字を超えてはなりません
コールバックメカニズム:
- タイムアウト:
10秒 - 失敗後最大
3回リトライ(失敗後1/2/4秒でリトライ) - コールバックのレスポンス形式はタスク照会APIのレスポンスと同一です
- 2xxステータスコードは成功とみなされ、その他のステータスコードはリトライをトリガーします
例:
"https://your-domain.com/webhooks/video-task-completed"
レスポンス
動画タスクが正常に作成されました
タスク作成タイムスタンプ
例:
1757169743
タスク ID
例:
"task-unified-1757169743-7cvnl5zw"
使用された実際のモデル名
例:
"wan2.6-reference-video"
タスクタイプ
利用可能なオプション:
video.generation.task タスク進捗率(0-100)
必須範囲:
0 <= x <= 100例:
0
タスクステータス
利用可能なオプション:
pending, processing, completed, failed 例:
"pending"
動画タスクの詳細
Show child attributes
Show child attributes
タスク出力タイプ
利用可能なオプション:
text, image, audio, video 例:
"video"
使用量と課金情報
Show child attributes
Show child attributes