Alibaba
Wan 2.7 Video
wan2.7-video/text-to-video
Alibaba's WAN series video generation models support text-to-video, image-to-video, and reference-guided video, with multiple reference inputs maintaining character and product consistency across shots.
Try wan2.7-video/text-to-video
Input
Showcases
View all showcasesOutput
videoPricing
wan2.7-video/text-to-video per second
| Specifications | Unit Price |
|---|---|
| 720P | $0.100 |
| 1080P | $0.167 |
Overview
wan2.7-video/text-to-video is a text-to-video model in Alibaba's WAN video series, called through the unified HiAPI.ai interface. Simply input a text prompt to generate a video clip with visuals and an optional audio track. It supports five aspect ratios — 16:9, 9:16, 1:1, 4:3, and 3:4 — with an adjustable duration of 2–15 seconds, a choice of 720P or 1080P resolution, and support for negative prompts, random seeds, and prompt rewriting. It is suited to developers who need to drive short video assets from plain text, for batch content production and creative storyboard previews.
Key Highlights
- Programmable text-to-video parameters — duration, aspect ratio, resolution, and seed are all passed in as API parameters, making scripted batch generation and result reproduction easy.
- Optional audio track and prompt rewriting — a wav/mp3 audio URL can be passed in as the audio track, and prompt rewriting is enabled by default to fill in visual details.
- Negative prompts constrain the visuals — supports negative prompts of up to 500 characters to exclude unwanted elements and reduce the rate of unusable outputs.
Capabilities
Generate video clips by parameter: Generate video from a prompt together with duration (2–15 seconds), aspect ratio, and resolution tier. Output specifications are determined at request time, reducing later cropping and transcoding.
Prompt rewriting and negative constraints: prompt_extend is enabled by default and can expand short descriptions; negative_prompt is passed in separately to exclude specific visual content. Together they improve the controllability of outputs.
Seed reproduction and stable results: The seed parameter supports reproducing or fine-tuning generation results under the same prompt, making it easy to compare the effects of different parameter combinations.
Attached audio and optional watermark removal: An optional audio URL serves as the input for the generated audio track, and the watermark switch controls whether an AI-generated watermark is added, letting you choose the finished form as needed.
Use Cases
- Content teams producing short video assets in bulk — Use scripted prompts to batch-generate 2–15 second clips, producing vertical or horizontal short video assets that can be published directly or edited further.
- Creative storyboarding and previews — Use the same prompt with different seeds to rapidly generate multiple visual versions, producing dynamic preview assets for pitch comparisons and shot design confirmation.
- Social media shorts with music — Generate finished clips with an audio track by combining a prompt with an audio URL, producing short content ready for publishing on social platforms.
Limitations and Selection Advice
A single generation is capped at 15 seconds; longer videos must be generated in segments and stitched together, with narrative continuity depending on post-processing. Currently only text-to-video is supported; if you need to constrain visual consistency with images or reference material, use the image-to-video route in the same series. Resolution tops out at 1080P, so scenarios requiring high-resolution finished videos need to evaluate post-production upscaling options. Prompts are capped at 5000 characters and negative prompts at 500 characters; overly long scripts must be split across requests.
Frequently asked questions
View all FAQs →-
Does Wan 2.7 Image to Video require an input image?
Yes. wan2.7-video/image-to-video is an image-to-video route. The image establishes the subject and opening composition; the prompt directs motion, camera, and environmental change.
-
Which durations and resolutions does Wan 2.7 Image to Video support?
The current HiAPI contract supports 2–15s at 720P or 1080P. Check the page controls and API docs for the current options.
-
How is Wan 2.7 Image to Video billed?
Billing follows output duration and the selected tier. The page follows the global display unit, while the successful task record contains the final charge.
-
How can I improve subject consistency?
Use a clear, unobstructed source with a complete composition. Describe the main action and camera first, then name the appearance, material, and background relationships that must remain stable. Validate a short clip first.
Create a generation task
https://api.hiapi.ai/v1/tasks Headers
AuthorizationstringRequiredAccount API key. Required on every request. Example: Bearer YOUR_HIAPI_API_KEY. Get your API key
Content-TypestringOptionalThe request body is always parsed as JSON; when sent, only application/json (optionally with charset) is accepted — any other value returns 415. Example: application/json.
Idempotency-KeystringOptionalIdempotency key, up to 255 bytes. Retries with the same key from the same account create the task only once; replays return the original taskId.
On network timeouts or client retries, the same key creates the task only once — no double charges (scope: the API key's account). Use a business-unique identifier as the key (e.g. "order-42"); replays return the original taskId, and keys expire 24 hours after the first request. See the Unified Async API overview for the full scenario matrix.
Body
modelstringRequiredCurrent fixed value: wan2.7-video/text-to-video
routestringOptionalCurrent fixed value: default
inputobjectRequired
Business parameters for wan2.7-video/text-to-video and route default — see the parameter table below.
seedintegerOptionalmin 0max 2147483647Random seed for reproducing or fine-tuning generation results; integer, randomly generated by the system if not provided.
ratiostringOptionalDefault: "16:9"Video aspect ratio in the form of a ratio string; defaults to 16:9.
16:99:161:14:33:4promptstringRequiredmaxLength 5000Text prompt for video generation, describing the desired visual content.
durationintegerOptionalDefault: 5min 2max 15Video duration in seconds; integer, defaults to 5.
audio_urlstringOptionalOptional audio URL, supports wav/mp3 formats, duration must be 2 to 30 seconds, file size no more than 15MB.
watermarkbooleanOptionalDefault: falseWhether to add an AI-generated watermark to the generated video; boolean, defaults to false.
resolutionstringOptionalDefault: "1080P"Video resolution tier; the value affects the per-second billing price; defaults to 1080P.
720P1080Pprompt_extendbooleanOptionalDefault: trueWhether to enable prompt rewriting (expansion); boolean, defaults to true.
negative_promptstringOptionalDefault: ""maxLength 500Negative prompt used to exclude unwanted visual content, maximum 500 characters; defaults to an empty string.
callbackobjectOptional
Terminal-state notification config. When omitted, no callback is delivered — poll the task yourself. See the callback note below.
Provide callback.url when creating a task and HiAPI POSTs to your service once the task reaches a terminal state — no polling needed. The callback payload mirrors the task detail structure; signature verification, delivery retries and idempotency are documented on the Unified Async API overview page.
urlstringRequiredRequired when callback is present. A POST is sent to this URL once the task reaches a terminal state; must be a valid http(s) URL.
whenstringOptionalDefault: "final"Only final is supported today — notified on both success and fail.
finalstoragestringOptionalDefault: "temp"Artifact storage tier: temp (default, retained about 7 days) or persistent (long-term, billed by size). Insufficient balance or exceeding the storage cap silently downgrades to temp; the effective tier is shown in the task detail response.
temppersistentRequest examples
# Submit an async task; returns a taskId immediately (no waiting for generation)
curl -X POST "https://api.hiapi.ai/v1/tasks" \
-H "Authorization: Bearer $HIAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-video/text-to-video",
"input": {
"ratio": "16:9",
"prompt": "…",
"duration": 5,
"watermark": false,
"resolution": "1080P",
"prompt_extend": true,
"negative_prompt": ""
}
}' const res = await fetch("https://api.hiapi.ai/v1/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HIAPI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "wan2.7-video/text-to-video",
input: {
"ratio": "16:9",
"prompt": "…",
"duration": 5,
"watermark": false,
"resolution": "1080P",
"prompt_extend": true,
"negative_prompt": ""
}
}),
});
const task = await res.json();
// { code: 200, message: "success", data: { taskId } } import os, requests
res = requests.post(
"https://api.hiapi.ai/v1/tasks",
headers={"Authorization": f"Bearer {os.environ['HIAPI_API_KEY']}"},
json={
"model": "wan2.7-video/text-to-video",
"input": {
"ratio": "16:9",
"prompt": "…",
"duration": 5,
"watermark": False,
"resolution": "1080P",
"prompt_extend": True,
"negative_prompt": ""
}
},
)
print(res.json()) # { code, message, data: { taskId } } 200 OK
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR"
}
} 400 Bad Request
{
"code": 400,
"message": "invalid request",
"data": null,
"error_code": "INVALID_REQUEST"
} Get task detail
https://api.hiapi.ai/v1/tasks/:id Response fields
taskIdstringRequiredTask ID, always prefixed with tk-hiapi-.
modelstringRequiredResolved full model name. Tasks submitted with the route parameter return base@route (e.g. gpt-image-2/text-to-image@ext); otherwise identical to the name passed at creation.
routestringOptionalPresent only when the task was submitted with an explicit route parameter; echoes the submitted value.
statusstringRequiredTask status.
queued Queued, not started yet.
handling Being processed.
archiving Processing finished, artifacts being prepared.
success Terminal: completed, artifacts available (output returned).
fail Terminal: failed (error returned).
After submission, check status: success and fail are terminal, everything else is non-terminal. Poll every 1–3 seconds until terminal. On success, download artifacts from output[].url and transfer them before expireAt; pass storage: "persistent" at creation time when long-term retention is needed.
creatednumberRequiredTask creation time (Unix seconds).
completednumberRequiredUnix seconds when the task reached a terminal state; fixed to 0 while not terminal.
outputarrayOptional
Present only when status == success. Artifact list — always an array; a single task may return multiple types at once (e.g. video + first_frame).
Array [ object ]
Array items
urlstringRequiredArtifact URL, directly downloadable.
typestringRequiredCurrent possible values: video, image, audio, first_frame, last_frame, thumbnail; more may be added later.
expireAtnumberRequiredUnix seconds until which the artifact remains accessible; download or transfer before it expires.
errorobjectOptional
Present only when status == fail.
codestringRequiredBusiness error code.
messagestringRequiredError description.
Response examples
Success
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR",
"model": "happyhorse-1-0",
"status": "success",
"created": 1777282033,
"completed": 1777282099,
"output": [
{
"url": "https://cdn.hiapi.ai/tasks/.../video.mp4",
"type": "video",
"expireAt": 1777886899
}
]
}
} Processing (non-terminal)
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "archiving",
"created": 1777282033,
"completed": 0
}
} Failed
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "fail",
"created": 1777282033,
"completed": 1777282099,
"error": {
"code": "TASK_FAILED",
"message": "task failed"
}
}
} Articles
View all articles →Related Models
View all models →Same Type
-
Kling 4.0 Kuaishou $0.330 /second -
FLUX 3 Video Black Forest Labs $0.090 /second -
Grok Imagine 1.5 Lite xAI $0.029 /second -
Seedance 2.0 ByteDance $0.017 /second -
Kling AI Avatar Kuaishou -- -
Seedance 2.5 ByteDance $0.121 /second -
FLUX 3 Max Black Forest Labs $0.061 /second -
Kling 3.0 Turbo Kuaishou $0.130 /second -
MiniMax H3 MiniMax $0.072 /second -
HappyHorse 1.0 Alibaba $0.168 /second -
Hailuo 2.3 MiniMax $0.270 /video -
Kling 3.0 Kuaishou $0.100 /second
Same Provider
-
HappyHorse 1.0 Alibaba $0.168 /second -
Qwen Audio 3.0 TTS Alibaba $0.030 /1,000 characters -
HappyHorse 1.1 Alibaba $0.160 /second -
Z-Image Alibaba $0.008 /image -
Wan 2.7 Video Alibaba $0.100 /second -
Wan 3.0 Video Alibaba $0.040 /second -
Qwen Image 2.0 Alibaba $0.042 /image -
Wan 2.7 Image Alibaba $0.035 /image -
Qwen Image 3.0 Alibaba $0.036 /image -
Wan 2.6 Flash Alibaba $0.043 /second -
Qwen Image 2.1 Alibaba $0.020 /image