curl --request POST \
--url https://api.apimart.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}'
import requests
url = "https://api.apimart.ai/v1/images/generations"
payload = {
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
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/images/generations";
const payload = {
model: "wan2.7-image-pro",
prompt: "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
};
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/images/generations"
payload := map[string]interface{}{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display",
}
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 payload = """
{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apimart.ai/v1/images/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
System.out.println(client.send(request,
HttpResponse.BodyHandlers.ofString()).body());
}
}
<?php
$url = "https://api.apimart.ai/v1/images/generations";
$payload = [
"model" => "wan2.7-image-pro",
"prompt" => "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
];
$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/images/generations")
payload = {
model: "wan2.7-image-pro",
prompt: "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
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/images/generations")!
let payload: [String: Any] = [
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
]
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 str = String(data: data, encoding: .utf8) { print(str) }
}
task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var payload = @"{
""model"": ""wan2.7-image-pro"",
""prompt"": ""A flower shop with exquisite windows, beautiful wooden door, flowers on display""
}";
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(
"https://api.apimart.ai/v1/images/generations", content);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
{
"code": "success",
"data": [
{
"task_id": "task_01HX...",
"status": "processing"
}
]
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed. Please check your API key.",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient balance. Please top up your account.",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "Too many requests. Please try again later.",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "Internal server error. Please try again later.",
"type": "server_error"
}
}
wan2.7-image
Geração e Edição de Imagens wan2.7
- Série de imagens Wan2.7: suporta text-to-image, edição de imagens, edição interativa, geração sequencial e referência multi-imagem
- Modo de processamento assíncrono — envie uma tarefa e consulte os resultados usando o
task_idretornado - Suporta resoluções 1K / 2K / 4K; o wan2.7-image-pro suporta até 4K em text-to-image
- A cobrança é feita com base no número de imagens geradas com sucesso, independentemente da resolução ou da proporção
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://api.apimart.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}'
import requests
url = "https://api.apimart.ai/v1/images/generations"
payload = {
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
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/images/generations";
const payload = {
model: "wan2.7-image-pro",
prompt: "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
};
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/images/generations"
payload := map[string]interface{}{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display",
}
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 payload = """
{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apimart.ai/v1/images/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
System.out.println(client.send(request,
HttpResponse.BodyHandlers.ofString()).body());
}
}
<?php
$url = "https://api.apimart.ai/v1/images/generations";
$payload = [
"model" => "wan2.7-image-pro",
"prompt" => "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
];
$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/images/generations")
payload = {
model: "wan2.7-image-pro",
prompt: "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
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/images/generations")!
let payload: [String: Any] = [
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
]
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 str = String(data: data, encoding: .utf8) { print(str) }
}
task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var payload = @"{
""model"": ""wan2.7-image-pro"",
""prompt"": ""A flower shop with exquisite windows, beautiful wooden door, flowers on display""
}";
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(
"https://api.apimart.ai/v1/images/generations", content);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
{
"code": "success",
"data": [
{
"task_id": "task_01HX...",
"status": "processing"
}
]
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed. Please check your API key.",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient balance. Please top up your account.",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "Too many requests. Please try again later.",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "Internal server error. Please try again later.",
"type": "server_error"
}
}
curl --request POST \
--url https://api.apimart.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}'
import requests
url = "https://api.apimart.ai/v1/images/generations"
payload = {
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
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/images/generations";
const payload = {
model: "wan2.7-image-pro",
prompt: "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
};
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/images/generations"
payload := map[string]interface{}{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display",
}
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 payload = """
{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.apimart.ai/v1/images/generations"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
System.out.println(client.send(request,
HttpResponse.BodyHandlers.ofString()).body());
}
}
<?php
$url = "https://api.apimart.ai/v1/images/generations";
$payload = [
"model" => "wan2.7-image-pro",
"prompt" => "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
];
$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/images/generations")
payload = {
model: "wan2.7-image-pro",
prompt: "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
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/images/generations")!
let payload: [String: Any] = [
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
]
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 str = String(data: data, encoding: .utf8) { print(str) }
}
task.resume()
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var payload = @"{
""model"": ""wan2.7-image-pro"",
""prompt"": ""A flower shop with exquisite windows, beautiful wooden door, flowers on display""
}";
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(
"https://api.apimart.ai/v1/images/generations", content);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
{
"code": "success",
"data": [
{
"task_id": "task_01HX...",
"status": "processing"
}
]
}
{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "Authentication failed. Please check your API key.",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "Insufficient balance. Please top up your account.",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "Too many requests. Please try again later.",
"type": "rate_limit_error"
}
}
{
"error": {
"code": 500,
"message": "Internal server error. Please try again later.",
"type": "server_error"
}
}
Autorização
string
obrigatório
Todas as requisições exigem autenticação por Bearer Token.Acesse a página de gerenciamento de chaves de API para obter sua chave de API e, em seguida, adicione-a ao cabeçalho da requisição:
Authorization: Bearer YOUR_API_KEY
Modelos disponíveis
| Modelo | Descrição | Resolução máxima (Text-to-Image) | Resolução máxima (Edição / Sequencial) | Preço |
|---|---|---|---|---|
wan2.7-image-pro | Edição profissional, melhores detalhes, suporta 4K | 4K | 2K | ¥0,50 / imagem |
wan2.7-image | Edição padrão, geração mais rápida | 2K | 2K | ¥0,20 / imagem |
A cobrança é feita com base em imagens geradas com sucesso × preço unitário. A entrada não é cobrada. Resolução e proporção não afetam o preço. Requisições com falha não são cobradas.
Corpo da requisição
string
obrigatório
Nome do modelo de geração de imagens.
wan2.7-image-pro— Edição profissional, até 4K para text-to-imagewan2.7-image— Edição padrão, mais rápida, até 2K
boolean
padrão:"false"
Define se o conteúdo deve ser moderado antes do envio da tarefa de imagem.
true: verificar prompts e imagens de entrada comomni-moderation-latestfalseou omitido: não enviar solicitação de moderação, sem custo nem latência adicionais de moderação (padrão)
string
Descrição textual para a geração da imagem, até 5000 caracteres.
- Text-to-image (sem
image_urls): obrigatório - Edição de imagens (com
image_urls): opcional, mas recomendado
"A flower shop with exquisite windows, beautiful wooden door, flowers on display"array<string>
Array de URLs de imagens de entrada para cenários de edição e referência multi-imagem.Fornecer esse campo altera a requisição para o modo de edição de imagens.Formatos suportados: URLs HTTP/HTTPS; Base64
data:image/...;base64,...Restrições: até 9 imagens; JPEG / PNG / WEBP / BMP; 240–8000 px, proporção 1:8 ~ 8:1; ≤ 20MB por imagemA proporção de saída corresponde automaticamente à última imagem de entrada. O modo de edição suporta no máximo 2K — 4K não está disponível.
integer
padrão:"1"
Número de imagens a serem geradas.
- Modo padrão: 1–4 (padrão 1)
- Modo sequencial (
enable_sequential: true): 1–12 (padrão 1)
Cobrado por imagem gerada com sucesso. Cobrança antecipada com base em
n.string
Resolução ou proporção de saída. Suporta três formatos:① Palavra-chave de resolução (recomendado):
1K / 2K (padrão) / 4K (somente text-to-image com wan2.7-image-pro)② Proporção: 1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3 (padrão para o nível 2K)③ Dimensões em pixels: 1024x1024 ou 1024*1024string
Palavra-chave do nível de resolução:
1K / 2K / 4K. Pode ser combinado com size (proporção).| Modelo | Cenário | Níveis suportados | Faixa de pixels |
|---|---|---|---|
wan2.7-image-pro | Text-to-image (não sequencial) | 1K / 2K / 4K | 768×768 ~ 4096×4096 |
wan2.7-image-pro | Edição / sequencial | 1K / 2K | 768×768 ~ 2048×2048 |
wan2.7-image | Todos os cenários | 1K / 2K | 768×768 ~ 2048×2048 |
string
Prompt negativo descrevendo elementos a evitar. Exemplo:
"blurry, distorted, low quality"boolean
padrão:"false"
Define se uma marca d’água “AI Generated” deve ser adicionada no canto inferior direito.
integer
Semente aleatória, intervalo 0–2147483647. A mesma semente com parâmetros idênticos produz resultados visualmente consistentes.
boolean
padrão:"true"
Ativa o modo de raciocínio aprimorado para melhorar a qualidade da imagem ao custo de um tempo de geração mais longo.
Só tem efeito quando o modo sequencial está desativado e nenhuma imagem de entrada é fornecida.
boolean
padrão:"false"
Ativa o modo de geração sequencial de imagens — gera múltiplas imagens tematicamente coerentes em uma única requisição. Ideal para storyboards e séries.
- Quando ativado, o
nmáximo é 12 thinking_modeecolor_palettesão ignorados no modo sequencial- O
wan2.7-image-prosuporta até 2K no modo sequencial (4K não é suportado)
array
Caixas delimitadoras (bounding boxes) para edição interativa — especifica regiões exatas para editar ou inserir conteúdo.Estrutura:
[[[x1, y1, x2, y2], ...], ...]- O comprimento do array externo deve ser igual ao comprimento de
image_urls - Passe
[]para imagens sem caixa delimitadora - Máximo de 2 caixas por imagem; as coordenadas são valores absolutos em pixels, com origem (0,0) no canto superior esquerdo
[[], [[989, 515, 1138, 681]]]array<object>
Tema de cores personalizado. Somente no modo padrão (não no modo sequencial).
- 3–10 entradas (8 recomendadas); cada entrada exige
hexeratio - A soma de todos os valores de
ratiodeve ser exatamente100.00%
[
{ "hex": "#C2D1E6", "ratio": "23.51%" },
{ "hex": "#636574", "ratio": "76.49%" }
]
Resposta
string
Status da resposta. Retorna
"success" em caso de sucesso.array
Exemplos
Texto para imagem (mínimo)
{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
Texto para imagem (com resolução)
{
"model": "wan2.7-image-pro",
"prompt": "Summer beach, blue sky and white clouds, 4K ultra HD",
"size": "4K",
"thinking_mode": true
}
Texto para imagem (paleta de cores personalizada)
{
"model": "wan2.7-image-pro",
"prompt": "Minimalist modern living room",
"size": "2K",
"color_palette": [
{ "hex": "#C2D1E6", "ratio": "23.51%" },
{ "hex": "#CDD8E9", "ratio": "20.13%" },
{ "hex": "#B5C8DB", "ratio": "15.88%" },
{ "hex": "#C0B5B4", "ratio": "13.27%" },
{ "hex": "#DAE0EC", "ratio": "10.11%" },
{ "hex": "#636574", "ratio": "8.93%" },
{ "hex": "#CACAD2", "ratio": "5.55%" },
{ "hex": "#CBD4E4", "ratio": "2.62%" }
]
}
Geração sequencial de imagens
{
"model": "wan2.7-image-pro",
"prompt": "Cinematic series: the same stray orange cat, consistent features. First: under cherry blossoms in spring. Second: old street shade in summer. Third: fallen leaves in autumn. Fourth: snow footprints in winter.",
"enable_sequential": true,
"n": 4,
"size": "2K"
}
Edição de imagem única
{
"model": "wan2.7-image",
"prompt": "Replace the background with a sunset scene, warm color tones",
"image_urls": ["https://example.com/portrait.jpg"],
"size": "2K"
}
Referência multi-imagem / Fusão de elementos
{
"model": "wan2.7-image-pro",
"prompt": "Apply the graffiti from image 2 onto the car in image 1",
"image_urls": [
"https://example.com/car.webp",
"https://example.com/paint.webp"
],
"size": "2K"
}
Edição interativa (Bounding Box)
bbox_list corresponde a image_urls na proporção 1 para 1. Passe [] para imagens sem seleção.
{
"model": "wan2.7-image-pro",
"prompt": "Place the alarm clock from image 1 into the selected area of image 2, blending naturally",
"image_urls": [
"https://example.com/clock.webp",
"https://example.com/desk.webp"
],
"bbox_list": [
[],
[[989, 515, 1138, 681]]
],
"size": "2K"
}
Consulta de resultadosA geração de imagens é assíncrona. Consulte o endpoint Status da Tarefa usando o
task_id retornado até que status == completed.