Wan 2.7 Text-to-Video API
/v1/tasks All models are called through the Unified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).
Model summary
| Model name | wan2.7-video/text-to-video |
|---|---|
| Type | Video generation (text-to-video) |
| Endpoint | POST /v1/tasks |
| Pricing | See HiAPI Pricing |
Wan 2.7 Text-to-Video API generates video directly from text and uses resolution plus ratio for quality, framing, and cost control.
Production guidance
- For production, pass callback.url at the top level of the request body so HiAPI can notify your service when the task reaches a terminal state.
- GET /v1/tasks/:id is better for local debugging, low-volume jobs, or fallback reconciliation if a callback is missed.
- Use callback.when=final. Both success and fail are terminal states, so your service should deduplicate by taskId.
- All HiAPI task models use the same API key. Create the key in the dashboard and keep it on your server.
- Pricing depends on model, resolution, duration, and request volume. Use the HiAPI Pricing page as the live source of truth.
- For image and video generation, validate prompts with lower-cost settings before moving final requests to higher specs or longer durations.
Best suited for
Generate landscapes, products, and atmospheric shots directly from a prompt.
promptresolution affects per-second pricing; start with 720P for debugging.
resolutiondurationUse ratio for landscape, portrait, square, 4:3, or 3:4 output.
ratioSome workflows can optionally pass audio_url.
audio_urlRequest parameters
model string required Fixed value wan2.7-video/text-to-video.
input object required Business parameters for the tested text-to-video structure.
prompt string required Video prompt, up to 5000 characters.
negative_prompt string optional Negative prompt, up to 500 characters.
audio_url string optional Optional audio file. The online playground accepts file upload only; the backend can convert it to a URL. wav/mp3, 2-30 seconds, max 15MB.
resolution enum optional Output resolution tier. This affects per-second pricing.
ratio enum optional Output video aspect ratio.
duration integer optional Video duration in seconds, range 2-15.
prompt_extend boolean optional Whether to optimize the prompt.
watermark boolean optional Whether to add an AI-generated watermark.
seed integer optional Random seed, range 0-2147483647.
callback object optional Optional callback configuration. In production, pass callback.url so HiAPI can notify your service when the task reaches a terminal state.
url string required HTTPS URL that receives terminal task notifications.
when enum optional Callback trigger timing. Use final for terminal-state notifications.
Example requests
Use 720P and 2 seconds to validate the prompt.
{
"model": "wan2.7-video/text-to-video",
"input": {
"prompt": "A calm sunrise over a quiet lake, cinematic, slow camera movement",
"resolution": "720P",
"ratio": "16:9",
"duration": 2,
"prompt_extend": false,
"watermark": false
}
}For short-form portrait placements.
{
"model": "wan2.7-video/text-to-video",
"input": {
"prompt": "A premium coffee product shot with slow camera movement",
"resolution": "720P",
"ratio": "9:16",
"duration": 5,
"prompt_extend": true,
"watermark": false
}
}Getting the result
- The response returns a taskId immediately without waiting for generation to finish.
- In production, prefer waiting for callback.url to receive the terminal notification. For local debugging, poll GET /v1/tasks/:id.
- When status=success, download the generated video from output[].url.
- When status=fail, fix the request based on the returned error instead of retrying the same invalid payload.