Search

Search HiAPI models, tools, and resources.

Back to blog
Tutorial4 min read

How to Use Wan 2.6 Flash Image-to-Video API: Aspect Follows Your Image

One image and one line into 5/10/15 second video: four price combinations, examples, and parameters.

HiAPI EditorialWan 2.6 FlashAPI IntegrationImage to Video

TL;DR

  • Wan 2.6 Flash Image to Video (wan2.6-flash/image-to-video) takes one image and a motion line and returns a 5, 10, or 15 second video at 720p / 1080p with optional synchronized audio; the output aspect follows the input image — portrait in, portrait out. Try it on the model page; new accounts get 200 free credits.
  • Pricing is per second in four combinations: 720p silent (default) at $0.029, audio on at $0.0575, 1080p silent at $0.043, and 1080p with audio at $0.086 (table below).
  • Everything runs on HiAPI /v1/tasks: pass exactly one image in image_urls, then take the video from output (temporary — save it).

What it does

  • One image + one line = one motion: the subject and light stay true to the photo while the model adds the motion, camera, and mood you describe.
  • Three durations: 5 / 10 / 15 seconds, default 5.
  • Aspect follows the image: no aspect parameter — landscape in gives 16:9, portrait in gives vertical, a 3:4 photo gives 3:4. No re-cropping for social.
  • Audio on demand: audio defaults off; turn it on and synchronized sound generates with the picture (wok clatter, flames, crowds).

Here's a real clip (defaults: 720p, 5 s, silent):

The fox turns its head toward the camera, its ears twitch, golden leaves drift down through the misty light

Input image · Poster frame

wan2.6-flash/image-to-video, 720p, 5 s, 16:9, 1280×720, silent, $0.145. Watch the full clip →

Try this prompt →

Pricing: four combinations, one table

TierPer second5 s10 s15 s
720p silent (default)$0.029$0.145$0.29$0.435
720P · Sound On$0.0575$0.2875$0.575$0.8625
1080P · Sound Off$0.043$0.215$0.43$0.645
1080P · Sound On$0.086$0.43$0.86$1.29

HiAPI current prices, checked October 21, 2026. Relative to the default: audio doubles, 1080p is ~1.5×, both together ~3×. Failed tasks refund in full.

Two ways to start

Browser, 3 steps: open the model page → upload the image, write the motion line → generate. The default tier is $0.145 for 5 seconds.

API, 3 steps: POST /v1/tasks to submit → take the taskId → poll to success.

curl: your first clip

curl -X POST https://api.hiapi.ai/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: your-unique-key-001" \
  -d '{
  "model": "wan2.6-flash/image-to-video",
  "input": {
    "prompt": "The fox turns its head toward the camera, its ears twitch, golden leaves drift down through the misty light",
    "image_urls": ["https://static.hiapi.ai/gallery/2026/10/ced2dd4214889094.jpg"],
    "duration": 5,
    "resolution": "720p",
    "audio": false
  }
}'

At the snapshot rate: 720p silent × 5 s = $0.145.

Python: submit, poll, download

import time, uuid, requests

BASE = "https://api.hiapi.ai/v1/tasks"
HEADERS = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
}

payload = {
    "model": "wan2.6-flash/image-to-video",
    "input": {
        "prompt": "The fox turns its head toward the camera, its ears twitch, golden leaves drift down through the misty light",
        "image_urls": ["https://example.com/your-image.jpg"],
        "duration": 5,
        "resolution": "720p",
        "audio": False,
    },
}

resp = requests.post(
    BASE,
    headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
    json=payload,
    timeout=30,
)
resp.raise_for_status()
task_id = resp.json()["taskId"]

while True:
    task = requests.get(f"{BASE}/{task_id}", headers=HEADERS, timeout=30).json()
    print(task["status"])
    if task["status"] in ("success", "fail"):
        break
    time.sleep(5)

if task["status"] == "success":
    video = next(o for o in task["output"] if o.get("type") == "video")
    mp4 = requests.get(video["url"], timeout=120)   # temporary URL — save promptly
    with open("output.mp4", "wb") as f:
        f.write(mp4.content)
    print("saved output.mp4")

Parameters

FieldRequiredValuesNotes
image_urlsyesexactly 1JPG / PNG / WebP, ≥256×256, ≤10MB; its aspect sets the output aspect
promptyes1–1,500 charsMotion, camera, atmosphere; Chinese or English
durationno5 / 10 / 15, default 5These three only
resolutionno720p / 1080p, default 720p
audionodefault falseSynchronized audio, priced separately (see the table)

Any field outside the table returns a 400.

Errors you'll actually hit

StatusMeaningWhat to do
400 INVALID_REQUESTMalformed body (missing image_urls or prompt, 2 images, duration of 7)Fix the payload against the table
402 INSUFFICIENT_QUOTAOut of credits (no charge)Top up and retry
429 RATE_LIMITEDRate limitedSlow your submissions
409 / 422 IDEMPOTENCY_KEY_*Same idempotency key resubmittedGenerate a fresh key

Terminal failures use CONTENT_POLICY_VIOLATION, TASK_FAILED, and TASK_TIMEOUT; failed tasks refund in full.

Before you ship

  • Callbacks: pass "callback": {"url": "https://..."} at the request top level.
  • Persist outputs: the video URL in output is temporary; download immediately.
  • The image is the ceiling: at least 256×256 and up to 10MB; sharp inputs make sharp video.
  • Vertical assets need vertical images: there's no aspect parameter — upload a portrait for 9:16.

FAQ

  • Yes, the aspect follows the image: landscape in gives 16:9, portrait gives vertical, 3:4 gives 3:4 — no parameter needed.
  • Yes, audio must be turned on explicitly: audio: true bills at the Sound On rate.
  • Yes, durations are 5 / 10 / 15 only; other values return a 400.
  • Yes, Chinese prompts work, up to 1,500 characters; write motion and camera, not a re-description of the frame.
  • Yes, $10 buys about 68 clips: $0.145 each at the default tier.

Next: take one of your photos and bring it to life; four scene templates are in the prompt guide.

Generate it with HiAPI

Choose a model, enter your prompt, and see the result.

HiAPI Blog

Related articles

HiAPI

Generate it with HiAPI

Start generating