Wan 2.7 Image-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/image-to-video |
|---|---|
| Type | Video generation (image-to-video) |
| Endpoint | POST /v1/tasks |
| Pricing | See HiAPI Pricing |
Wan 2.7 Image-to-Video API animates a first frame into video and also supports last-frame, driving-audio, or first-clip media inputs.
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
Animate a first_frame image with camera motion.
mediapromptPass first_frame and last_frame to control start and end frames.
media[].typeUse 720P and 2 seconds to validate the image URL and prompt.
resolutiondurationMedia URLs must be publicly reachable, without hotlink blocking or complex redirects.
media[].urlRequest parameters
model string required Fixed value wan2.7-video/image-to-video.
input object required Business parameters for image-to-video media input and generation settings.
prompt string required Image-to-video prompt, up to 5000 characters.
media array required Media inputs, 1-3 items. Each item includes type and url. SVG is not supported.
type enum required Media type.
url string required Stable public URL, OSS URL, or supported base64 data URI.
negative_prompt string optional Negative prompt, up to 500 characters.
resolution enum optional Video resolution. Use uppercase values.
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 a 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
Low-cost example with one first_frame item.
{
"model": "wan2.7-video/image-to-video",
"input": {
"prompt": "Make the image gently move with subtle camera motion.",
"media": [
{
"type": "first_frame",
"url": "https://example.com/first-frame.jpg"
}
],
"resolution": "720P",
"duration": 2,
"prompt_extend": false,
"watermark": false
}
}Use two images to control start and end frames.
{
"model": "wan2.7-video/image-to-video",
"input": {
"prompt": "Create a smooth transition from the first frame to the last frame.",
"media": [
{
"type": "first_frame",
"url": "https://example.com/first.jpg"
},
{
"type": "last_frame",
"url": "https://example.com/last.jpg"
}
],
"resolution": "720P",
"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.