Skip to content
Open CastalyConsole

Image

wan2.7-image API

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

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

Hotel corridor carpet peeling up into curling printed ribbons behind a woman in a crimson satin coat.

Sample outputwan2.7-imagePOST /v1/images/generations

Parameters: size=1536x1024n=1

Prompt: A long hotel corridor with a heavily patterned carpet, doors receding into the distance. A woman in a floor-length crimson satin coat has just taken one step forward. Behind her heel the carpet pattern has started to peel up off the floor, lifting away as loose ribbons of colour that keep the print exactly and curl into the air down the length of the hall. One hard green exit sign above, warm wall sconces along the corridor. Wide low camera on the floor line, deep perspective, real cloth weight, film grain, slight vignette, no text.

Request that produced this sample
{
"model": "wan2.7-image",
"prompt": "A long hotel corridor with a heavily patterned carpet, doors receding into the distance. A woman in a floor-length crimson satin coat has just taken one step forward. Behind her heel the carpet pattern has started to peel up off the floor, lifting away as loose ribbons of colour that keep the print exactly and curl into the air down the length of the hall. One hard green exit sign above, warm wall sconces along the corridor. Wide low camera on the floor line, deep perspective, real cloth weight, film grain, slight vignette, no text.",
"n": 1,
"size": "1536x1024"
}

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",
"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
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",
"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", "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", "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 The model documented on this page.
Media contract · v1

Contract ID: media.wan2-7-image.v1Adapter: image.wan.v1@v1Fingerprint: 37190bffce54c9ca3798ec5be9345928603c19e05aa2283900c9108169f02bc7

Official source: Alibaba Cloud Model Studio

Contract parameters

Intent fieldControlOptions
sizeselect1K / 2K
nnumber—

Supported capability

  • allowed_values · size · 1K, 2K
  • 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",
  "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",
  "n": 1,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "size": "1K"
}