Overview
Wan3.0 is Tongyi Wanxiang’s all-in-one video model. Unlike Wan2.7, which makes you switch between four model IDs (t2v / i2v / r2v / videoedit), Wan3.0 handles every mode through a single model ID — what you send as media decides what it does. Text-to-video, image-to-video, reference-to-video and video editing all share one request body.
Two variants, identical capabilities, different speed and price:
wan3.0-video first, then switch latency-sensitive production traffic to wan3.0-video-prime.Let an AI Agent Do the Integration
Copy this prompt and paste it into Codex / Claude Code / Cursor
It first fetches the plain-text version of this page (append .md to any docs URL), then writes code in your project's own stack — why /v1/videos must not be used, the missing-X-DashScope-Async error, the completed (not SUCCEEDED) terminal state and the fact that reference-video seconds are billed are already baked into the requirements.
Integrate / troubleshoot Wan3.0 video generation (text-to-video, image-to-video, reference-to-video, video editing) in this project.
Read the docs before you touch code: fetch https://docs.apiyi.com/en/api-capabilities/wan3/overview.md for the plain-text version of this page; the API reference page is https://docs.apiyi.com/en/ap …
- Endpoint and async header (the two things most likely to block you immediately): submissions must go to …
10 requirements in total. Use the button below to copy the full prompt.
What this prompt saves you from
What this prompt saves you from
What changed from Wan2.7
Key features
Four modes, one model
type in input.media[].Up to 30 seconds
Native audio
soun track by default, no driving audio required. Use reference_audio when you want a specific voice timbre.Three resolution tiers
Group setup
Wan3.0 shares theWan&HappyHorse group with Wan2.7 and HappyHorse — one key calls them all. Video is billed per second, so your key must satisfy two conditions to route successfully:
- Billing mode: choose “Pay-as-you-go priority” or “Pay-as-you-go” — per-second video cannot route on a per-call key
- Group: include
Wan&HappyHorse

Create a key: set billing mode to pay-as-you-go priority and select the Wan&HappyHorse group (0.14x) to call every Wan3.0 / Wan2.7 / HappyHorse video model (the screenshot shows the old group name Wan)
Pricing
wan3.0-video.How the rate is derived: 0.98x by default, as low as 0.817x with bonuses
The console shows theWan&HappyHorse group at a 0.14x multiplier, denominated in CNY. APIYI settles in USD at a fixed 1:7 exchange rate:
Table 1: APIYI pricing in detail (billed per second)
Table 2: Tier-by-tier against Alibaba’s official pricing
wan3.0-video currently carries an official limited-time 30% discount (applied to all users by default), and APIYI pricing follows the discounted rate. wan3.0-video-prime has no discount. APIYI pricing will be adjusted when the promotion ends.Table 3: Total cost for common durations
Stacking top-up bonuses
With a top-up bonus, credited balance scales by up to ~1.2x, pushing the effective rate lower:⚠️ Billing rules (different from other video models)
Pre-authorization and settlement
- Without a reference video: the requested
durationis charged up front and that is the final amount — no settlement entry. - With a reference video: at submit time the gateway does not yet know how long your input video is, so it pre-authorizes at the 30-second cap, then recalculates against the actual billed seconds and refunds the difference (a separate negative entry on your bill).
wan3.0-video, 30 seconds). Keep enough balance available; the refund lands within seconds of task completion.⚠️ Endpoint choice (most important)
APIYI exposes two paths, but only the DashScope passthrough endpoint works fully with Wan3.0:Async workflow
Create the task
POST /wan/api/v1/services/aigc/video-generation/video-synthesis with the X-DashScope-Async: enable header. Returns a task_id immediately.Poll for status
GET /v1/tasks/{task_id} (with Authorization), every 5–10 seconds (never below 3), until status becomes completed.Download the video
result_url from the response directly. It comes in two forms: most tasks return an APIYI signed controlled address (https://api.apiyi.com/v1/video-objects/.../content?access=..., accelerated over international routes); some still return an Alibaba Cloud OSS signed link (https://dashscope-result-*.oss-cn-*.aliyuncs.com/...). Both are absolute signed URLs — no Authorization header needed — valid for about 24 hours. If you receive a relative path /v1/video-objects/..., download it with the task owner’s Authorization.result_url stays valid forever, nor that it is always the provider’s OSS link; re-host it within its validity window.Task states
Complete Python client
Parameter reference
The request body uses the nested DashScope structure:{ model, input: { prompt, media[] }, parameters: {...} }.
input fields
media[] types and the mode they select
type and url. Image media (first_frame / last_frame / reference_image) may use either a publicly reachable https link or a base64 data URI (data:image/jpeg;base64,... or data:image/png;base64,...) — prefer base64 when the media cannot be hosted publicly or the provider’s cross-border fetch times out. Video / audio / document media must still use a public URL, and must stay reachable until the task finishes.
parameters fields
Choosing: Wan3.0 / Wan2.7 / HappyHorse
Best practices
Iterate at 480P, render the final cut at 1080P
Iterate at 480P, render the final cut at 1080P
Trim reference videos before uploading
Trim reference videos before uploading
Describe motion, not just the picture
Describe motion, not just the picture
Never poll faster than every 3 seconds
Never poll faster than every 3 seconds
Do not auto-retry the same prompt on failure
Do not auto-retry the same prompt on failure
FAQ
Why are the billed seconds longer than my output video?
Why are the billed seconds longer than my output video?
Why was a large amount charged at submit and then refunded?
Why was a large amount charged at submit and then refunded?
The task stays in_progress with progress stuck at 30%?
The task stays in_progress with progress stuck at 30%?
result_url fails to download — how do I troubleshoot?
result_url fails to download — how do I troubleshoot?
- APIYI controlled address (
api.apiyi.com/v1/video-objects/...) returning 401 / signature expired: the signature is missing or expired. Re-queryGET /v1/tasks/{task_id}for a fresh address; if the response gives a relative path (/v1/video-objects/...), you must send the task owner’sAuthorizationwhen downloading. A failed signature check can also return 404 — re-query the task either way. - Alibaba Cloud OSS link (
dashscope-result-*.oss-cn-*.aliyuncs.com) returning 403SignatureDoesNotMatch: OSS considers the signature inconsistent with the request — usually because the URL was rewritten (parameter order, encoding, manual concatenation) or the request carried a conflicting auth header. GET the URL exactly as returned; if it still fails, re-query the task for a new address. - Expired link:
result_urlis usually valid for about 24 hours; re-querying the task normally returns a fresh address (the task ID itself is queryable for about 24 hours too).
Authorization needed.Submit returned 200 but the task failed?
Submit returned 200 but the task failed?
Getting "no available channel for this model"?
Getting "no available channel for this model"?
Wan&HappyHorse.Related documentation
Video Generation API reference
Wan2.7 Video Generation
HappyHorse Video Generation
Model Pricing
help.aliyun.com/zh/model-studio/wan3-video-generation-guide, help.aliyun.com/zh/model-studio/wan3-video-generation-api-reference