Skip to main content

Aliyun Video Generation

Create a video task using the Alibaba Cloud Model Studio / DashScope native format. This endpoint is only for Aliyun video channels and does not accept the OpenAI/Sora top-level prompt request body.

The current public Aliyun video models are wan2.7-i2v and wan2.6-i2v. The table below only lists official Alibaba Cloud Model Studio / DashScope request-body fields that clients should send.

For the official API reference, see: Bailian API Console (wan2.7-i2v).

Try It

POST/aliyun/v1/videos/generationshttps://api-platform.ope.ai

Endpoints

EndpointAuthPurpose
POST /aliyun/v1/videos/generationsAuthorization: Bearer <api-key>Create an Aliyun video task
GET /aliyun/v1/tasks/{task_id}Authorization: Bearer <api-key>Query Aliyun video task status
GET /aliyun/v1/videos/{task_id}/contentAuthorization: Bearer <api-key>Download the Aliyun video result

Models And Input Rules

ModelRequired inputMain parametersNotes
wan2.7-i2vinput.media
  • parameters.resolution
  • parameters.duration
  • parameters.prompt_extend
  • parameters.watermark
  • parameters.seed
Official newer image-to-video protocol; reference materials go in the media array
wan2.6-i2vinput.img_url
  • parameters.resolution
  • parameters.duration
  • parameters.prompt_extend
  • parameters.shot_type
  • parameters.watermark
  • parameters.seed
Official first-frame image-to-video protocol

Request Body(application/json)

FieldTypeRequiredDescription
modelstringYesAliyun video model ID, for example wan2.7-i2v or wan2.6-i2v
inputobjectYesVideo input
input.promptstringNoText prompt; recommended
input.negative_promptstringNoNegative prompt
input.mediaarrayConditionalOfficial multimodal input for wan2.7-i2v; each item contains type and url
input.img_urlstringConditionalFirst-frame image URL for wan2.6-i2v
input.audio_urlstringNoAudio URL for wan2.6-i2v audio-driving scenarios
parametersobjectNoVideo processing parameters
parameters.resolutionstringNoResolution tier, for example 720P or 1080P
parameters.durationintegerNoDuration in seconds; default and valid values are model-specific
parameters.prompt_extendbooleanNoWhether to enable prompt rewriting
parameters.shot_typestringNoShot type for wan2.6-i2v
parameters.watermarkbooleanNoWhether to add a watermark
parameters.seedintegerNoRandom seed

For wan2.7-i2v, use official input.media[].type values: first_frame, last_frame, driving_audio, and first_clip. Each media item must include a reachable url.

Request Examples

curl -X POST "https://api-platform.ope.ai/aliyun/v1/videos/generations" \
-H "Authorization: Bearer $OPEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-i2v",
"input": {
"prompt": "A kitten running on grass with a cinematic camera move.",
"media": [
{
"type": "first_frame",
"url": "https://example.com/first-frame.png"
}
]
},
"parameters": {
"resolution": "720P",
"duration": 5,
"prompt_extend": true,
"watermark": false
}
}'

Response Example

Successful creation returns an Aliyun task structure. Save output.task_id for status polling and content download.

{
"output": {
"task_status": "PENDING",
"task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
},
"request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}

Error Example

{
"error": {
"message": "only aliyun channel is supported on /aliyun/v1/videos/generations",
"type": "invalid_request_error",
"param": null,
"code": "invalid_request_error"
}
}