Skip to main content
POST

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Body

application/json
model
enum<string>
required

Model name. Available value: wan2.7-image-pro.

Available options:
wan2.7-image-pro
input
object
required
response_format
enum<string>
default:url

Unified response format. Supported values: url or b64_json.

Available options:
url,
b64_json
size
string
default:1K

Controls output image resolution. Supports two modes (do not mix):

Mode 1: Resolution preset (recommended) Supported presets: 1K, 2K (default), 4K.

  • Text-to-image (no input image, non-sequential): supports 1K, 2K, 4K.
  • Other scenarios: supports 1K, 2K.
  • Pixel totals: 1K = 1024×1024, 2K = 2048×2048, 4K = 4096×4096.
  • With input image: output aspect ratio matches the last input image, scaled to the selected resolution.
  • Without input image: output is square.

Mode 2: Custom width×height Format: {width}*{height}, e.g. 1024*768.

  • Text-to-image: total pixels [768×768, 4096×4096], aspect ratio [1:8, 8:1].
  • Other scenarios: total pixels [768×768, 2048×2048], aspect ratio [1:8, 8:1].

Note: actual output dimensions may differ slightly from the specified values.

n
integer

Important: n directly affects cost. Cost = unit price × number of successfully generated images. Confirm the model pricing before calling.

When group mode is disabled, this value represents the number of generated images. Range: 1-4, default: 1.

When group mode is enabled, this value represents the maximum number of generated images. Range: 1-12, default: 12. The actual count is determined by the model and will not exceed n.

Required range: 1 <= x <= 12
watermark
boolean
default:false

Whether to add a watermark. The watermark is positioned at the bottom-right corner with the text 'AI生成'. false (default): no watermark. true: add watermark.

negative_prompt
string

Negative prompt. Describes what should be avoided in the output.

seed
integer
default:0

Random seed. Range [0, 2147483647].

Using the same seed value helps keep generation results relatively stable. If not provided, the algorithm automatically uses a random seed.

Note: the generation process is probabilistic; the same seed does not guarantee identical results every time.

Required range: 0 <= x <= 2147483647
bbox_list
integer[][][]

Interactive editing bounding box regions.

Correspondence: The list length must match the number of input images. If an image does not need editing, pass an empty array [] at the corresponding position.

Coordinate format: [x1, y1, x2, y2] (top-left x, top-left y, bottom-right x, bottom-right y), using absolute pixel coordinates of the original image, with (0,0) at the top-left corner.

Constraint: Maximum 2 bounding boxes per image.

Example: Input 3 images where the 2nd image has no selection, and the 1st has two selections:

Response

Success. Returns the image editing result.

created
integer<int64>

Response generation timestamp.

data
object[]

List of generated image results.

metadata
object

Pass-through raw response metadata from the upstream provider.