Skip to content
Open CastalyConsole

Image

wan2.7-image-pro API

Call wan2.7-image-pro through Modelflare with the exact model ID shown on this page.

Use the exact model ID wan2.7-image-pro. The model field must match this page exactly.

Ink-wash poster: layered misty mountains above a lone boat on a still river.

Sample outputwan2.7-image-proPOST /v1/images/generations

Parameters: size=2Kn=1

Prompt: Modern poster in Chinese ink-wash style: layered misty mountains, a lone wooden boat on a still river, a single red seal-like accent, generous negative space, elegant and minimal, no text.

Request that produced this sample
{
"model": "wan2.7-image-pro",
"prompt": "Modern poster in Chinese ink-wash style: layered misty mountains, a lone wooden boat on a still river, a single red seal-like accent, generous negative space, elegant and minimal, no text.",
"n": 1,
"size": "2K"
}

Use a Modelflare API key with https://modelflare.dev/v1. The gateway entry point is POST /v1/images/generations.

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
Terminal windowbash
curl https://modelflare.dev/v1/images/generations \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-pro",
"prompt": "A white cat runs through a neon-lit street in the rain",
"size": "1024x1024", "n": 1
}'

OpenAI-compatible image models use prompt, n, size, and quality; use editing only when the official page documents it.

Wan2.7 Image / Pro uses the synchronous Images API. Use the flat OpenAI-compatible shape for simple calls; use input.messages plus parameters for multi-image, region editing, and sequential generation. Pro text-to-image supports up to 4K outside sequential mode; the standard model supports up to 2K.

Field Required Notes
model Yes wan2.7-image-pro
prompt Yes Generation or editing instruction
image No Single image URL/Base64; use input.messages for up to 9 images
input.messages No Nested messages for multi-image, region editing, and sequential generation
size No 1K / 2K; Pro non-sequential text-to-image also supports 4K
n No 1–4 for ordinary generation; 1–12 for sequential generation; billed per successful image
thinking_mode No Thinking mode when no image is supplied
watermark No Whether to add a watermark
parameters.prompt_extend No Prompt expansion, default true;
parameters.bbox_list No Interactive editing region boxes
parameters.enable_sequential No Enable sequential generation
parameters.color_palette No 3–10 HEX colors with percentages totaling 100%

Use the flat shape for simple calls; use input.messages and parameters for multi-image, region editing, and sequential generation. Up to 9 input images are supported, each under 20 MB, 240–8,000 px per edge, with a 1:8 to 8:1 aspect ratio. Ordinary output count is 1–4 and sequential output count is 1–12; Pro text-to-image supports 4K outside sequential mode, while other combinations top out at 2K.

Wan2.7 Image supports both a flat shape and the nested input.messages/parameters shape; use the nested shape for multi-image, region editing, and sequential generation.

Multi-image editing

Terminal windowbash
curl https://modelflare.dev/v1/images/generations \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-pro",
"input": {"messages": [{"role": "user", "content": [
{"image": "https://example.com/person.png"},
{"image": "https://example.com/background.png"},
{"text": "将图 1 中的人物放入图 2 的场景中"}
]}], "parameters": {"size": "2K", "n": 1, "prompt_extend": true}}
}'

Interactive region editing

Terminal windowbash
curl https://modelflare.dev/v1/images/generations \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-pro", "input": {"messages": [{"role": "user", "content": [
{"image": "https://example.com/room.png"},
{"text": "将选中区域的花瓶替换成红玫瑰"}
]}], "parameters": {"size": "2K", "n": 1, "bbox_list": [[[420, 280, 760, 720]]]}}
}'

Sequential image group

Terminal windowbash
curl https://modelflare.dev/v1/images/generations \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-pro", "input": {"messages": [{"role": "user", "content": [{"text": "生成四张角色一致的季节分镜"}]}]},
"parameters": {"size": "2K", "enable_sequential": true, "n": 4, "watermark": false}
}'

Invalid model parameters return a 4xx with a request ID; use the response fields and error message defined by the selected model contract.

This page covers Modelflare model generation and editing calls. Search or map enrichment, voice management, and element-library management are resource APIs outside this public model-call surface and are not required request fields.

This model uses per-call billing. See the model pricing page for the current customer price, reference list price, and complete specification.

Model ID Difference
wan2.7-image-pro The model documented on this page.
Media contract · v1

Contract ID: media.wan2-7-image-pro.v1Adapter: image.wan.v1@v1Fingerprint: 08e8d3ebc25a5736d78ee6137926a3e20722a57c491d12338a09ac1bf95b1ada

Official source: Alibaba Cloud Model Studio

Contract parameters

Intent fieldControlOptions
sizeselect1K / 2K / 4K
nnumber—

Supported capability

  • allowed_values · size · 1K, 2K, 4K
  • max_assets · reference_asset_ids · 9

Structured request example

text

Intent

{
  "n": 1,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "size": "1K"
}

Provider request

{
  "model": "wan2.7-image-pro",
  "n": 1,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "size": "1K"
}

reference

Intent

{
  "n": 1,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "size": "1K"
}

Provider request

{
  "image": "https://example.com/reference.png",
  "model": "wan2.7-image-pro",
  "n": 1,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "size": "1K"
}