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.

Required range: 1 <= n <= 12.

Non-sequential mode: range 1-4, default 1. Sequential mode: 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.

thinking_mode
boolean

Whether to enable thinking mode. Default true (enabled). When enabled, the model enhances reasoning to improve output quality, but increases generation time. Only effective when sequential mode is disabled. The gateway maps this to upstream parameters.thinking_mode.

enable_sequential
boolean

Controls generation mode. false (default): normal mode. true: enable sequential (group) image output mode.

color_palette
object[]

Custom color palette. An array of objects containing hex color and ratio. Requires 3-10 colors, recommended 8. Only available when sequential mode is disabled (enable_sequential=false). The gateway maps this to upstream parameters.color_palette.

seed
integer<int64>

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: x >= 0

Response

Success. Returns the image generation 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.