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
Génération et édition d'images wan2.7
- Série d’images Wan2.7 : prend en charge texte-vers-image, édition d’image, édition interactive, génération séquentielle et référence multi-images
- Mode de traitement asynchrone — soumettez une tâche et interrogez les résultats à l’aide du task_id retourné
- Prend en charge les résolutions 1K / 2K / 4K ; wan2.7-image-pro prend en charge jusqu’à 4K pour le texte-vers-image
- La facturation est basée sur le nombre d’images générées avec succès, quelles que soient la résolution ou le rapport d’aspect
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"
}
}
Autorisations
string
requis
Toutes les requêtes nécessitent une authentification Bearer Token.Visitez la page de gestion des clés API pour obtenir votre clé API, puis ajoutez-la à l’en-tête de la requête :
Authorization: Bearer YOUR_API_KEY
Modèles disponibles
| Modèle | Description | Résolution max (texte-vers-image) | Résolution max (édition / séquentielle) | Prix |
|---|---|---|---|---|
wan2.7-image-pro | Édition Professional, meilleurs détails, prend en charge 4K | 4K | 2K | ¥0,50 / image |
wan2.7-image | Édition Standard, génération plus rapide | 2K | 2K | ¥0,20 / image |
La facturation est basée sur images générées avec succès × prix unitaire. L’entrée n’est pas facturée. La résolution et le rapport d’aspect n’affectent pas le prix. Les requêtes échouées ne sont pas facturées.
Body
string
requis
Nom du modèle de génération d’images.
wan2.7-image-pro— édition Professional, jusqu’à 4K pour le texte-vers-imagewan2.7-image— édition Standard, plus rapide, jusqu’à 2K
boolean
défaut:"false"
Indique s’il faut modérer le contenu avant d’envoyer la tâche d’image.
true: vérifier les prompts et les images d’entrée avecomni-moderation-latestfalseou omis : ne pas envoyer de requête de modération, sans coût ni latence de modération supplémentaires (par défaut)
string
Description textuelle pour la génération d’images, jusqu’à 5000 caractères.
- Texte-vers-image (sans
image_urls) : obligatoire - Édition d’image (avec
image_urls) : facultatif mais recommandé
"A flower shop with exquisite windows, beautiful wooden door, flowers on display"array<string>
Tableau d’URL d’images d’entrée pour les scénarios d’édition et de référence multi-images.Fournir ce champ bascule la requête en mode édition d’image.Formats pris en charge : URL HTTP/HTTPS ;
data:image/...;base64,... Base64Contraintes : jusqu’à 9 images ; JPEG / PNG / WEBP / BMP ; 240–8000 px, rapport d’aspect 1:8 ~ 8:1 ; ≤ 20 Mo par imageLe rapport d’aspect de sortie correspond automatiquement à la dernière image d’entrée. Le mode édition ne prend en charge que jusqu’à 2K — 4K n’est pas disponible.
integer
défaut:"1"
Nombre d’images à générer.
- Mode standard : 1–4 (par défaut 1)
- Mode séquentiel (
enable_sequential: true) : 1–12 (par défaut 1)
Facturé par image générée avec succès. Pré-facturé en fonction de
n.string
Résolution de sortie ou rapport d’aspect. Prend en charge trois formats :① Mot-clé de résolution (recommandé) :
1K / 2K (par défaut) / 4K (texte-vers-image wan2.7-image-pro uniquement)② Rapport d’aspect : 1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 3:2 / 2:3 (par défaut niveau 2K)③ Dimensions en pixels : 1024x1024 ou 1024*1024string
Mot-clé du niveau de résolution :
1K / 2K / 4K. Peut être combiné avec size (rapport d’aspect).| Modèle | Scénario | Niveaux pris en charge | Plage de pixels |
|---|---|---|---|
wan2.7-image-pro | Texte-vers-image (non séquentiel) | 1K / 2K / 4K | 768×768 ~ 4096×4096 |
wan2.7-image-pro | Édition / séquentielle | 1K / 2K | 768×768 ~ 2048×2048 |
wan2.7-image | Tous les scénarios | 1K / 2K | 768×768 ~ 2048×2048 |
string
Prompt négatif décrivant les éléments à éviter. Exemple :
"blurry, distorted, low quality"boolean
défaut:"false"
Indique s’il faut ajouter un filigrane “AI Generated” dans le coin inférieur droit.
integer
Graine aléatoire, plage 0–2147483647. La même graine avec des paramètres identiques produit des résultats visuellement cohérents.
boolean
défaut:"true"
Active le mode de raisonnement amélioré pour améliorer la qualité de l’image au prix d’un temps de génération plus long.
Effectif uniquement lorsque le mode séquentiel est désactivé et qu’aucune entrée d’image n’est fournie.
boolean
défaut:"false"
Active le mode de génération séquentielle d’images — génère plusieurs images thématiquement cohérentes en une seule requête. Idéal pour les storyboards et les séries.
nmaximum est 12 lorsqu’activéthinking_modeetcolor_palettesont ignorés en mode séquentielwan2.7-image-proprend en charge jusqu’à 2K en mode séquentiel (4K non pris en charge)
array
Boîtes englobantes pour l’édition interactive — spécifie les zones exactes à éditer ou dans lesquelles insérer du contenu.Structure :
[[[x1, y1, x2, y2], ...], ...]- La longueur du tableau externe doit être égale à la longueur de
image_urls - Passez
[]pour les images sans boîte englobante - Maximum 2 boîtes par image ; les coordonnées sont des valeurs absolues en pixels, origine (0,0) en haut à gauche
[[], [[989, 515, 1138, 681]]]array<object>
Thème de couleur personnalisé. Mode standard uniquement (pas le mode séquentiel).
- 3–10 entrées (8 recommandées) ; chaque entrée nécessite
hexetratio - La somme de toutes les valeurs de
ratiodoit être exactement égale à100.00%
[
{ "hex": "#C2D1E6", "ratio": "23.51%" },
{ "hex": "#636574", "ratio": "76.49%" }
]
Response
string
Statut de la réponse. Retourne
"success" en cas de succès.array
Exemples
Texte-vers-image (minimal)
{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with exquisite windows, beautiful wooden door, flowers on display"
}
Texte-vers-image (avec résolution)
{
"model": "wan2.7-image-pro",
"prompt": "Summer beach, blue sky and white clouds, 4K ultra HD",
"size": "4K",
"thinking_mode": true
}
Texte-vers-image (palette de couleurs personnalisée)
{
"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%" }
]
}
Génération séquentielle d’images
{
"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"
}
Édition d’une seule image
{
"model": "wan2.7-image",
"prompt": "Replace the background with a sunset scene, warm color tones",
"image_urls": ["https://example.com/portrait.jpg"],
"size": "2K"
}
Référence multi-images / fusion d’éléments
{
"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"
}
Édition interactive (boîte englobante)
bbox_list correspond 1 à 1 à image_urls. Passez [] pour les images sans sélection.
{
"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"
}
Interroger les résultatsLa génération d’images est asynchrone. Interrogez le point de terminaison Statut de tâche à l’aide du
task_id retourné jusqu’à ce que status == completed.