altrouter.ai
Models/Alibaba/Wan 2.7
WN

Alibaba: Wan 2.7

Imagewan-2.7

Alibaba Wan 2.7: image generation and inline editing up to 2K.

API docs
Playgroundwan-2.7
Reference image
Aspect ratio
Resolution
Image count
Seed
Latency7.9 s
24hnow
Specifications
Authoralibaba
ModalityImage
Price$0.030 / image$0.040 / image
Savings25%
Quick start
from openai import OpenAI

client = OpenAI(
    base_url="https://api.altrouter.ai/v1",
    api_key="ar-...",
)

img = client.images.generate(
    model="wan-2.7",
    prompt="a red fox in the snow",
)
print(img.data[0].url)

Same OpenAI-compatible endpoint — just swap base_url and key.

API

OpenAI-compatible image generation endpoint. The result is re-hosted on our CDN and returned as a URL.

POST/v1/images/generations
Body parameters
modelstringrequired"wan-2.7"
The model id.
promptstringrequired
The text description of the image.
imagestringURL or base64
Reference images for editing.
aspect_ratioenum1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 21:9 · 8:1 · 1:8default 1:1
Output aspect ratio.
resolutionenum1K · 2Kdefault 2K
Resolution tier (affects price).
nnumber1–4default 1
How many images to generate (affects price).
seednumber0–2147483647
Seed for reproducibility.
Response
createdinteger
Unix creation time (seconds).
dataarray
Images. Each: url (our CDN), b64_json, revised_prompt.
Example
cURLPythonJSON
curl https://api.altrouter.ai/v1/images/generations \
  -H "Authorization: Bearer ar-..." \
  -H "Content-Type: application/json" \
  -d '{
  "model": "wan-2.7",
  "prompt": "a red fox in the snow",
  "aspect_ratio": "1:1",
  "resolution": "2K"
}'
Errors
400Invalid request.
401Missing or invalid API key.
402Insufficient credits, or the key’s spending cap is exhausted.
404Model not found.
429Rate limit exceeded.
More from Alibaba
Qwen Image
qwen-image
Wan 2.7 Video
wan-2.7-video