Wan & HappyHorse family
Alibaba’s video generation models, six in total, called through the OfoxAI video endpoint POST /v1/videos. Tasks run asynchronously: creating a task returns a task ID, which you then use to query the result.
Choosing a model
All six support text-to-video and image-to-video, and can generate a synchronized audio track (generate_audio defaults to true). adaptive keeps the input image’s aspect ratio.
alibaba/wan-3.0-prime30 s, 480p to 1080palibaba/wan-3.030 s, 480p to 1080palibaba/wan-2.72 to 15 salibaba/wan-2.6No video referencealibaba/happyhorse-1.03 to 15 salibaba/happyhorse-1.1No video referenceThe table above matches the video_attributes returned by the Models API; if model capabilities change, the API response takes precedence. Billing is per second, and the actual charge is usage.video_cost in the task result. For prices, see the model page .
Pass resolution explicitly. If omitted, all six default to 1080p, and cost is calculated by resolution tier. For previews or vertical social media videos, 720p or 480p is recommended.
Examples
The examples below show only the request that creates the task. For the full flow of querying status and downloading the result after creation, see Video API · Quickstart.
Text to video
Send only prompt.
curl -X POST https://api.ofox.ai/v1/videos \
-H "Authorization: Bearer $OFOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "alibaba/wan-3.0",
"prompt": "A water town in southern China at dawn, a small boat gliding slowly under a stone bridge",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}'frame_imagesandinput_referencescannot be sent together; sending both returns400 references_conflict.- Pass
"generate_audio": falsewhen you do not need an audio track. - For the full field structure, see Create video task.
Differences from other families
- Cannot be cancelled: once a task has been submitted upstream,
DELETE /v1/videos/{id}returns400 cancel_not_supported, and the task continues generating and is billed. Confirm your parameters before submitting. - Video URLs: in our tests, completed tasks return only
unsigned_urls(temporary Alibaba Cloud OSS addresses), with nomirror_urls. Temporary addresses may expire after 24 hours, so download and save them promptly. - Shorter durations: Wan goes down to 2 seconds and HappyHorse to 3 seconds; the minimum for other families is 4 seconds.
Remove watermark
Parameters specific to Alibaba models are passed through provider.options.dashscope:
{
"model": "alibaba/wan-3.0",
"prompt": "...",
"duration": 5,
"resolution": "720p",
"provider": {
"options": { "dashscope": { "watermark": false } }
}
}provider.options is passed only to the matching provider; other providers do not receive it. For full details, see Video provider routing.
Common errors
For the full list of error codes, see Video API error codes.
Official docs
FAQ
What is the maximum length Wan can generate?
Wan 3.0 and Wan 3.0 Prime generate 2 to 30 seconds per task; Wan 2.6 and Wan 2.7 generate 2 to 15 seconds; HappyHorse 1.0 and 1.1 generate 3 to 15 seconds. Values outside the range return 400 duration out of range.
How do I remove the watermark from Wan videos?
Add provider.options.dashscope.watermark: false to the request. provider.options is passed only to the Alibaba Cloud Model Studio (dashscope) provider.
Can Wan video tasks be cancelled?
No. Tasks for Alibaba models cannot be interrupted once submitted upstream; DELETE returns 400 cancel_not_supported, and the task continues generating and is billed. Confirm your parameters before submitting.
Wan 2.6 returns mixref2video requests are not supported by this model?
Wan 2.6 and HappyHorse 1.1 do not support using a video as reference. Remove the video_url from input_references, or switch to Wan 2.7, Wan 3.0, or HappyHorse 1.0.
Does Wan support 4:3 or 3:4?
Only Wan 3.0 and Wan 3.0 Prime support 4:3, 3:4, and adaptive. Wan 2.x and HappyHorse support only 16:9, 9:16, and 1:1.
How long is the Wan video URL valid?
Completed tasks return unsigned_urls, which are temporary Alibaba Cloud OSS addresses that may expire after 24 hours, so download and save them promptly.