HiAPI
Blog

Tutorial

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.

Oct 22, 2026 4
How to Use Wan 2.6 Flash Image-to-Video API: Aspect Follows Your Image
Default / s
$0.029
5s clip
$0.145
Durations
5/10/15 s

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 — full pricing on the pricing page.
  • 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

·

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

Tier Per second 5 s 10 s 15 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 22, 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 current pricing: 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

Field Required Values Notes
image_urls yes exactly 1 JPG / PNG / WebP, ≥256×256, ≤10MB; its aspect sets the output aspect
prompt yes 1–1,500 chars Motion, camera, atmosphere; Chinese or English
duration no 5 / 10 / 15, default 5 These three only
resolution no 720p / 1080p, default 720p
audio no default false Synchronized audio, priced separately (see the table)

Any field outside the table returns a 400.

Errors you'll actually hit

Status Meaning What to do
400 INVALID_REQUEST Malformed body (missing image_urls or prompt, 2 images, duration of 7) Fix the payload against the table
402 INSUFFICIENT_QUOTA Out of credits (no charge) Top up and retry
429 RATE_LIMITED Rate limited Slow your submissions
409 / 422 IDEMPOTENCY_KEY_* Same idempotency key resubmitted Generate 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

Does the aspect follow the input image?

Yes. Landscape gives 16:9, portrait gives vertical, 3:4 gives 3:4 — no parameter needed.

How do I turn on audio?

Pass audio: true explicitly; it bills at the Sound On rate (about 2×).

Can I set any duration?

No. Only 5, 10, or 15 seconds; other values return a 400.

Do Chinese prompts work?

Yes. Chinese or English, up to 1,500 characters; write motion and camera, not a re-description of the frame. Pricing depends only on resolution, duration, and audio.

How many clips does $10 buy?

About 68 at the default tier (720p silent, 5 s, $0.145 each).

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

Related articles

View all articles →

Start building with persistent AI artifacts

Get your API key and call image, video and audio models through one task-based API.

Read the API docs