wan2.7
wan2.7 (Alibaba) covers T2V / I2V / continuation style async video.
Auth: Authorization: Bearer sk-… from the Console. Use this model id exactly in the model field.
Only parameters relevant to wan2.7 are listed below.
| Field | Type | Req | Description |
|---|---|---|---|
| model | string | ✓ | wan2.7 — unified T2V / I2V / video continuation entry |
| prompt | string | — | Required for text-to-video (max 5000 chars). Optional but recommended for I2V. |
| image_urls | string[] | — | I2V: 1 image = first frame; 2 images = first + last frame. Mutually exclusive with image_with_roles. Cannot combine with video_urls. |
| image_with_roles | array<object> | — | [{url, role: first_frame|last_frame}] — alternative to image_urls |
| video_urls | string[] | — | Video continuation (first URL used). Cannot combine with image_urls/first_frame/audio_url. |
| resolution | string | — | 720P | 1080P (default). Billing: $0.072/s · $0.125/s |
| duration | integer | — | 2–15 seconds. Alias: seconds. Default 5. |
| size | string | — | T2V only: 16:9 (default) | 9:16 | 1:1 | 4:3 | 3:4. Alias: aspect_ratio. Ignored when image/video input present. |
| audio_url | string | — | Custom audio URL (wav/mp3, 2–30s). T2V = BGM; I2V = motion driver. Cannot combine with video_urls. |
| negative_prompt | string | — | Content to avoid (max 500 chars) |
| prompt_extend | boolean | — | Smart prompt rewrite (default true) |
| watermark | boolean | — | Add "AI生成" watermark (default false) |
| seed | integer | — | Random seed (≥0) |
| image / image_url / images | string | array | — | Gateway maps to image_urls |
| Field | Type | Req | Description |
|---|---|---|---|
| Mode routing | — | — | No image/video → text-to-video. image_urls/image_with_roles → I2V. video_urls → continuation. |
| Async flow | — | — | POST /v1/videos → poll GET /v1/videos/{id} → GET /v1/videos/{id}/content when completed. |
curl https://api.lumeapi.site/v1/videos \
-H "Authorization: Bearer $LUMEAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7",
"prompt": "City traffic timelapse at night",
"resolution": "1080P",
"duration": 5,
"size": "16:9"
}'All requests go to https://api.lumeapi.site/v1 with Authorization: Bearer sk-…
(1) POST /v1/videos → save id from response. (2) GET /v1/videos/{id} every 5–15s until status is completed or failed. (3) On completed, GET /v1/videos/{id}/content to download MP4.
Poll and download with the id returned by POST /v1/videos (e.g. task_Fk6QrnX6…). This is the only task id your client needs.
Poll every 5–15 seconds with back-off. Typical completion: 30s–5min depending on model. Stop after 15–30 minutes if still not completed.
When status=failed, read error.message. Do not call /content. Submit a new POST /v1/videos to retry.
Balance is debited when POST /v1/videos returns 200. Poll until completed or failed before treating the job as successful.
| Status | Meaning | Action |
|---|---|---|
| queued | Job accepted, waiting to start | Keep polling GET /v1/videos/{id} |
| in_progress | Video is being generated | Keep polling; progress may increase |
| completed | Ready to download | GET /v1/videos/{id}/content |
| failed | Generation failed | Read error.message; submit a new job to retry |