Appearance
Wan 2.7 Image
Wan 2.7 Image is Alibaba's Wan image family on Pixapi. Switching from wan2.7-image to wan2.7-image-pro is normally just a change to the model field.
API surface
| Operation | Endpoint | Mode |
|---|---|---|
| Image generation | POST /v1/images/generations | Sync |
| Image generation task | POST /v1/async/images/generations | Async |
| Image editing | POST /v1/images/edits | Sync |
| Image editing task | POST /v1/async/images/edits | Async |
Model ids
| Model id | Best for |
|---|---|
wan2.7-image | Standard Wan image generation and editing |
wan2.7-image-pro | Higher-cost Wan image output |
Pricing
| Model id | Credits / image |
|---|---|
wan2.7-image | 3 |
wan2.7-image-pro | 7 |
Request fields
Send the common fields at the top level. Put the model-specific controls listed below inside providerOptions.
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | wan2.7-image, wan2.7-image-pro. Case-sensitive model ID. |
prompt | string | Yes | Describe the subject, composition, style, and requested edits. Pixapi keeps the first 2,000 characters; provide a non-empty prompt for both generation and editing. |
n | integer | No | Default 1. Standard mode 1–4; sequential mode 1–9 on Pixapi (maximum 12). |
size | string | No | Use pixel dimensions WIDTHxHEIGHT, for example 1024x1024. |
image | string / string[] | For edits | Public HTTP(S) image URL or URL array; required on /images/edits. Pixapi accepts up to 4 references. JPEG/PNG/WebP/BMP; each 240–8000 pixels, ≤ 20 MB. Editing follows the last image ratio and is limited to 2K. |
providerOptions | object | No | Model-specific options; see the table below. |
providerOptions
All fields in this table are nested inside providerOptions, not alongside model.
| Field | Type | Description |
|---|---|---|
nsfw_check | boolean | Optional prompt/image moderation; default false. |
negative_prompt | string | Describe content to exclude. |
watermark | boolean | Add a visible AI watermark. Default false. |
seed | integer | Random seed, 0–2147483647; omitted means random. The same seed does not guarantee identical output. |
thinking_mode | boolean | Default true; only effective for text-to-image without sequential mode. |
enable_sequential | boolean | Default false. Generate a coherent image series; disables thinking_mode and color_palette, and caps Pro output at 2K. |
bbox_list | array | One array per input image; up to two [x1,y1,x2,y2] pixel boxes per image. Use [] for an image without a region. |
color_palette | object[] | 3–10 {hex,ratio} entries; ratios are percentage strings and must total 100.00%. Not effective in sequential mode. |
Input rules
Use size pixels for output dimensions. Pro text-to-image supports up to 4K; standard, editing, and sequential output up to 2K.
Example
bash
curl https://api.pixapi.ai/v1/images/generations \
-H "Authorization: Bearer $PIXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"wan2.7-image","prompt":"A clean editorial product photo on a warm gray background","n":1,"size":"1024x1024"}'py
import os
import requests
response = requests.post(
"https://api.pixapi.ai/v1/images/generations",
headers={
"Authorization": f"Bearer {os.environ['PIXAPI_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "wan2.7-image",
"prompt": "A clean editorial product photo on a warm gray background",
"n": 1,
"size": "1024x1024"
},
)
response.raise_for_status()
print(response.json())js
const response = await fetch('https://api.pixapi.ai/v1/images/generations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PIXAPI_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model": "wan2.7-image",
"prompt": "A clean editorial product photo on a warm gray background",
"n": 1,
"size": "1024x1024"
}),
});
if (!response.ok) {
throw new Error(await response.text());
}
console.log(await response.json());go
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"model": "wan2.7-image",
"prompt": "A clean editorial product photo on a warm gray background",
"n": 1,
"size": "1024x1024"
}`)
req, err := http.NewRequest(
"POST",
"https://api.pixapi.ai/v1/images/generations",
bytes.NewBuffer(body),
)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("PIXAPI_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
result, _ := io.ReadAll(resp.Body)
fmt.Println(string(result))
}Edit an image
json
{
"model": "wan2.7-image",
"prompt": "Replace the background with a minimalist studio set",
"image": "https://example.com/input.png",
"n": 1
}For async requests and task polling, see Async Media Tasks.
For the shared response shape, see the API Reference.
