Skip to content

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 ​

OperationEndpointMode
Image generationPOST /v1/images/generationsSync
Image generation taskPOST /v1/async/images/generationsAsync
Image editingPOST /v1/images/editsSync
Image editing taskPOST /v1/async/images/editsAsync

Model ids ​

Model idBest for
wan2.7-imageStandard Wan image generation and editing
wan2.7-image-proHigher-cost Wan image output

Pricing ​

Model idCredits / image
wan2.7-image3
wan2.7-image-pro7

Request fields ​

Send the common fields at the top level. Put the model-specific controls listed below inside providerOptions.

FieldTypeRequiredDescription
modelstringYeswan2.7-image, wan2.7-image-pro. Case-sensitive model ID.
promptstringYesDescribe the subject, composition, style, and requested edits. Pixapi keeps the first 2,000 characters; provide a non-empty prompt for both generation and editing.
nintegerNoDefault 1. Standard mode 1–4; sequential mode 1–9 on Pixapi (maximum 12).
sizestringNoUse pixel dimensions WIDTHxHEIGHT, for example 1024x1024.
imagestring / string[]For editsPublic 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.
providerOptionsobjectNoModel-specific options; see the table below.

providerOptions ​

All fields in this table are nested inside providerOptions, not alongside model.

FieldTypeDescription
nsfw_checkbooleanOptional prompt/image moderation; default false.
negative_promptstringDescribe content to exclude.
watermarkbooleanAdd a visible AI watermark. Default false.
seedintegerRandom seed, 0–2147483647; omitted means random. The same seed does not guarantee identical output.
thinking_modebooleanDefault true; only effective for text-to-image without sequential mode.
enable_sequentialbooleanDefault false. Generate a coherent image series; disables thinking_mode and color_palette, and caps Pro output at 2K.
bbox_listarrayOne array per input image; up to two [x1,y1,x2,y2] pixel boxes per image. Use [] for an image without a region.
color_paletteobject[]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.