Docs
All model guides
Alibaba · Image API

Wan 2.7 Image

wan2.7-image

Detailed image generation with strong prompt adherence and multimodal reference input.

POST/v1/images/generations
Output count1–4
Reference imagesUp to 9
Resolution tiers1K · 2K · 4K
Generation

Generate with Wan 2.7 Image

Use ImgRouter's unified request contract and this model ID. The example uses recommended defaults from the route's current parameter guide.

cURL
curl https://api.imgrouter.com/v1/images/generations \
  -H "Authorization: Bearer $IMGROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: wan2.7-image-generate-001" \
  -d '{
  "model": "wan2.7-image",
  "prompt": "Editorial product photograph, precise materials, soft studio light",
  "size": "16:9",
  "resolution": "2K",
  "n": 1
}'

Request body

modelstring · requiredUse wan2.7-image.
promptstring · requiredGeneration or editing instruction between 1 and 5,000 characters.
sizestringSupported values: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3.
resolutionstringSupported values: 1K, 2K, 4K.
ninteger · 1–4Number of output images. Defaults to 1 and cannot exceed 4.
reference_imagesstring[] · max 9Public HTTPS source images. Send this field to the edit endpoint.
Controls

Supported options

Aspect ratio or size

1:14:33:416:99:163:22:3

Resolution

1K2K4K

Output format

url

Route notes

The standard route supports up to 2K; 4K requires a Pro text-to-image route.

Editing mode follows the final reference image aspect ratio and supports up to 2K.

seed and negative_prompt are available for repeatability and exclusion control.

Reference workflow

Edit with reference images

Send public HTTPS source images with the same core controls. This route accepts up to 9 reference images.

POST/v1/images/edits
cURL
curl https://api.imgrouter.com/v1/images/edits \
  -H "Authorization: Bearer $IMGROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: wan2.7-image-edit-001" \
  -d '{
  "model": "wan2.7-image",
  "prompt": "Preserve the subject and composition. Change the scene to soft blue hour.",
  "size": "16:9",
  "resolution": "2K",
  "n": 1,
  "reference_images": [
    "https://example.com/reference.jpg"
  ]
}'

Describe both the intended change and the details that must remain consistent. Stable source URLs produce the most reliable edit requests.

Response

Read the completed output

Successful requests return completed image URLs and a request ID. Store the assets you need permanently; routed output URLs may expire.

200 · application/json
{
  "id": "req_01K4…",
  "object": "image.generation",
  "created": 1787424152,
  "data": [
    { "url": "https://static.imgrouter.com/images/req_01K4.webp" }
  ],
  "usage": { "images": 1 }
}

Use GET /v1/requests/{request_id} for reconciliation and GET /v1/balance for the authenticated key's current Credit position.