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초 길이 지원
- 사용자 지정 오디오 지원 (텍스트 모드에서는 배경음악, 이미지 모드에서는 구동 오디오로 사용)
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 배열. 전달되면 동영상 이어서 만들기 모드로 진입 (첫 번째 동영상만 사용)
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
- 텍스트 모드: 동영상 배경음악으로 사용
- 이미지 모드: 구동 오디오로 사용, 화면 동작과 동기화
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