Wan 2.7 generates 720p or 1080p video from text.
wan2.7-t2vText-to-video: Only provide a prompt.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name to be called, fill in the name from the model gallery. |
duration | integer | Yes | Video duration (seconds). ⚠️ Must be placed at the **top level**, and must match the actual value in input/parameters — values placed inside nested structures will not be read. |
resolution | string | Yes | Resolution, take 480p / 720p / 1080p. ⚠️ Must also be placed at the **top level**, and must match parameters.size. |
input | object | Yes | Generation inputs in the model’s native format. See the input.* fields below for the required inputs for each use case. |
parameters | object | No | Pass the generation parameters in their native format. Common pixel sizes for size: 480p → 832 × 480; 720p → 1280 × 720; 1080p → 1920 × 1080. |
aspect_ratio | string | No | Aspect ratio, e.g. 16:9 / 9:16 |
wait | boolean | No | true = block until result (up to 60 seconds), false/omitted = immediately return task_id and then poll yourself (recommended). |
callback_url | string | No | Callback URL after task completion. |
idempotency_key | string | No | Idempotency key, repeated submissions with the same key return the same task and do not incur additional charges. |
input.prompt | string | Yes | Prompt, describing the scene to be generated. |
input.function | string | No | input.function can be omitted — when omitted, automatically inferred from model name; when provided, uses the provided value. |
parameters.size | string | No | Pixel dimensions, e.g. 1280*720. Must be consistent with the top-level resolution. |
curl https://api.router.ai/v1/videos/generations \
-H "Authorization: Bearer sk-你的令牌" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-t2v",
"duration": 5,
"resolution": "720p",
"input": {
"prompt": "一只橘猫在窗台上伸懒腰,阳光洒进来"
},
"parameters": {"size": "1280*720"}
}'