Skip to main content
Skip to main content

Wan 2.7 Video

Wan 2.7 Video is Alibaba's April 2026 video creation model: text, image, video, and audio inputs in one system, with generation and editing treated as the same workflow - the "video that can be edited like a document" release.

  • 99.9% SLA
  • Official Discounts
  • Pay-as-you-go
  • Fast & Low Latency
Brand:AlibabaPrice: From $0.073 / sec

API DOCS / SIMPLIFIED

Integrate this model with one task-based API flow

Wan 2.7 Video is Alibaba's April 2026 video creation model: text, image, video, and audio inputs in one system, with generation and editing treated as the same workflow - the "video that can be edited like a document" release. The examples below are rendered from Wan 2.7 Video, the current gateway base URL, and the selected public model contract using the active example "Change the motorcycle's color to blue.".

Input mode
X-API-Key on every request
POST /api/v1/openapi/task
GET /api/v1/openapi/task/status/{task_id}
Async task workflow

Single code window

Switch language once. Each example already includes both the task creation request and the task status polling request.

Unified Example
API_KEY="<API_KEY>"
BASE_URL="https://api.musespark.ai"
REQUEST_BODY='{
  "model_id": "wan-2.7-videox",
  "parameters": {
    "prompt": "Change the motorcycle'"'"'s color to blue.",
    "mode": "reference",
    "resolution": "1080P",
    "duration": 5,
    "aspect_ratio": "16:9",
    "batch_size": 1
  }
}'

CREATE_RESPONSE=$(curl --request POST "$BASE_URL/api/v1/openapi/task" \
  --header "X-API-Key: $API_KEY" \
  --header "Content-Type: application/json" \
  --data-raw "$REQUEST_BODY")

TASK_ID="<TASK_ID_FROM_CREATE_RESPONSE>"

curl "$BASE_URL/api/v1/openapi/task/status/$TASK_ID" \
  --header "X-API-Key: $API_KEY"

Request and response JSON become the documentation

Keep the payload and task status envelope as the primary contract. Field descriptions, optionality, and enum hints now live inline as JSON comments.

Request Body

Caller payload

This is the request envelope accepted by the public gateway for the selected model contract.

Field comments and caller parameters come directly from the current item's model schema.
{
"model_id": "wan-2.7-videox",// target model
"parameters": {
"prompt": "Change the motorcycle's color to blue.",// describe the video to generate or the edit to apply · min 1 · max 5000 · min length 1 · max length 5000
"mode": "reference",// use Reference generation for text, image, reference media and first/last frames; use Edit mode for video editing · enum: Reference generation
"resolution": "1080P",// output video resolution for generate mode · enum: 720P | 1080P
"duration": 5,// output duration in seconds: 2-15 for generation without a reference video; 2-10 for video reference generation and video editing · min 2 · max 15
"aspect_ratio": "16:9",// output aspect ratio for text-to-video, reference-video generation and editing. Image-to-video preserves the input image aspect ratio; omit this control when image_urls is provided in reference mode · enum: 16:9 | 9:16 | 1:1 | 4:3 | 3:4
"batch_size": 1// standard quantity control field. The allowed range for this item is 1-4 · min 1 · max 4
}
}
Response Body

Gateway response

This is the task status response you will query with task_id until the task reaches a terminal state.

Poll every 2-5 seconds and stop once status becomes completed, failed, cancelled.
{
"code": 200,// 200 on success
"msg": "success",
"data": {
"task_id": "task_01HQX8N2QJ0YQ8Q0T7G6N4V6K2",// use for status polling
"status": "completed",// enum: queued | running | completed | failed | cancelled
"progress": 100,// 0-100 if available
"completed_at": 1760000000,// unix timestamp
"expires_at": 1760001800,// unix timestamp
"result": {
"output_urls": [// generated files
"https://cdn.example.com/output.png"
]
}
}
}