curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.6-image-to-video",
"prompt": "A cat playing piano"
}
'import requests
url = "https://api.evolink.ai/v1/videos/generations"
payload = {
"model": "wan2.6-image-to-video",
"prompt": "A cat playing piano"
}
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-image-to-video', prompt: 'A cat playing piano'})
};
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-image-to-video',
'prompt' => 'A cat playing piano'
]),
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-image-to-video\",\n \"prompt\": \"A cat playing piano\"\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-image-to-video\",\n \"prompt\": \"A cat playing piano\"\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-image-to-video\",\n \"prompt\": \"A cat playing piano\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "wan2.6-image-to-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-image-to-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-image-to-video) モデルは最初のフレーム画像から動画の生成をサポートしています
- 非同期処理モード、返されたタスクIDを使用してステータスを照会してください
- 生成された動画リンクは24時間有効です。速やかに保存してください
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan2.6-image-to-video",
"prompt": "A cat playing piano"
}
'import requests
url = "https://api.evolink.ai/v1/videos/generations"
payload = {
"model": "wan2.6-image-to-video",
"prompt": "A cat playing piano"
}
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-image-to-video', prompt: 'A cat playing piano'})
};
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-image-to-video',
'prompt' => 'A cat playing piano'
]),
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-image-to-video\",\n \"prompt\": \"A cat playing piano\"\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-image-to-video\",\n \"prompt\": \"A cat playing piano\"\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-image-to-video\",\n \"prompt\": \"A cat playing piano\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "wan2.6-image-to-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-image-to-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
ボディ
モデル名
wan2.6-image-to-video "wan2.6-image-to-video"
生成したい動画を説明するプロンプト、1500文字まで
1500"A cat playing piano"
最初のフレーム画像から動画生成用の参照画像URLリスト
注意:
- 1回のリクエストで
1枚の画像をサポート - 画像サイズ:
10MB以下 - サポートされる形式:
.jpeg、.jpg、.png(透過チャンネル非対応)、.bmp、.webp - 画像解像度: 幅と高さの範囲は
[360, 2000]ピクセル - 画像URLはサーバーから直接アクセス可能であるか、URLにアクセスすると画像が直接ダウンロードされる必要があります(通常、
.png、.jpgなどの画像拡張子で終わるURL)
1["https://example.com/image1.png"]
生成される動画の長さを指定します(秒)
注意:
2~15秒の任意の整数値をサポート- 各リクエストは
duration値に基づいて事前請求され、実際の請求は生成された動画の秒数に基づきます
2 <= x <= 155
動画の品質、デフォルトは 720p
オプション:
720p: 標準画質、標準価格、これがデフォルトです1080p: 高画質、高価格
"720p"
インテリジェントプロンプト書き換えを有効にするかどうか。有効にすると、大規模モデルがプロンプトを最適化し、シンプルまたは説明が不十分なプロンプトの結果を大幅に改善します。デフォルトは true
true
モデルパラメータ設定
Show child attributes
Show child attributes
音声ファイルURL。モデルはこの音声を使用して動画を生成します。
形式要件:
- サポートされる形式:
mp3 - 長さ:
3〜30秒 - ファイルサイズ: 最大
15MB
オーバーフロー処理:
- 音声の長さが
durationの値(5秒または10秒)を超える場合、最初の5秒または10秒が自動的に抽出され、残りは破棄されます - 音声の長さが動画の長さより短い場合、音声の長さを超える部分は無音になります。例えば、音声が3秒で動画の長さが5秒の場合、出力動画は最初の3秒に音声があり、最後の2秒は無音になります
"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp3"
タスク完了時の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-image-to-video"
タスクタイプ
video.generation.task タスク進捗率(0-100)
0 <= x <= 1000
タスクステータス
pending, processing, completed, failed "pending"
動画タスクの詳細
Show child attributes
Show child attributes
タスク出力タイプ
text, image, audio, video "video"
使用量と課金情報
Show child attributes
Show child attributes