wan2.7-i2v
wan2.7-i2v Unified Endpoint Guide
- This page documents parameters for the platform unified endpoint
/v1/videos. - If you want to call Wan models with native parameters, see: Aliyun Format (Videos).
Basic Info
| Item | Description |
|---|---|
| Model Name | wan2.7-i2v |
| Model ID | wan2.7-i2v |
| Model Type | Image-to-video |
| Base URL | https://api-platform.ope.ai |
| Create Task | POST /v1/videos |
| Query Task | GET /v1/videos/{task_id} |
| Download Result | GET /v1/videos/{task_id}/content |
Authentication:
Authorization: Bearer YOUR_API_KEY
You can prepare these env vars in your shell:
BASE_URL="https://api-platform.ope.ai"
API_KEY="YOUR_API_KEY"
For pricing, see: Model Pricing.
1. Unified Endpoint to Aliyun Mapping
wan2.7-i2v uses the unified video endpoint POST /v1/videos. The gateway maps this request to Aliyun video-synthesis async protocol.
| Unified field | Upstream Aliyun field | Notes |
|---|---|---|
model | model | Use wan2.7-i2v |
prompt | input.prompt | Text prompt |
First image_url.url in input_reference.content | input.media[0].url | Auto-mapped as first frame |
| - | input.media[0].type | Gateway sets this to first_frame |
size | parameters.size | Example: 1280x720 |
seconds | parameters.duration | String seconds are converted to integer |
generate_audio | parameters.audio | Optional |
seed | parameters.seed | Optional |
Notes:
- For
wan2.7-i2v, the unified endpoint currently consumes the firstimage_urlas first-frame reference. resolution+ratiois a Seedance-only capability (Volcengine/Gravitex), not for Aliyun video channels.- Top-level
contentis not supported; useinput_reference.content.
2. Create Task (POST /v1/videos)
2.1 Recommended Request Body
{
"model": "wan2.7-i2v",
"prompt": "The character in the image takes two steps forward, with a slight camera push-in and cinematic lighting.",
"size": "1280x720",
"seconds": "5",
"generate_audio": false,
"input_reference": {
"content": [
{
"type": "image_url",
"role": "first_frame",
"image_url": {
"url": "https://example.com/first-frame.png"
}
}
]
}
}
2.2 cURL Example
curl --request POST "$BASE_URL/v1/videos" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "wan2.7-i2v",
"prompt": "The character in the image takes two steps forward, with a slight camera push-in and cinematic lighting.",
"size": "1280x720",
"seconds": "5",
"generate_audio": false,
"input_reference": {
"content": [
{
"type": "image_url",
"role": "first_frame",
"image_url": {
"url": "https://example.com/first-frame.png"
}
}
]
}
}'
Typical response:
{
"id": "0385dc79-5ff8-4d82-bcb6-xxxxxx",
"object": "video",
"status": "QUEUED",
"created_at": 1780021218,
"model": "wan2.7-i2v",
"prompt": "The character in the image takes two steps forward, with a slight camera push-in and cinematic lighting.",
"size": "1280x720",
"seconds": "5"
}
id is the task_id used by query and download APIs.
3. Query Task (GET /v1/videos/{task_id})
curl --request GET "$BASE_URL/v1/videos/TASK_ID_HERE" \
--header "Authorization: Bearer $API_KEY"
Typical response:
{
"id": "0385dc79-5ff8-4d82-bcb6-xxxxxx",
"status": "IN_PROGRESS",
"model": "wan2.7-i2v",
"created_at": 1780021218,
"object": "video",
"prompt": "The character in the image takes two steps forward, with a slight camera push-in and cinematic lighting.",
"size": "1280x720"
}
Common statuses:
QUEUEDIN_PROGRESSSUCCESSFAILURE
4. Download Result (GET /v1/videos/{task_id}/content)
After task status becomes SUCCESS, call the content endpoint to download binary video stream:
curl --request GET "$BASE_URL/v1/videos/TASK_ID_HERE/content" \
--header "Authorization: Bearer $API_KEY" \
--output output.mp4
If the task is not finished, the endpoint returns an error.
5. Minimal Integration Flow
- Create task with one first-frame image (
POST /v1/videos) - Poll task status (
GET /v1/videos/{task_id}) - Download binary video after success (
GET /v1/videos/{task_id}/content)
6. Official References
- Bailian console API doc (
wan2.7-i2v): https://bailian.console.alibabacloud.com/cn-beijing?tab=api#/api/?type=model&url=3025059 - Aliyun help center (I2V general API): https://help.aliyun.com/zh/model-studio/image-to-video-general-api-reference