curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "wan2.7",
prompt: "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
resolution: "1080P",
duration: 8,
size: "16:9"
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apimart.ai/v1/videos/generations"
payload := map[string]interface{}{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.apimart.ai/v1/videos/generations";
String payload = """
{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$url = "https://api.apimart.ai/v1/videos/generations";
$payload = [
"model" => "wan2.7",
"prompt" => "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution" => "1080P",
"duration" => 8,
"size" => "16:9"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <token>",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
require 'net/http'
require 'json'
require 'uri'
url = URI("https://api.apimart.ai/v1/videos/generations")
payload = {
model: "wan2.7",
prompt: "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
resolution: "1080P",
duration: 8,
size: "16:9"
}
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 = payload.to_json
response = http.request(request)
puts response.body
import Foundation
let url = URL(string: "https://api.apimart.ai/v1/videos/generations")!
let payload: [String: Any] = [
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
]
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let error = error {
print("Error: \(error)")
return
}
if let data = data, let responseString = String(data: data, encoding: .utf8) {
print(responseString)
}
}
task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var url = "https://api.apimart.ai/v1/videos/generations";
var payload = @"{
""model"": ""wan2.7"",
""prompt"": ""夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像"",
""resolution"": ""1080P"",
""duration"": 8,
""size"": ""16:9""
}";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"error": {
"code": 400,
"message": "リクエストパラメータが無効です",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "認証に失敗しました。APIキーを確認してください",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "残高が不足しています。チャージしてください",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "リクエストが多すぎます。しばらくしてからお試しください",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "サーバー内部エラー。しばらくしてからお試しください",
"type": "server_error"
}
}
Wan2.7
Wan2.7 動画生成
- アリババクラウド万相 2.7 動画生成モデル(統一エンドポイント)
- パラメータに応じて自動ルーティング:テキストから動画 / 画像から動画(先頭フレーム、先頭・最終フレーム、動画継続)
- 720P/1080P 解像度、2〜15 秒の長さに対応
- カスタムオーディオ対応(テキストモードではBGM、画像モードでは駆動音声として使用)
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "wan2.7",
prompt: "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
resolution: "1080P",
duration: 8,
size: "16:9"
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apimart.ai/v1/videos/generations"
payload := map[string]interface{}{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.apimart.ai/v1/videos/generations";
String payload = """
{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$url = "https://api.apimart.ai/v1/videos/generations";
$payload = [
"model" => "wan2.7",
"prompt" => "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution" => "1080P",
"duration" => 8,
"size" => "16:9"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <token>",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
require 'net/http'
require 'json'
require 'uri'
url = URI("https://api.apimart.ai/v1/videos/generations")
payload = {
model: "wan2.7",
prompt: "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
resolution: "1080P",
duration: 8,
size: "16:9"
}
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 = payload.to_json
response = http.request(request)
puts response.body
import Foundation
let url = URL(string: "https://api.apimart.ai/v1/videos/generations")!
let payload: [String: Any] = [
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
]
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let error = error {
print("Error: \(error)")
return
}
if let data = data, let responseString = String(data: data, encoding: .utf8) {
print(responseString)
}
}
task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var url = "https://api.apimart.ai/v1/videos/generations";
var payload = @"{
""model"": ""wan2.7"",
""prompt"": ""夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像"",
""resolution"": ""1080P"",
""duration"": 8,
""size"": ""16:9""
}";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"error": {
"code": 400,
"message": "リクエストパラメータが無効です",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "認証に失敗しました。APIキーを確認してください",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "残高が不足しています。チャージしてください",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "リクエストが多すぎます。しばらくしてからお試しください",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "サーバー内部エラー。しばらくしてからお試しください",
"type": "server_error"
}
}
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "wan2.7",
prompt: "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
resolution: "1080P",
duration: 8,
size: "16:9"
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apimart.ai/v1/videos/generations"
payload := map[string]interface{}{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.apimart.ai/v1/videos/generations";
String payload = """
{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$url = "https://api.apimart.ai/v1/videos/generations";
$payload = [
"model" => "wan2.7",
"prompt" => "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution" => "1080P",
"duration" => 8,
"size" => "16:9"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer <token>",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
require 'net/http'
require 'json'
require 'uri'
url = URI("https://api.apimart.ai/v1/videos/generations")
payload = {
model: "wan2.7",
prompt: "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
resolution: "1080P",
duration: 8,
size: "16:9"
}
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 = payload.to_json
response = http.request(request)
puts response.body
import Foundation
let url = URL(string: "https://api.apimart.ai/v1/videos/generations")!
let payload: [String: Any] = [
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像",
"resolution": "1080P",
"duration": 8,
"size": "16:9"
]
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
if let error = error {
print("Error: \(error)")
return
}
if let data = data, let responseString = String(data: data, encoding: .utf8) {
print(responseString)
}
}
task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var url = "https://api.apimart.ai/v1/videos/generations";
var payload = @"{
""model"": ""wan2.7"",
""prompt"": ""夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像"",
""resolution"": ""1080P"",
""duration"": 8,
""size"": ""16:9""
}";
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
}
}
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"error": {
"code": 400,
"message": "リクエストパラメータが無効です",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "認証に失敗しました。APIキーを確認してください",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "残高が不足しています。チャージしてください",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "リクエストが多すぎます。しばらくしてからお試しください",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "サーバー内部エラー。しばらくしてからお試しください",
"type": "server_error"
}
}
認証
すべてのAPIエンドポイントでBearer Token認証が必要ですAPIキーの取得:APIキー管理ページからAPIキーを取得してくださいリクエストヘッダーに追加:
Authorization: Bearer YOUR_API_KEY
モードルーティング
wan2.7 はテキストから動画および画像から動画の統一エンドポイントです。バックエンドは受信したパラメータに基づいて自動的にモードを判定します。両モードの料金は同一です:
| 条件 | ルーティング先 | モード説明 |
|---|---|---|
image_urls / image_with_roles / video_urls のいずれかが指定 | 画像から動画 | 先頭フレーム / 先頭・最終フレーム / 動画継続 |
| 上記パラメータがいずれも未指定 | テキストから動画 | テキスト説明のみから動画生成 |
リクエストパラメータ
動画生成モデル名。
wan2.7 で固定動画内容の説明、最大 5000 文字
- テキストモード(画像/動画なし):必須
- 画像モード:任意だが、カメラワークやアクションの指示のため推奨
"猫が草原で蝶を追いかける、晴天、スローモーション"画像URLの配列。指定すると自動的に画像モードに入ります
- 1 枚:先頭フレームから動画
- 2 枚:先頭・最終フレームから動画(1枚目が先頭、2枚目が最終)
image_with_roles とどちらか一方を使用image_urls と audio_url は競合するため、同時に指定することはできませんロール付き画像の配列。
image_urls の代わりに使用し、各画像のロールを精密に指定各オブジェクトのフィールド:url(string):画像URL(http/httpsに対応)role(string):画像ロール、first_frame(先頭フレーム)/last_frame(最終フレーム)、デフォルトfirst_frame
[
{ "url": "https://cdn.example.com/start.jpg", "role": "first_frame" },
{ "url": "https://cdn.example.com/end.jpg", "role": "last_frame" }
]
image_with_roles と audio_url は競合するため、同時に指定することはできません動画URLの配列。指定すると動画継続モードに入ります(最初の1本のみ使用)
video_urls と audio_url は競合するため、同時に指定することはできません動画の制限:
- フォーマット:mp4、mov
- 長さ:2〜10秒
- 解像度:幅・高さともに [240, 4096] ピクセルの範囲
- アスペクト比:1:8 〜 8:1
- ファイルサイズ:100MB 以下
ネガティブプロンプト。含めたくない内容を記述、最大 500 文字例:
"ぼやけ、歪み、低品質"動画解像度選択肢:
720P- 標準1080P- 高解像度(デフォルト)
動画の長さ(秒)対応範囲:
2〜15 秒デフォルト:5画面のアスペクト比。テキストモードのみ有効(画像/動画なしの場合)対応フォーマット:
16:9- 横向きワイド(デフォルト)9:16- 縦向き1:1- 正方形4:3- 横向き3:4- 縦向き
画像モードではこのパラメータは無視され、アスペクト比は入力画像により自動決定されます
カスタムオーディオURL
- テキストモード:動画のBGMとして使用
- 画像モード:駆動音声として使用、画面のアクションに同期
audio_url は video_urls、image_urls、image_with_roles と競合するため、これらと同時に指定することはできませんプロンプトのインテリジェントな書き換えを有効にするか短いプロンプトで効果が顕著ですが、処理時間が増加しますデフォルト:
true生成された動画に “AI生成” ウォーターマークを追加するか
true:ウォーターマークを追加false:追加しない(デフォルト)
生成内容のランダム性を制御するシード整数範囲:
≥0 の整数- 同一リクエストで異なるseed値を受け取ると(seedを指定しない場合など)、異なる結果が生成されます
- 同一リクエストで同じseed値を受け取ると、類似した結果が生成されますが、完全一致は保証されません
レスポンス
レスポンスステータスコード。成功時は 200
使用例
例 1:テキストから動画(最小リクエスト)
{
"model": "wan2.7",
"prompt": "夕日に照らされた海沿いの道路、スローモーションのカメラプッシュイン、映画のような映像"
}
例 2:テキストから動画(フルパラメータ)
{
"model": "wan2.7",
"prompt": "猫が草原で蝶を追いかける、晴天、スローモーション",
"negative_prompt": "ぼやけ、歪み、低品質",
"resolution": "1080P",
"duration": 8,
"size": "16:9",
"audio_url": "https://cdn.example.com/bgm.mp3",
"prompt_extend": true,
"watermark": false,
"seed": 42
}
例 3:先頭フレームから動画
{
"model": "wan2.7",
"prompt": "人物がゆっくり立ち上がり、カメラに向かって歩いてくる",
"image_urls": ["https://cdn.example.com/person.jpg"],
"resolution": "1080P",
"duration": 8
}
例 4:先頭・最終フレームから動画
{
"model": "wan2.7",
"prompt": "カメラが海辺から山頂へゆっくり移動",
"image_urls": [
"https://cdn.example.com/beach.jpg",
"https://cdn.example.com/mountain.jpg"
],
"resolution": "1080P",
"duration": 10
}
2枚指定の場合:1枚目が先頭フレーム、2枚目が最終フレーム。image_with_roles で精密指定も可能。
例 5:動画継続
{
"model": "wan2.7",
"prompt": "前進を続け、カメラが追随",
"video_urls": ["https://cdn.example.com/clip.mp4"],
"resolution": "1080P",
"duration": 8
}
例 6:画像 + 駆動音声
{
"model": "wan2.7",
"prompt": "人物が音楽のリズムに合わせて動く",
"image_urls": ["https://cdn.example.com/dancer.jpg"],
"audio_url": "https://cdn.example.com/beat.mp3",
"resolution": "1080P",
"duration": 8
}
モード選択ガイド
| 要件 | 推奨方法 |
|---|---|
| テキストのみから動画生成 | prompt のみ指定(画像/動画なし) |
| 画像を”動かす” | image_urls に1枚指定 |
| 開始・終了シーンを制御 | image_urls に2枚指定(先頭+最終) |
| 既存動画を延長 | video_urls に動画を指定 |
| 画像を音楽に合わせる | 画像 + audio_url |
タスク結果の取得動画生成は非同期タスクで、送信時に
task_id が返されます。タスクステータス取得 エンドポイントで生成進捗と結果を取得してください。⌘I