HappyWan API

HappyWan API

The HappyWan API will be available here on Alibaba’s launch day, expected mid-December 2026. It uses the same endpoint and API key as Wan 3, so you can build and test your client today and switch to HappyWan by changing one value.

Updated · By the happy-wan.ai team

Key points

HappyWan API in 30 seconds

  • Not live yet: HappyWan is expected in mid-December 2026. The final model ID, parameters and price are published at launch.
  • Build today: create tasks with POST /v1/video/generations and check them with GET /v1/video/generations/{task_id}, the same as Wan 3.
  • Switch in one line: keep the model name in a VIDEO_MODEL variable and change it when HappyWan goes live.
  • Production basics: validate inputs, save the task_id, poll every 3–5 seconds with a timeout, and download results right away.

Why now

Why set up the HappyWan API before launch

On launch day the slow part isn’t the prompt. It’s the client code around it.

Video jobs are asynchronous

Waiting inside a web request loses tasks when a page reloads or a server restarts. Save the task_id and check back.

Polling too fast backfires

Checking every few milliseconds doesn’t make the video any faster. It only uses up your rate limit.

Bad inputs cost money

Unchecked prompts, durations and double clicks create tasks you didn’t mean to pay for.

Quickstart

Get started in three steps

  1. Step 01

    Create an account

    Sign up and add credit. There’s no subscription: you pay per second of video you generate.

    Sign up
  2. Step 02

    Get an API key

    Create a key in the console and keep it as API_KEY. One key works for HappyWan and every other model.

  3. Step 03

    Send your first request

    Use the examples below. Video generation is asynchronous: you get a task ID back, then fetch the finished video.

Code examples

Generate a video

These examples run today with Wan 3. The model name lives in VIDEO_MODEL: when HappyWan launches, change that one value.

# Set API_KEY first. Keep the model in VIDEO_MODEL: at launch, change it to HappyWan.
export VIDEO_MODEL="${VIDEO_MODEL:-alibaba/wan-3.0-t2v}"

# 1. Create a task and save the task_id it returns
curl https://api.siray.ai/v1/video/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "'"$VIDEO_MODEL"'",
    "prompt": "A red paper boat drifts down a rainy street at dusk",
    "duration": 5,
    "size": "720p",
    "aspect_ratio": "16:9"
  }'

# 2. Every 5 seconds, check the task until status is SUCCESS or FAILURE
curl https://api.siray.ai/v1/video/generations/$TASK_ID \
  -H "Authorization: Bearer $API_KEY"

Wan 3 API reference →

Request types

Three ways to start a video

Request bodies you can send today with Wan 3. HappyWan accepts the same kinds of input, with the final field names confirmed at launch.

Text to video
Only a prompt. Describe subject, scene, camera, action and sound.
First and last frame
One image as the opening shot, plus an optional closing shot. The prompt describes the move between them.
Reference to video
Images, videos or audio as guides for characters, products and style. Say in the prompt what each reference is for.
{
  "model": "alibaba/wan-3.0-t2v",
  "prompt": "A red paper boat drifts down a rainy street at dusk, soft rain sounds",
  "duration": 5,
  "size": "720p",
  "aspect_ratio": "16:9",
  "audio_enable": true
}

Parameters

Request parameters

HappyWan values are from early API drafts and are confirmed at launch. Parameter names and Wan 3 values are from our API reference.

ParameterDescriptionHappyWan (expected)Wan 3 today
modelModel namehappywan in early draftsalibaba/wan-3.0-t2v
promptWhat should happen, including camera and soundTextText
durationLength in seconds2–30, or automatic2–30
sizeResolution480p, 720p, 1080p480p, 720p, 1080p
aspect_ratioFrame shapeadaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16adaptive, 16:9, 9:16, 1:1, 4:3, 3:4
audio_enableGenerate sound with the videoOn by defaulttrue / false
image, end_imageFirst and last frameUp to 2 imageswan-3.0-i2v
imagesReference imagesMore than earlier modelsUp to 10 (wan-3.0-ref2v)
videosReference videosDon’t count toward the length limitUp to 5 (wan-3.0-ref2v)
audiosReference audio clipsSupportedUp to 5 (wan-3.0-ref2v)
Document or web pageA link to turn into a videoSupported—
seedRandom seed, -1 for random-1 to 2147483647-1 to 2147483647

Production

Production checklist

  • Validate before you submit. Trim the prompt, reject empty ones, and only allow durations, sizes and aspect ratios from a fixed list.
  • Use public HTTPS links for media. Upload images, videos and audio first and pass their URLs instead of large Base64 strings.
  • Save the task_id first. Write it to your database before polling, so a restart doesn’t lose a task you’ve already paid for.
  • Poll every 3–5 seconds. Faster polling doesn’t speed anything up. HappyWan takes about 45 seconds, so a 5-minute timeout leaves plenty of room.
  • Retry only what’s safe. Status checks can always be retried. Only resubmit a generation if no task_id came back.
  • Download results right away. Store finished videos in your own storage instead of relying on output links.

Errors

Handling errors

When a request is rejected or a task ends in FAILURE, the response includes a fail_code. The common ones:

HTTPfail_codeWhat to do
400InvalidParameterFix the request. Don’t retry automatically.
400MissingParameterAdd the missing field, such as prompt or model.
400InputTextSensitiveContentDetectedChange the prompt or the input media.
401AuthenticationErrorCheck your API key. Stop retrying.
403InsufficientBalanceAdd credit, then resubmit.
404InvalidEndpointOrModel.NotFoundCheck the model name. HappyWan’s ID only works after launch.
429ServerOverloadedWait and retry with backoff.
500InternalServiceErrorRetry status checks. Resubmit only if no task_id came back.

Cost

Estimate your video costs

The number that matters isn’t the price per second. It’s what each clip you actually keep costs:

Cost per usable clip = price per second × seconds ÷ share of clips you keep

For example, Wan 3 at 720p is $0.0801/s. A 5-second clip costs $0.40. If you keep 4 out of 5 clips, each usable clip costs $0.50.

Build a test set of 10 real prompts on Wan 3 today. On launch day, run the same set on HappyWan and compare how many clips you keep and what each one costs. HappyWan pricing is published at launch.

HappyWan pricing →

SDKs and integrations

Use HappyWan from your tools

Every SDK and integration below will work with HappyWan on launch day.

API reference

Every model, parameter and error code.

API docs →

FAQ

HappyWan API FAQ

Is there a HappyWan API?

Yes. The HappyWan API will be available here on Alibaba’s launch day, expected mid-December 2026.

What is the HappyWan model name?

Alibaba hasn’t published it yet. This page will be updated with it at launch.

Can I switch to HappyWan without rewriting my code?

Yes. Keep the model name in a variable such as VIDEO_MODEL. At launch, change that one value. The endpoint, API key and polling stay the same.

Can I start building before HappyWan launches?

Yes. Build with Wan 3 today using the same endpoint and API key. When HappyWan goes live, you only change the model value.

How is the HappyWan API billed?

Per second of generated video, at the published price. Failed tasks aren’t charged. See HappyWan pricing.

Which SDKs work with HappyWan?

The Python and Node.js SDKs, plus the ComfyUI, n8n and Dify integrations.

How often should I check for results?

Every 3–5 seconds. HappyWan takes about 45 seconds per video, so most tasks finish within a dozen checks.

Am I charged for failed tasks?

No. Tasks that end in FAILURE aren’t charged.

Get your HappyWan API key

One API key for HappyWan on launch day and every other model today.