Skip to main content
POST
Image generation / editing

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Model ID. wan2.7-image-pro text-to-image supports 4K output; wan2.7-image generates faster.

Available options:
wan2.7-image-pro,
wan2.7-image
Example:

"wan2.7-image-pro"

prompt
string
required

Image description. Chinese and English are supported. Maximum 5000 characters.

Example:

"A flower shop with delicate windows, a beautiful wooden door, and flowers on display"

image
string

Input image for editing — URL (HTTP/HTTPS) or Base64 data URI(data:{MIME};base64,{data})。 Supported formats: JPEG, JPG, PNG (no alpha channel), BMP, WEBP. Max 20 MB, width/height 240–8000 px, aspect ratio 1:8–8:1. Up to 9 images.

Example:

"https://example.com/input.jpg"

n
integer
default:1

Number of images to generate.

  • Sequential mode off (enable_sequential: "false): 1–4, default 1."
  • Sequential mode on (enable_sequential: "true): 1–12, default" 12. The actual count is decided by the model.
Required range: 1 <= x <= 12
Example:

1

size
string

Output resolution. Two formats are supported (do not mix them):

  • Presets: 1K (1024×1024), 2K (2048×2048, default), 4K (4096×4096, only wan2.7-image-pro text-to-image).
  • Custom pixels: {width}x{height} — text-to-image total pixels 768×768–4096×4096; other modes up to 2048×2048, aspect ratio 1:8–8:1.
Example:

"2K"

enable_sequential
boolean
default:false

Enable sequential image output. When true, n is the maximum count and the model decides the actual number.

thinking_mode
boolean
default:true

Enable thinking mode to improve reasoning and image quality. Only takes effect when there is no image input and sequential mode is off.

watermark
boolean
default:false

Whether to add a watermark to the bottom-right corner of the generated image.

seed
integer

Random seed, range [0, 2147483647]. The same seed yields similar results but does not guarantee an exact match.

Required range: 0 <= x <= 2147483647
response_format
enum<string>
default:url

Return an image URL or Base64 encoding.

Available options:
url,
b64_json
Example:

"url"

Response

Image generated successfully

created
integer

Creation timestamp

Example:

1773803391

data
object[]