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 Key 받기:
API Key 관리 페이지를 방문하여 API Key를 받으세요
요청 헤더에 추가:
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초
- 파일 크기: 단일 영상 100MB 이하
입력 영상 과금 규칙:
- 각 참조 영상은 잘라서 합산되며, 총 입력 과금 길이는
5초로 제한됩니다 - 영상 1개:
min(video duration, 5s) - 영상 2개:
min(video1 duration, 2.5s) + min(video2 duration, 2.5s) - 영상 3개:
min(video1 duration, 1.65s) + min(video2 duration, 1.65s) + min(video3 duration, 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