Every asynchronous generation API carries a contract that is separate from the model it serves, and the contract is where the money is decided. Alibaba Cloud's 13 November guide to integrating Wan3.0 is unusual because it treats that contract as the subject: not prompt design or video quality, but what a client must do between a create call and a stored MP4. Three properties do the work. State outlives the request, since create returns output.task_id behind an X-DashScope-Async header and status is polled about every 15 seconds until a final state. Money is committed at create time, since each created task can be billed per generated second. And the output is perishable, because task IDs and the returned video_url are valid for 24 hours and the video is then purged. Read together, they mean the unit of work is a job with a lifecycle, not an HTTP call, and a timeout is not a failed request but a possible second purchase.
The failure mode the guide puts at the centre is the orphan task: a generation the provider created, and can bill, whose task_id never reached the client. The create call succeeds on the server, the response is lost, and a retry produces a second task for the same take. What makes this more than a footnote is that the API reference documents no idempotency field on the create request, so the guarantee has to live on the client. The guide's answer is a key hashed from team, brief, take number, model, resolution, duration and prompt, a unique index on that key, and a single submitter that is the only code path allowed to spend money.
A key alone does not close the hole, because it deduplicates retries from the caller, not responses lost in flight. The design concedes this with an UNCERTAIN state: when the outcome of create cannot be known, the job is parked and a person decides. That looks like an admission of weakness and is the opposite. An unrecorded task_id is indistinguishable from no task at all, and guessing costs a full second generation, while parking costs one manual decision. What matters is the bound: the worst case becomes one duplicate per ambiguous job, not one per retry loop.
The reference lists six task states, PENDING, RUNNING, SUCCEEDED, FAILED, CANCELED and UNKNOWN, and the guide maps each to an action. Two rules carry most of the value. A failed query is not a failed task, so back off and query again with the same task_id, because re-creating would turn a network error into an orphan. And FAILED has to be classified before it is retried, because an input error such as a malformed parameter will fail identically the second time; only error classes that have been seen to succeed on retry are retried, once, with a new key suffix and a new reservation. The residual risk is a systematic input error misclassified as transient, which would double spend across an entire batch rather than one job. That risk is testable by replaying a fixed corpus of rejected requests and comparing the classifier's verdicts with the billed outcome.
The quota arithmetic is the most portable part of the piece. Wan3.0 publishes 300 requests per minute for both wan3.0-video and wan3.0-video-prime, so the guide runs one shared token bucket at 80 percent, 240 per minute, then asks whether status queries draw on the same budget. If they do, a task polled every 15 seconds consumes four queries a minute; at an assumed five minutes in flight that is 20 queries plus one create, 21 requests per job, and 240 divided by 21 gives about 11 creates per minute. A 500-job batch then drains in roughly 44 minutes instead of about two. Polling accounts for 20 of every 21 requests.
That inverts a common instinct. Shortening the interval below the suggested 15 seconds spends the budget faster without raising throughput, since the effective rate is 240 divided by one plus queries per job. The five-minute assumption is the soft part of the estimate and should be measured per workload. The structural point holds for any asynchronous API: query traffic scales with concurrency rather than with job count, so a poller is a capacity consumer in its own right and belongs behind the same limiter as the submitter, with two lanes so a draft burst cannot starve finals and jittered backoff that keeps a throttled job queued rather than failed.
The 24-hour expiry turns archiving from housekeeping into correctness. On SUCCEEDED the MP4 has to be copied into storage the client controls, with a checksum and the provider's usage.duration recorded, and the provider URL kept only as a pointer with an expiry timestamp. Verification is not ceremonial: comparing usage.duration against the file catches truncated or wrong-resolution output, and with a video input the figure also counts input seconds, which is easy to mistake for a corrupt copy. A scheduled sweep for SUCCEEDED-but-unarchived jobs older than about 12 hours leaves half the window as margin against a poller outage. The general form is that the asset's durability boundary is not where the model runs; it is where the copy lands.
Reserve, submit, settle is presented as cost control, but its more important function is detection. A reservation per job, sized as duration times price per generated second, both refuses work a team cannot afford before money is committed and creates the record against which settlement is reconciled. At settlement, billed seconds that match no reservation are an orphan, whether or not the task_id was ever recorded, which is the one layer where a lost response still surfaces. The example's list prices, 0.05 to 0.20 dollars per second for wan3.0-video across three resolutions in Singapore, also expose a design detail: resolution is a five-fold cost multiplier, so the ledger has to be keyed on the requested output, not only on the model. Smart duration, where a value of minus one asks for the maximum, is handled by reserving 30 seconds and returning the difference.
The headline figure, 900 dollars lost on 4,000 dollars of video, is arithmetic on stated assumptions: 4,000 ten-second 720P jobs a month, 4 percent of creates timing out and being re-created twice, 2 percent of outputs missing the window and being regenerated, and one 500-job batch re-run by mistake. It is a model, not a measurement. What makes it useful is that each component maps to a distinct control, idempotency for the 320 dollars of orphans, archiving for the 80 dollars of expired links, a per-team cap that stops a runaway re-run at the cap instead of on the invoice. The same calculation can be re-run against a real month of job records, and the claim under test is narrow and falsifiable: same model, same API, the difference between 4,000 and 4,900 dollars is client code.
The guide is also honest about when none of this is worth building: a few generations a week, one team with one budget, or no engineer to carry the pager for UNCERTAIN jobs. What generalizes is a four-question checklist for any asynchronous generation service. Is the create call the billable event? Is there a documented idempotency key? Do status queries count against the same quota? How long does the artifact live? Those four answers decide whether the integration needs a queue, a ledger, an archiver, or nothing at all.
None of it says anything about video quality, which is the point. For asynchronous generation the cost of a clip is settled before the first frame exists, in the client's state machine.
Sources: Johnny Mai, "Integrating Wan3.0 via API: Queues, Retries, and Cost Controls," Alibaba Cloud Blog, 13 November 2026, https://www.alibabacloud.com/blog/integrating-wan3-0-via-api-queues-retries-and-cost-controls_603776 ; Wan3.0 Video Generation API Reference and the wan3.0-video / wan3.0-video-prime model pages, Alibaba Cloud Model Studio, accessed 13 November 2026.